Climate / Weather & Agriculture
Environmental data for research and agri pipelines: NOAA NWS weather
(current conditions, daily forecast, active alerts) and USDA NASS crop
prices received. Both are free public APIs — NOAA NWS needs no key at all,
and USDA NASS works keyless (an optional PRY_NASS_API_KEY unlocks full data
coverage).
What it scrapes
| Source | Data |
|---|---|
NOAA NWS API (api.weather.gov) | Current conditions, daily forecast (1–16 days), active alerts for a lat/lon point |
| USDA NASS QuickStats API | Crop prices received (e.g. wheat, corn, soybeans) by commodity and state |
Endpoints
Router: routers/climate_data.py · tag: Climate Data
| Method | Path | Summary |
|---|---|---|
| GET | /v1/climate/weather | Current weather and short-range forecast |
| GET | /v1/climate/agri | Agricultural climate indices and crop conditions |
GET /v1/climate/weather
Query params: location (city or place query, e.g. Austin, TX — alternatively
latitude + longitude), forecast_days (0–16, default 3; 0 = current only).
curl -X GET "http://localhost:8005/v1/climate/weather?location=Austin%2C+TX&forecast_days=3" \
-H "Authorization: Bearer <key>"
Response (200):
{
"success": true,
"location": "Austin, TX",
"forecast_days": 3,
"data": {
"location": {"lat": 30.2672, "lon": -97.7431, "city": "Austin", "state": "TX"},
"current": {"temp_f": 96.0, "condition": "Sunny", "wind_mph": 6.0, "humidity_pct": 38.0, "observed_at": "2026-08-16T19:00:00+00:00"},
"forecast": [
{"date": "2026-08-16", "high_f": 98, "low_f": 76, "condition": "Sunny", "precip_pct": 5},
{"date": "2026-08-17", "high_f": 99, "low_f": 77, "condition": "Sunny", "precip_pct": 0}
],
"alerts": [{"id": "...", "event": "Heat Advisory", "severity": "Moderate", "headline": "...", "effective": "...", "expires": "...", "areas": "TX"}]
}
}
GET /v1/climate/agri
Query params: commodity (e.g. wheat, corn, soybeans), region
(region code, e.g. us, br, in), limit (1–200, default 20).
curl -X GET "http://localhost:8005/v1/climate/agri?commodity=corn®ion=us&limit=3" \
-H "Authorization: Bearer <key>"
Response (200):
{
"success": true,
"commodity": "corn",
"region": "us",
"limit": 3,
"data": [
{
"commodity": "CORN",
"state": "IOWA",
"year": 2025,
"price": 4.32,
"unit": "$ / BU",
"short_desc": "CORN - PRICE RECEIVED, MEASURED IN $ / BU",
"source": "usda_nass"
}
]
}
MCP tools
The Pry MCP server exposes both endpoints as tools:
| Tool | Backing endpoint |
|---|---|
pry_weather | GET /v1/climate/weather |
pry_agri | GET /v1/climate/agri |
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "pry_weather",
"arguments": {"location": "Austin, TX", "forecast_days": 3}
}
}
Who uses this
- Research pipelines — enrich scraping jobs with environmental context (rain, wind, temperature, AQI) alongside the content they already collect.
- Agri-analytics — model crop yield risk and monitor growing regions with weather + price-received data in one call.
- Logistics / field ops — forecast windows and active alerts for a region.
Next steps
- Full endpoint reference: API Overview
- Research & Academic — papers + domain intelligence