- Home
- Skills
- APIs & Backend
- Weather Gov
Weather Gov
Technical reference for US National Weather Service API integration including gridpoint lookups and active alerts.
$9
Weather Gov
Example session with this skill installed
Show me how to get a 7-day forecast for a specific lat/lon coordinate using the weather.gov API and what the caching rules are.
- Read your context and instructions
- Compiled the weather gov
To get a forecast for a specific location, you must first resolve the coordinates to an NWS gridpoint before calling the forecast endpoint.
Weather.gov Implementation Guide
| Task | Endpoint Pattern | Cache TTL |
|---|---|---|
| 1. Metadata Lookup | GET /points/{lat},{lon} | 60 minutes |
| 2. Active Alerts | GET /alerts/active?point={lat},{lon} | 5 minutes |
| 3. Grid Forecast | GET /gridpoints/{office}/{gridX},{gridY}/forecast | 30 minutes |
Implementation Example (Node.js)
// Step 1: Get the grid metadata
const pointRes = await fetch('https://api.weather.gov/points/40.7128,-74.0060');
const pointData = await pointRes.json();
// Extract office and grid coordinates
const { gridId, gridX, gridY } = pointData.properties;
// Step 2: Get the 7-day forecast
const forecastUrl = `https://api.weather.gov/gridpoints/${gridId}/${gridX},${gridY}/forecast`;
const forecastRes = await fetch(forecastUrl, {
headers: { 'User-Agent': '(myweatherapp.com, contact@example.com)' }
});
const forecastData = await forecastRes.json();
console.log(forecastData.properties.periods);
Next steps
- Implement a caching layer using the 30-minute TTL hint for gridpoint forecasts.
- Add a User-Agent header to your requests as required by NWS "polite use" policy.
- Add a check for empty arrays in the
/alertsresponse to handle "no active alerts" states.
Connects securely to your tools. The creator never sees your data.
About this skill
Integrating public weather data into an application often involves navigating inconsistent endpoints and cryptic grid coordinates. This skill provides a technical reference for the US National Weather Service (api.weather.gov) API to ensure accurate data retrieval.
What it does
- Coordinate Mapping provides the specific gridpoint metadata required for location-based forecast queries.
- Alert Monitoring retrieves active weather warnings and alerts filtered by geographic coordinates.
- Forecast Extraction fetches detailed 7-day weather forecasts using NWS office and grid identifiers.
- Rate Management implements patterns for handling public-sector API rate limits and 429 status codes.
- Cache Optimization applies specific TTL hints for different data types to reduce redundant API calls.
How it works
- Resolve Coordinates by querying the points endpoint with latitude and longitude to find the local weather office and grid X/Y.
- Retrieve Forecasts using the resolved office and grid values to access the 7-day forecast data.
- Check Active Alerts to pull real-time weather warnings for specific geographic areas.
- Normalize Response by handling empty arrays and public-data formats before passing data to your application.
Frameworks & tools
This skill focuses on the api.weather.gov REST API. It is compatible with any stack capable of making HTTP requests, such as Node.js, Python, or Go.
Why this beats prompting it yourself
Generic prompts often hallucinate the correct URL structure for NWS gridpoints or ignore the required metadata step. This skill enforces the exact three-step lookup pattern needed to get valid forecast data without trial-and-error.
Use cases
- Build a weather alert system that triggers notifications based on active NWS warnings.
- Integrate hyper-local 7-day forecasts into a dashboard using latitude and longitude.
- Scaffolding a backend service that caches NWS metadata to minimize external API latency.
Known limitations
Coverage is limited to what the upstream NWS API exposes. You must discover jurisdiction-specific identifiers like FIPS codes via catalog endpoints for certain queries.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
Permissions
What's inside
Frequently Asked Questions
New in APIs & Backend
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.