weatherspark.com APIweatherspark.com ↗
Access WeatherSpark climate summaries, historical METAR reports, and monthly weather aggregations for any location via 3 structured API endpoints.
curl -X GET 'https://api.parse.bot/scraper/cc37afd5-2ed8-4bd2-a65c-a40232778de4/search_locations?query=New+York' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for locations by name to find their IDs and city slugs. Returns a list of matching locations with metadata including country, call signs, and URL slugs needed for other endpoints.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | City name or location query (e.g. 'Birmingham', 'New York'). |
{
"type": "object",
"fields": {
"results": "array of location objects containing id, city_slug, fullNameTr, nameTr, restTr, countryCode, callSigns, and url"
},
"sample": {
"data": {
"results": [
{
"id": 14538,
"url": "/y/14538/Average-Weather-in-Birmingham-Alabama-United-States-Year-Round",
"nameTr": "Birmingham",
"restTr": "Alabama, United States",
"callSigns": [
"BHM"
],
"city_slug": "Birmingham-Alabama-United-States",
"fullNameTr": "Birmingham, Jefferson County, Alabama, United States",
"countryCode": "US",
"reportLocationTypeCode": 0
}
]
},
"status": "success"
}
}About the weatherspark.com API
The WeatherSpark API exposes 3 endpoints covering location search, historical METAR observation reports, and aggregated monthly climate data. Starting with search_locations, you can resolve any city name into the IDs and slugs required by the other endpoints, then retrieve raw METAR strings with parsed daily statistics or pull monthly averages for temperature, precipitation, wind speed, and solar energy alongside full textual climate analysis.
Location Search and ID Resolution
Before querying weather data, use search_locations with a query parameter (e.g. 'Birmingham' or 'New York') to retrieve an array of matching location objects. Each result includes an id, city_slug, fullNameTr, countryCode, callSigns, and url. The city_slug and location_id values are required inputs for the other two endpoints, so this lookup is the standard entry point for any workflow.
Historical METAR Reports and Daily Statistics
get_metar_reports accepts a date (in YYYY-MM-DD format or the string 'today'), a city_slug, and a location_id. It returns an array of metar_reports, each containing a raw_report string — the full METAR observation as broadcast from the station. Alongside the raw observations, the response includes a daily_stats object keyed by section title, giving a structured summary of conditions for that day such as temperature range, precipitation totals, and sky conditions.
Monthly Climate Aggregations and Textual Analysis
get_weather_details returns climate data aggregated by month for a given location. The monthly_aggregated_data field is an object keyed by metric name — including High, Low, Rain, and Wind Speed — where each metric maps month abbreviations to their average values. The response also includes a summary string and a textual_analysis object broken into named sections, each containing an array of paragraph strings covering topics like seasonal temperature patterns, precipitation timing, and humidity trends.
- Build a historical weather lookup tool using raw METAR strings from
get_metar_reportsfor a specific date and airport station - Generate city climate profile pages using monthly temperature highs and lows from
get_weather_details - Power a travel planning feature with precipitation and wind speed monthly averages keyed by month abbreviation
- Resolve ambiguous city names to canonical location IDs using
search_locationsbefore chaining into weather queries - Aggregate daily weather statistics from
daily_statsfor operational planning in agriculture or construction - Display textual climate summaries from
textual_analysisparagraph arrays in consumer-facing location guides - Compare solar energy monthly averages across multiple cities to support site selection for renewable energy projects
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does WeatherSpark have an official developer API?+
What does `get_metar_reports` return beyond the raw METAR strings?+
metar_reports array of raw observation strings, the endpoint returns a daily_stats object whose keys are section titles (e.g. temperature, precipitation) and whose values are the parsed summary data WeatherSpark computes for that day. The date and location_id fields are also included for reference.How granular is the data in `get_weather_details`? Can I get daily or hourly breakdowns?+
get_weather_details endpoint returns data aggregated at the monthly level — each metric in monthly_aggregated_data maps month abbreviations to averages. Daily or hourly breakdowns are not currently available through this endpoint. For day-level data, get_metar_reports covers individual dates. You can fork this API on Parse and revise it to add an endpoint targeting finer-grained time series if that granularity is needed.Does the API cover locations outside the United States?+
search_locations response includes a countryCode field and callSigns for stations worldwide, and WeatherSpark's coverage spans international airports and cities. However, METAR availability depends on whether a reporting station exists for a given location — remote areas with no nearby reporting station may return sparse or empty metar_reports arrays.Does the API return forecast data for future dates?+
get_metar_reports endpoint is oriented toward historical observations and accepts past dates or 'today', and get_weather_details returns long-run monthly climate averages rather than forward-looking forecasts. You can fork this API on Parse and revise it to target forecast data if future-date predictions are required.