WeatherSpark APIweatherspark.com ↗
Access WeatherSpark climate summaries, historical METAR reports, and monthly weather aggregations for any location via 3 structured API endpoints.
What is the WeatherSpark 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.
curl -X GET 'https://api.parse.bot/scraper/cc37afd5-2ed8-4bd2-a65c-a40232778de4/search_locations?query=Birmingham' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace weatherspark-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
from parse_apis.weatherspark_api import WeatherSpark, Location, WeatherDetails, MetarReport
client = WeatherSpark()
# Search for locations matching a city name
for location in client.locations.search(query="Birmingham"):
print(location.full_name, location.country_code, location.id, location.call_signs)
# Get year-round climate details for the first matching location
for loc in client.locations.search(query="Seattle", limit=1):
details = loc.weather_details()
print(details.summary, details.monthly_aggregated_data)
# Get historical METAR observations for a specific date
for report in loc.metar_reports(date="2025-01-15"):
print(report.raw_report)
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. Pagination is not supported; results are capped by the server (typically ~10 matches).
| 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"
}
]
},
"status": "success"
}
}About the WeatherSpark API
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.
The WeatherSpark API is a managed, monitored endpoint for weatherspark.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when weatherspark.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official weatherspark.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- 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 | 100 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.