Access free weather forecasts, alerts, observations, and radar data from the US National Weather Service. Used in data engineering pipelines for weather-enriched analytics, emergency alert monitoring, agricultural planning dashboards, and integrating official government weather data into Python applications.
The NWS API is fully free and keyless. Engineers use `requests` with `Accept: application/geo+json` headers to query `/points/{lat},{lon}` for the forecast office and grid coordinates, then `/gridpoints/{office}/{x},{y}/forecast` for hourly forecasts.
The NWS API is ideal for grounding AI weather assistants with official US forecast data. Expose it as an MCP server endpoint so LLM agents can answer 'Is there a tornado watch near Dallas this weekend?' with real NWS alert data rather than hallucinated forecasts.
# pip install requests
import requests
# Step 1: get grid info for a lat/lon
point = requests.get("https://api.weather.gov/points/38.8977,-77.0365").json()
forecast_url = point["properties"]["forecast"]
# Step 2: fetch the 7-day forecast
forecast = requests.get(forecast_url).json()
for period in forecast["properties"]["periods"][:3]:
print(period["name"], "-", period["shortForecast"])Official dataset source
More datasets used by Python data engineers.
The Swedish government monopoly liquor store API providing product catalogues, store locations, inventory, and pricing data. Useful for practising structured API ingestion, building retail analytics pipelines, and learning how to work with government-published commercial datasets in Python.
It provides REST access to FoodData Central (FDC). It is intended primarily to assist application developers wishing to incorporate nutrient data into their applications or websites.
Access NASA's extensive collection of space data including the Astronomy Picture of the Day, Mars rover photos, near-Earth object tracking, satellite imagery, and Earth observation datasets. Commonly used in scientific data pipelines, geospatial analysis workflows, and educational data engineering projects with Python.