Weather forecasts

National Weather Service API

by weather.gov

Weather forecasts Added on February 4th, 2011 Checked and working on November 1st, 2026
Visit weather.gov →

What it does

The National Weather Service API (api.weather.gov) gives official US weather data: forecasts for any point in 12-hour and hourly periods, active weather alerts, observations from weather stations, and the forecast grids behind them. Responses are JSON and GeoJSON. Free and no key needed; send a User-Agent that identifies your app. It replaces the old NDFD XML/SOAP service and covers the United States only.
  • API
  • HTTP-GET
  • JSON
  • REST

At a glance

API key
Not needed · More APIs with no key
Pricing
Free and no key needed; send a User-Agent that identifies your app.
From the browser
Yes (CORS)
Formats
JSON
Interface
REST, HTTP-GET
Provider
weather.gov
Last checked
Working on November 1st, 2026

More information: https://www.weather.gov/documentation/services-web-api

Compare: Open-Meteo vs National Weather Service API

Used in: Build a weather widget with free APIs

Is this your service? Show that it is listed

Put this badge on your website or in your README; it links to this page. About the badge

Listed on Free Web Services

weather.gov
National Weather Service API

Example request

curl

curl 'https://api.weather.gov/points/38.8894,-77.0352'

JavaScript

const response = await fetch("https://api.weather.gov/points/38.8894,-77.0352");
const data = await response.json();
console.log(data);

Python

import requests

response = requests.get(
    "https://api.weather.gov/points/38.8894,-77.0352",
    timeout=30,
)
print(response.json())

The JavaScript works in a web page as well as in Node.js 18 or newer.

Did it work for you?

Tell us what you found when you tried National Weather Service API.