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.

GitHub License: MIT (code) / CC0 (data) JSON Schema

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

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