Weather APIapi.weather.gov ↗
Access NOAA 7-day forecasts, active weather alerts by US state, and current station observations via the api.weather.gov API.
What is the Weather API?
This API exposes 3 endpoints covering NOAA weather data: 7-day forecasts, active alerts by US state or territory, and real-time station observations. get_forecast resolves any lat/lon pair to the NWS forecast grid and returns up to 14 half-day periods with temperature, wind speed, precipitation probability, and narrative text. get_active_alerts lists every currently active alert for a given state, and get_observations returns current conditions from the nearest reporting station.
curl -X GET 'https://api.parse.bot/scraper/5c5a7487-3def-42c5-83c2-f666cb8837fa/get_forecast?latitude=39.7456&longitude=-104.9994' \ -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 api-weather-gov-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.
"""Walkthrough: NOAA Weather SDK — bounded, re-runnable; every call capped."""
from parse_apis.api_weather_gov_api import NoaaWeather, PointNotFound
client = NoaaWeather()
# Get 7-day forecast for Denver, CO
forecast = client.forecasts.get(latitude="39.7456", longitude="-104.9994")
for period in forecast.periods[:3]:
print(period.name, period.temperature, period.temperature_unit, period.short_forecast)
# List active weather alerts for Texas
for alert in client.alerts.list(area="TX", limit=3):
print(alert.event, alert.severity, alert.area_desc)
# Get latest observation near Denver
try:
obs = client.observations.get(latitude="39.7456", longitude="-104.9994")
print(obs.station_name, obs.temperature_c, obs.text_description)
except PointNotFound as e:
print(f"point not found: {e}")
print("exercised: forecasts.get / alerts.list / observations.get")
Retrieve the 7-day weather forecast for a geographic point. Resolves the lat/lon to its NWS grid and returns up to 14 half-day forecast periods with temperature, wind, precipitation probability, and narrative text. Two upstream round-trips are made (point metadata then forecast grid); latency reflects both.
| Param | Type | Description |
|---|---|---|
| latituderequired | string | Latitude in decimal degrees (e.g. '39.7456'). |
| longituderequired | string | Longitude in decimal degrees (e.g. '-104.9994'). |
{
"type": "object",
"fields": {
"periods": "array of forecast periods (up to 14 half-day segments)",
"location": "object with latitude and longitude",
"update_time": "ISO 8601 timestamp of last forecast model update",
"generated_at": "ISO 8601 timestamp when forecast was generated"
},
"sample": {
"data": {
"periods": [
{
"name": "Today",
"number": 1,
"end_time": "2026-07-22T18:00:00-06:00",
"is_daytime": true,
"start_time": "2026-07-22T11:00:00-06:00",
"wind_speed": "6 to 9 mph",
"temperature": 96,
"short_forecast": "Mostly Sunny then Chance Showers And Thunderstorms",
"wind_direction": "N",
"temperature_unit": "F",
"detailed_forecast": "A chance of showers and thunderstorms...",
"probability_of_precipitation": 56
}
],
"location": {
"latitude": 39.7456,
"longitude": -104.9994
},
"update_time": "2026-07-22T09:06:01+00:00",
"generated_at": "2026-07-22T17:08:56+00:00"
},
"status": "success"
}
}About the Weather API
Forecast Data
get_forecast accepts latitude and longitude as decimal-degree strings and returns an array of up to 14 forecast periods covering roughly seven days. Each period includes temperature, wind speed and direction, precipitation probability, and a human-readable narrative. The response also surfaces update_time and generated_at timestamps so you can determine how fresh the model data is. Coverage is limited to US locations served by the National Weather Service grid.
Active Alerts
get_active_alerts takes a two-letter US state or territory code (e.g. TX, PR) and returns all currently active NWS alerts for that area. Each alert object includes severity, urgency, event type, an affected-area description, and actionable instructions. The total field gives the count of active alerts so you can quickly triage whether any alerts exist before iterating the array.
Current Observations
get_observations resolves a lat/lon pair to the nearest ICAO observation station and returns that station's latest reported conditions. Response fields include temperature_c, dewpoint_c, wind_speed_kmh, wind_gust_kmh, humidity, visibility_m, heat_index_c, and wind_chill_c. The station_id and station_name fields identify which physical station supplied the data, which matters when the nearest station is farther from your target point than expected.
The Weather API is a managed, monitored endpoint for api.weather.gov — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when api.weather.gov 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 api.weather.gov 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?+
- Check precipitation probability and wind forecasts before scheduling outdoor construction or field operations using
get_forecast. - Monitor active severe weather alerts by state to trigger supply-chain rerouting or warehouse preparation workflows.
- Display current temperature, wind speed, and visibility at a jobsite coordinate using
get_observations. - Track heat index values from
get_observationsto enforce OSHA heat-illness prevention protocols for field crews. - Aggregate 14-period forecast data across multiple project coordinates to build a regional weather-risk dashboard.
- Alert logistics teams when
get_active_alertsreturns high-severity events along a delivery corridor. - Combine wind gust data from
get_observationswith forecast periods to assess crane or aerial-lift operational windows.
| 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 api.weather.gov have an official public API?+
What does get_active_alerts return for a state with no current alerts?+
total of 0 and an empty alerts array. There is no error or null response — the structure is consistent regardless of alert count, so you can safely check total before iterating.How current are the observations returned by get_observations?+
timestamp field in the response tells you exactly when the observation was recorded. In rural or remote areas the nearest station may be tens of miles from your target coordinate, which can reduce relevance for hyper-local conditions.Does the API cover locations outside the United States?+
get_forecast, get_active_alerts, and get_observations — are restricted to US locations and territories served by the National Weather Service. International coordinates are not supported. You can fork this API on Parse and revise it to add endpoints backed by a global weather data source.Does the API return hourly forecast data rather than half-day periods?+
get_forecast returns up to 14 half-day periods (day and night segments). Hourly granularity is not exposed by this API. You can fork it on Parse and revise it to add an hourly forecast endpoint using the NWS hourly forecast resource.