Overview
WeatherAPI offers a suite of APIs designed to deliver various types of weather data for integration into web and mobile applications. The service provides access to current weather conditions, multi-day forecasts, and historical weather records, supporting a range of use cases from simple display widgets to complex data analysis. Developers can retrieve information in both JSON and XML formats, facilitating integration across different programming environments. The API supports global locations, identified by city name, ZIP code, latitude/longitude coordinates, or IP address, allowing for localized weather information delivery.
Beyond standard weather metrics like temperature, humidity, and precipitation, WeatherAPI includes specialized endpoints. The Astronomy API provides sunrise, sunset, and moon phase data, which can be useful for applications in photography, agriculture, or event planning. The Air Quality API delivers real-time air pollution index values and pollutant concentrations, informing users about environmental conditions. For sports-related applications, the Sports API offers event-specific weather forecasts, while the Marine Weather API caters to nautical activities with data on wave height, tide, and sea temperature. The platform is suitable for businesses that require reliable weather intelligence to enhance user experience, optimize logistics, or inform decision-making processes, such as those in transportation, retail, or insurance sectors.
The service focuses on providing comprehensive data points, including observed weather, future projections, and past records. For instance, the Forecast API can return up to 14 days of future weather information, while the Historical Weather API allows querying data from 2009 onwards. This breadth of data supports diverse application requirements, from displaying a simple current temperature on a website to analyzing long-term climate trends. The API's design emphasizes ease of use, with clear documentation and support for common programming languages, aiming to reduce the development effort required to integrate weather data into applications.
Key features
- Current Weather API: Provides real-time weather conditions for any global location, including temperature, humidity, wind speed, pressure, and visibility.
- Forecast API: Delivers multi-day weather forecasts, up to 14 days in advance, with hourly data for temperature, precipitation, and other meteorological parameters.
- Historical Weather API: Offers access to past weather data dating back to 2009, enabling trend analysis and historical lookups for specific dates and locations.
- Astronomy API: Supplies astronomical data such as sunrise, sunset, moonrise, moonset, and moon phases for specified locations and dates.
- Time Zone API: Converts local time for any location to its corresponding time zone, assisting with time-sensitive applications.
- Sports API: Provides weather forecasts specifically tailored for sports events at various venues worldwide.
- Air Quality API: Offers air quality index (AQI) data and concentrations of pollutants like CO, O3, NO2, and SO2 for global locations.
- Marine Weather API: Delivers specialized weather data for marine environments, including wave height, swell direction, and sea temperature.
- IP Lookup API: Resolves an IP address to a geographic location, providing city, region, country, and latitude/longitude coordinates for location-based services.
Pricing
WeatherAPI offers a free developer plan and multiple paid tiers for increased call volumes and features. The plans are structured to accommodate different usage levels, from individual developers to larger enterprises. Details on specific plan features and call limits are available on the WeatherAPI pricing page. As of May 2026, the pricing structure is as follows:
| Plan Name | Monthly Calls | Starting Price (per month) | Features |
|---|---|---|---|
| Developer Plan | Up to 1,000,000 | Free | Current, Forecast (3 days), Historical (30 days), Astronomy, Time Zone, IP Lookup, Sports, Marine, Air Quality |
| Startup Plan | Up to 2,000,000 | $19 | All Developer Plan features + Forecast (5 days), Historical (90 days) |
| Business Plan | Up to 10,000,000 | $99 | All Startup Plan features + Forecast (7 days), Historical (180 days) |
| Enterprise Plan | Custom | Contact for pricing | All Business Plan features + Forecast (14 days), Historical (Full history), Dedicated support, Custom SLAs |
Common integrations
WeatherAPI can be integrated into various platforms and applications, primarily through its RESTful interface. Developers commonly use client libraries or direct HTTP requests in their chosen programming languages. Examples of common integration points include:
- Web Applications: Embedding weather widgets or data displays on websites using JavaScript frameworks like React, Angular, or Vue.js.
- Mobile Applications: Incorporating real-time weather and forecasts into iOS and Android apps using native SDKs or cross-platform frameworks.
- IoT Devices: Connecting smart home devices or environmental sensors to retrieve and display local weather conditions.
- Data Analytics Platforms: Feeding historical weather data into business intelligence tools for correlation with other datasets.
- Server-side Applications: Using backend languages like Python, Node.js, or PHP to fetch weather data for complex logic, such as route optimization or agricultural planning.
- Workflow Automation: Integrating with platforms like Tray.io to trigger actions based on weather conditions, for example, sending alerts before a storm.
Alternatives
The weather data API market includes several providers, each with distinct features and pricing models. Key alternatives to WeatherAPI include:
- OpenWeatherMap: Offers a range of APIs for current weather, forecasts, historical data, and climate statistics, with a focus on open data initiatives.
- AccuWeather: Provides premium weather data, including minute-by-minute forecasts and advanced severe weather alerts, often used by media and enterprise clients.
- Tomorrow.io: Specializes in hyper-local, minute-by-minute forecasts and impacts-based weather intelligence for various industries.
Getting started
To begin using WeatherAPI, developers typically obtain an API key from the WeatherAPI dashboard after registration. This key is then used to authenticate requests to the various API endpoints. The API supports requests for locations identified by city name, IP address, or latitude/longitude. The following cURL example demonstrates how to fetch current weather data for London, UK:
curl "https://api.weatherapi.com/v1/current.json?key=YOUR_API_KEY&q=London&aqi=no"
Replace YOUR_API_KEY with the actual key obtained from your WeatherAPI account. The q parameter specifies the location (e.g., "London"), and aqi=no indicates that air quality data is not requested in this particular call. Similar requests can be made for forecast, historical, or other specialized data types by adjusting the endpoint and parameters as detailed in the WeatherAPI documentation.