# R2Data2 > County-level agricultural risk data API for all ~3,100 U.S. counties. Aggregates drought, soil moisture, precipitation, vegetation index (NDVI), growing degree days, crop yields, crop progress, FEMA flood zones, and natural hazard risk scores into a single REST API. All data sourced from USDA, NASA, FEMA, and PRISM. Designed for crop insurers, agricultural lenders, and precision agriculture platforms. ## API Reference & Docs - [Interactive API Docs](https://r2data2.com/docs): Try every endpoint in-browser (Swagger UI) - [OpenAPI Spec](https://r2data2.com/openapi.json): Machine-readable OpenAPI 3.1 spec - [Data Dictionary](https://r2data2.com/data-dictionary): Field-by-field reference for every response schema - [Data Lineage](https://r2data2.com/lineage): Source provenance and ingestion cadence for every dataset - [Quickstart](https://r2data2.com/quickstart): Authentication setup and first API call ## Guides - [County-Level Drought API](https://r2data2.com/guides/drought-api): USDM D0–D4 categories, severity scores, per-band county area coverage. Updated weekly (Thursdays). Use cases: crop insurance threshold monitoring, ag lending portfolio risk. - [Soil Moisture API](https://r2data2.com/guides/soil-moisture-api): NASA SMAP L3 9km grid observations aggregated to county level via precomputed weight tables. AM/PM passes, volumetric water content. - [Precipitation API](https://r2data2.com/guides/precipitation-api): PRISM 4km daily precip, vapor pressure deficit (VPD), temperature — aggregated to county centroids. - [Growing Degree Days API](https://r2data2.com/guides/growing-degree-days-api): PRISM-derived GDD accumulation. Configurable base temperatures. Daily and cumulative seasonal totals. - [NDVI Vegetation Index API](https://r2data2.com/guides/ndvi-api): MODIS 16-day NDVI composites via NASA AppEEARS. County-level mean, min, max, and anomaly vs. historical baseline. - [Crop Stress Index Guide](https://r2data2.com/guides/crop-stress-index): Multi-signal composite score (drought + precipitation + soil moisture + NDVI anomaly). 0–100 scale. Calibrated per primary crop. - [FEMA NRI Data API](https://r2data2.com/guides/fema-nri-api): FEMA National Risk Index composite scores, expected annual loss, social vulnerability, community resilience. All 3,100+ counties. - [Agricultural Lending Guide](https://r2data2.com/guides/agricultural-lending): Workflow guide tying drought + soil moisture + crop progress into a farm loan risk monitoring pipeline. - [Crop Insurance Guide](https://r2data2.com/guides/crop-insurance): RMA loss history, NRI risk scores, USDM D2+ triggers — how crop insurers use county risk data. - [USDA NASS API Comparison](https://r2data2.com/guides/usda-nass-api): What R2Data2 adds over raw USDA NASS: REST access, structured JSON, history windows, cross-signal enrichment. ## API Signals & Endpoints - **Drought** — `/drought/county/{fips}` — Weekly USDM drought severity (D0–D4) per county. Fields: `drought_severity` (-1 to 4), `drought_category`, `d0_pct`–`d4_pct` (% county area per band), `valid_date`. - **Drought Snapshot** — `/drought/snapshot/{valid_date}` — All counties for a given USDM release date. Filter by `state` or `min_severity`. - **Drought Metrics** — `/drought/metrics/county/{fips}` — Consecutive weeks in drought, 20-year severity percentile, `drought_regime` (persistent/flash/recovering). - **Soil Moisture** — `/soil-moisture/county/{fips}` — Daily SMAP observations. Fields: `sm_mean_am`, `sm_mean_pm` (m³/m³), `obs_date`. - **Precipitation** — `/precip/county/{fips}` — Daily PRISM data. Fields: `precip_mm`, `tmax_c`, `tmin_c`, `vpd_kpa`, `obs_date`. - **Growing Degree Days** — `/gdd/county/{fips}` — Daily and cumulative GDD. Fields: `gdd_base50`, `gdd_base32`, `cum_gdd_base50` (season-to-date), `obs_date`. - **NDVI** — `/ndvi/county/{fips}` — 16-day MODIS composites. Fields: `ndvi_mean`, `ndvi_min`, `ndvi_max`, `ndvi_anomaly`, `period_start`. - **Crop Yields** — `/crops/county/{fips}` — USDA NASS annual yields. Fields: `crop`, `yield_value`, `yield_unit`, `year`. - **Crop Progress** — `/crop-progress/{state}` — Weekly USDA NASS planting/emergence/harvest progress. Fields: `commodity_name`, `stage_name`, `pct_complete`, `week_ending`. - **Flood Zones** — `/flood-zones/county/{fips}` — FEMA FIRM flood zone coverage percentages. Fields: `sfha_pct` (special flood hazard area), `zone_ae_pct`, `zone_x_pct`. - **Natural Hazard Risk (NRI)** — `/nri/county/{fips}` — FEMA NRI composite risk score, expected annual loss components (flood, drought, wind, etc.), social vulnerability index. - **Crop Insurance Losses** — `/rma/county/{fips}` — USDA RMA historical indemnity data by crop and cause of loss. - **County Summary** — `/county/{fips}/summary` — All signals for a county in a single call (costs 5 requests). - **Crop Stress Index** — `/crop-stress/county/{fips}` — Composite stress score 0–100 derived from drought, precip anomaly, soil moisture, and NDVI. Fields: `score`, `rating`, `components`, `primary_crop`. - **Portfolio** — `/portfolio` — Batch query across multiple FIPS codes (POST, costs 5 req/county). - **County Lookup** — `/counties` — Search for counties by name or state. Returns FIPS codes. ## Authentication All data endpoints require an `X-API-Key` request header. Keys follow the format `agr_<32chars>`. | Plan | Requests/day | History window | |---------|-------------|----------------| | Free | 100 | 1 year | | Starter | 2,000 | 5 years | | Growth | 15,000 | 10 years | | Pro | 50,000 | Unlimited | Get a free key (no credit card): https://r2data2.com/signup/free ## Data Sources | Signal | Source | Update cadence | |--------|--------|----------------| | Drought (D0–D4) | USDA Drought Monitor | Weekly (Thursdays) | | Precipitation & VPD | PRISM Climate Group | Daily | | Soil Moisture | NASA SMAP L3 | Daily (~3-day lag) | | Growing Degree Days | PRISM-derived | Daily | | Vegetation Index (NDVI) | MODIS via NASA AppEEARS | 16-day composites | | Crop Yields | USDA NASS QuickStats | Annual | | Crop Progress | USDA NASS | Weekly (Mondays) | | Flood Zone Coverage | FEMA FIRM | Quarterly refresh | | Natural Hazard Risk | FEMA NRI | Annual | | Crop Insurance Losses | USDA RMA | Annual | ## Optional - [Full text version (llms-full.txt)](https://r2data2.com/llms-full.txt)