NWS Hourly Forecast API
Get NWS Hourly Forecast data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Nws, configure supported query parameters and filters, and retrieve structured data including forecast generation time, source update time, forecast-period start, forecast-period end, and forecast temperature to build an hourly weather view, support local planning, and show forecast freshness.
- Selected price
- $0 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 3Selected implementation · last 30 days
- Success rate · 30d
- 100.00%Selected implementation · last 30 days
NWS Hourly Forecast API
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- Pricing
On this page
Overview
NWS Hourly Forecast API
Put office and grid into the endpoint path, with grid encoded as one comma-separated coordinate segment. Forecast periods are listed in properties.periods, while response metadata identifies generation time, update time and units.
Quick Facts
| Fact | Value |
|---|---|
| Access | OpenAny REST |
| Authentication | OpenAny API key in the Authorization header |
| Core inputs | Required path: office (for example LWX) and grid (for example 97,71). |
| Selected implementation | nws · NWS US Hourly Weather Forecast |
| Billing | See the pricing area for the selected implementation and request options |
What You Can Build
- Build an hourly weather view: Arrange periods by startTime and show temperature with its unit.
- Support local planning: Combine wind and precipitation forecasts for the selected grid.
- Show forecast freshness: Display update and generation timestamps separately from predicted period times.
Returned Data
| Field | Meaning |
|---|---|
properties.generatedAt |
Forecast generation time |
properties.updateTime |
Source update time |
properties.periods[].startTime |
Forecast-period start |
properties.periods[].endTime |
Forecast-period end |
properties.periods[].temperature |
Forecast temperature |
properties.periods[].temperatureUnit |
Temperature unit |
properties.periods[].windSpeed |
Wind speed as reported text |
properties.periods[].probabilityOfPrecipitation |
Probability value and unit object |
properties.periods[].shortForecast |
Short forecast description |
Quick Start
- Set OPENANY_API_KEY to your OpenAny API key.
- Review the selected implementation and pricing, then adapt the request below to your target.
- Check the HTTP response and business result before reading optional fields.
curl --request GET --get \
https://api.openany.si/v1/agent-apis/nws/hourly/LWX/97,71 \
-H "Authorization: Bearer ${OPENANY_API_KEY}"
Request and Response Examples
The response example is a documentation reference and may be abbreviated. The request below is a calling template; use the published contract and returned response for the selected implementation.
Published NWS Hourly Forecast API implementation contract.
Pricing and Billing
The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.
Frequently Asked Questions
Related APIs
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
nwsCurrent NWS Hourly Forecast API · GET · View API reference | $0 / call | 3 | 100.00%successP50492ms |
- Unit price
- $0
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 5. Price update time: not supplied.
Total $0
API
- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/nws/hourly/{office}/{grid}- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
grid | URL path parameterspath | string | Yes | Grid coordinates as one comma-separated path segment, such as 97,71. minLength: 1 · maxLength: 16 |
office | URL path parameterspath | string | Yes | NWS forecast office identifier, such as LWX. minLength: 1 · maxLength: 3 |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
@context(string | object)[]@versionstring@vocabstringgeostringunitstringwxstring
geometryobjectcoordinatesnumber[][][]typestring
propertiesobjectelevationobjectunitCodestringvaluenumber
forecastGeneratorstringgeneratedAtstringperiodsobject[]detailedForecaststringdewpointobjectunitCodestringvaluenumber
endTimestringiconstringisDaytimebooleannamestringnumberintegerprobabilityOfPrecipitationobjectunitCodestringvalueinteger
relativeHumidityobjectunitCodestringvalueinteger
shortForecaststringstartTimestringtemperatureintegertemperatureTrendnulltemperatureUnitstringwindDirectionstringwindSpeedstring
unitsstringupdateTimestringvalidTimesstring
typestring
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Documentation example (source abbreviated)
Published documentation example. Verify the actual response after an approved call.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 2
Review these request fields before running. Keep the published provider and request method unchanged.
grid- Grid coordinates as one comma-separated path segment, such as 97,71.
office- NWS forecast office identifier, such as LWX.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/nws/hourly/LWX/97%2C71' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Sample response · Documented HTTP 200
Sample response{ "@context": [ "https://geojson.org/geojson-ld/geojson-context.jsonld", { "@version": "1.1", "@vocab": "https://api.weather.gov/ontology#", "geo": "http://www.opengis.net/ont/geosparql#", "unit": "http://codes.wmo.int/common/unit/", "wx": "https://api.weather.gov/ontology#" } ], "geometry": { "coordinates": [ [ [ -77.0125, 38.8759 ], [ -77.0088, 38.8979 ], [ -77.037, 38.9008 ], [ -77.0408, 38.8788 ], [ -77.0125, 38.8759 ] ] ], "type": "Polygon" }, "properties": { "elevation": { "unitCode": "wmoUnit:m", "value": 6.096 }, "forecastGenerator": "HourlyForecastGenerator", "generatedAt": "2026-11-03T14:37:44+00:00", "periods": [ { "detailedForecast": "", "dewpoint": { "unitCode": "wmoUnit:degC", "value": 10 }, "endTime": "2026-11-03T10:00:00-05:00", "icon": "https://api.weather.gov/icons/land/day/sct?size=small", "isDaytime": true, "name": "", "number": 1, "probabilityOfPrecipitation": { "unitCode": "wmoUnit:percent", "value": 1 }, "relativeHumidity": { "unitCode": "wmoUnit:percent", "value": 80 }, "shortForecast": "Mostly Sunny", "startTime": "2026-11-03T09:00:00-05:00", "temperature": 56, "temperatureTrend": null, "temperatureUnit": "F", "windDirection": "S", "windSpeed": "3 mph" }, { "detailedForecast": "", "dewpoint": { "unitCode": "wmoUnit:degC", "value": 10.555555555555555 }, "endTime": "2026-11-03T11:00:00-05:00", "icon": "https://api.weather.gov/icons/land/day/few?size=small", "isDaytime": true, "name": "", "number": 2, "probabilityOfPrecipitation": { "unitCode": "wmoUnit:percent", "value": 2 }, "relativeHumidity": { "unitCode": "wmoUnit:percent", "value": 70 }, "shortForecast": "Sunny", "startTime": "2026-11-03T10:00:00-05:00", "temperature": 61, "temperatureTrend": null, "temperatureUnit": "F", "windDirection": "S", "windSpeed": "5 mph" } ], "units": "us", "updateTime": "2026-11-03T11:53:28+00:00", "validTimes": "2026-11-03T05:00:00+00:00/P7DT20H" }, "type": "Feature" }