USDA NASS County Crop Yields
Free static JSON API serving USDA NASS county-level corn, soybean, and wheat yield data. Refreshed weekly from the NASS bulk file, hosted on jsDelivr. No API key. No rate limits. Public domain.
Quick lookup
One (state, county, crop, year) query is two cached fetches: a small index.json for discovery and freshness, then one tiny leaf for the actual data. The producer pre-marks the canonical series with "canonical": true, so consumer code is a one-liner.
GET https://cdn.jsdelivr.net/gh/ProductOfAmerica/usda-county-yields@main/data/index.json
GET https://cdn.jsdelivr.net/gh/ProductOfAmerica/usda-county-yields@main/data/states/{fips}/counties/{county_code}/{crop_slug}.json
Example: Story County, Iowa corn yield 2024
# curl
curl -s "https://cdn.jsdelivr.net/gh/ProductOfAmerica/usda-county-yields@main/data/states/19/counties/169/corn.json" \
| jq '.series[] | select(.canonical) | .values["2024"]'
# 215.5
# Python
import json, urllib.request
url = "https://cdn.jsdelivr.net/gh/ProductOfAmerica/usda-county-yields@main/data/states/19/counties/169/corn.json"
leaf = json.load(urllib.request.urlopen(url))
canonical = next(s for s in leaf["series"] if s.get("canonical"))
print(canonical["values"]["2024"]) # 215.5
// JavaScript (Node 18+ or any modern browser)
const url = "https://cdn.jsdelivr.net/gh/ProductOfAmerica/usda-county-yields@main/data/states/19/counties/169/corn.json";
const leaf = await fetch(url).then(r => r.json());
const canonical = leaf.series.find(s => s.canonical);
console.log(canonical.values["2024"]); // 215.5
What you get
- ~3,000 counties, 42 states with NASS coverage
- Three commodities: corn, soybeans, wheat (county-level annual SURVEY yields)
- Weekly refresh from the latest
qs.crops_*.txt.gzbulk file - Suppression codes (
D,NA,S,X,Z) preserved per the NASS Quick Stats glossary - JSON Schema 2020-12 contract at
data/_schema/leaf.json - Commit-SHA-pinned URLs (
@<sha>instead of@main) for point-in-time consistency
How it works
A weekly GitHub Actions cron downloads the NASS bulk file, filters to county-level SURVEY yields, marks the canonical series per crop, and emits a sharded JSON tree under data/. Three validation gates and three inline guards run before any commit. A separate canary workflow verifies the CDN is serving fresh data 12 hours after each refresh.
Architecture details, schema, and the rebuild path are documented in the repository README.
State-wide rollups
For batch queries (e.g., all counties for one crop in one state), use the rollup so the whole answer comes in one fetch instead of looping over leaves:
GET https://cdn.jsdelivr.net/gh/ProductOfAmerica/usda-county-yields@main/data/states/19/crops/corn.json