REST API · JSON · Public-Source

GrainBrief API

Access latest-available grain prices, livestock margins, fertilizer costs, weather signals, freight stress, and crowdsourced elevator bids via clean JSON endpoints. Built on public source data with cadence disclosed.

Overview

The GrainBrief API is a REST API that returns JSON. Price, signal, and risk data comes from public source feeds including USDA AMS, USDA NASS, USDA FAS, CFTC, EIA, FRED (Federal Reserve Bank of St. Louis), NOAA/NWS, NASA POWER, and USGS, with refresh timing based on each source's publication cadence.

Public endpoints (marked free) require no authentication. Pro endpoints (marked pro) require a Bearer token available on paid plans.

Authentication

Pro endpoints require API key auth. Pass your key in the Authorization header: Authorization: Bearer YOUR_API_KEY

Get your API key at /auth/signup. Free accounts have read-only access to public endpoints. Pro accounts unlock 30-day history, alert webhooks, and bulk export.

Base URL

https://grainbrief.com

Live Prices free

GET /api/prices/live

Returns the most recent available value for each requested commodity or signal code. Refresh cadence depends on the source: some feeds are daily, some weekly, some monthly, and some seasonal. Regional lookup falls back to national if no state data exists.

ParameterTypeDescription
codesrequiredComma-separated commodity codes (max 20). See Commodity Codes.
regionoptionalState slug for regional lookup (e.g. iowa, kansas). Falls back to national.
Example Request
curl "https://grainbrief.com/api/prices/live?codes=FERT_UREA,NWS_FIELDWORK_IA,CPC_TEMP_610_IA,WASDE_STOCKS_USE_GRAIN_CORN,FAS_GRAIN_CORN_WEEKLY,COT_GRAIN_CORN,RIVER_STAGE_07010000®ion=iowa"
Example Response
{ "GRAIN_CORN": { "price": 4.52, "unit": "per bushel", "region": "iowa", "price_date": "2026-05-06", "label": "Corn", "source": "usda_ams" }, "GRAIN_SOY": { "price": 10.81, "unit": "per bushel", "region": "iowa", "price_date": "2026-05-06", "label": "Soybeans", "source": "usda_ams" } }

Recent Crowdsourced Bids free

GET /api/bids/recent

Returns farmer-submitted elevator cash bids. All submissions are anonymous (IP hashed). Useful for cross-referencing USDA data against real-world elevator bids.

ParameterTypeDescription
stateoptional2-letter state code (IA, IL, NE…)
commodityoptionalCommodity code (GRAIN_CORN, GRAIN_SOY…)
limitoptionalMax results (default 20, max 50)
Example Request
curl "https://grainbrief.com/api/bids/recent?state=IA&commodity=GRAIN_CORN&limit=10"
Example Response
{ "count": 3, "bids": [ { "id": "b1a2c3d4-...", "commodity_code": "GRAIN_CORN", "commodity_name": "Corn", "state": "IA", "city": "Ames", "cash_price": 4.47, "bid_date": "2026-05-07", "elevator_name": null } ] }

State Average Bids free

GET /api/bids/state-avg

Returns the average, min, and max crowdsourced elevator bid for a state+commodity over the last 14 days.

ParameterTypeDescription
staterequired2-letter state code (IA, IL, NE…)
commodityrequiredCommodity code (GRAIN_CORN, GRAIN_SOY…)
Example Request
curl "https://grainbrief.com/api/bids/state-avg?state=IA&commodity=GRAIN_CORN"
Example Response
{ "state": "IA", "commodity": "GRAIN_CORN", "avg_price": 4.49, "min_price": 4.38, "max_price": 4.61, "count": 17, "window_days": 14 }

Health Check free

GET /health

Returns platform status. Use for uptime monitoring.

Response
{ "status": "ok", "app": "grainbrief" }

Price History pro

Returns 30-day or 1-year price history for any commodity code. Requires Pro API key. Useful for trend analysis, basis tracking, and feeding your own models.

GET /api/prices/history

Requires Authorization: Bearer YOUR_KEY. Contact us for Pro access.

Commodity Codes

Grains

CodeDescriptionUnitSource
GRAIN_CORNCorn cash priceper bushelUSDA AMS
GRAIN_SOYSoybean cash priceper bushelUSDA AMS
GRAIN_WHEATWheat cash priceper bushelUSDA AMS
GRAIN_WHEAT_SRWSoft Red Winter wheatper bushelUSDA AMS
GRAIN_WHEAT_HRWHard Red Winter wheatper bushelUSDA AMS
GRAIN_SORGHUMGrain sorghum (milo)per bushelUSDA AMS

Livestock

CodeDescriptionUnitSource
LIVE_CATTLEFed cattle, 5-area weighted avgper cwtUSDA AMS MARS
FEEDER_CATTLE_700Feeder steers 700-800 lbper cwtUSDA AMS MARS
LEAN_HOGSBarrows & gilts, nationalper cwtUSDA AMS MARS
DAIRY_CLASS3Class III milkper cwtUSDA AMS NDPSR

Inputs & Energy

CodeDescriptionUnitSource
FERT_UREAUrea benchmarkper tonUSDA AMS / NASS fallback
FERT_NH3Anhydrous ammonia benchmarkper tonUSDA AMS / NASS fallback
FERT_DAPDiammonium phosphate benchmarkper tonUSDA AMS / NASS fallback
FERT_POTASHPotash benchmarkper tonUSDA AMS / NASS fallback
FUEL_DIESELRetail diesel / farm fuel pressure$/GALEIA / FRED
FUEL_PROPANERetail propane / drying fuel pressure$/GALEIA
NAT_GASHenry Hub natural gas$/MMBtuFRED MHHNGSP
CRUDE_OILWTI crude oil$/barrelFRED DCOILWTICO

Weather, Freight & Market-Risk Signals

CodeDescriptionUnitSource
NWS_FIELDWORK_IA7-day fieldwork window score for Iowa. Swap the state suffix for IL, IN, OH, MN, NE, KS, MO, ND, or SD.indexNWS forecast grid
NWS_PRECIP_IA7-day precipitation risk for Iowa. Same state suffixes as fieldwork.indexNWS forecast grid
NWS_HEAT_IA7-day heat stress risk for Iowa. Same state suffixes as fieldwork.indexNWS forecast grid
NWS_FREEZE_IA7-day freeze risk for Iowa. Same state suffixes as fieldwork.indexNWS forecast grid
CPC_TEMP_610_IANOAA 6-10 day temperature probability direction for Iowa. Use CPC_TEMP_814_IA for 8-14 day.probability direction indexNOAA CPC
CPC_PRECIP_610_IANOAA 6-10 day precipitation probability direction for Iowa. Use CPC_PRECIP_814_IA for 8-14 day.probability direction indexNOAA CPC
POWER_GDD_IA_CENTRALGrowing degree days, Central IowaGDDNASA POWER
POWER_PRECIP_IA_CENTRALDaily precipitation, Central IowammNASA POWER
POWER_WIND_IA_CENTRALWind speed, Central Iowam/sNASA POWER
RIVER_STAGE_07010000Mississippi River at St. LouisfeetUSGS Water Services
RIVER_STAGE_07032000Mississippi River at MemphisfeetUSGS Water Services
RIVER_STAGE_03611500Ohio River at MetropolisfeetUSGS Water Services
WASDE_STOCKS_USE_GRAIN_CORNMonthly corn stocks-to-use ratio. Also supports GRAIN_SOY, GRAIN_WHEAT, and GRAIN_SORGHUM.% stocks-to-useUSDA WASDE / PSD
FAS_GRAIN_CORN_WEEKLYWeekly export sales volume. Also supports GRAIN_SOY, GRAIN_WHEAT, GRAIN_SORGHUM, SOY_MEAL, and COTTON.metric tonsUSDA FAS
FAS_GRAIN_CORN_PACEExport-sales pace pressure signal for corn. Same commodity suffixes as weekly export sales.indexUSDA FAS
COT_GRAIN_CORNCFTC net managed-money position for corn. Also supports grain, soybean product, natural gas, and fertilizer-linked contracts where available.contracts (net)CFTC COT

Data Sources

SourceDataCadence
USDA AMS MARS APIGrain elevator bids, livestock prices, dairyDaily 06:00 UTC
USDA NASS QuickStatsCrop progress, prices received, planted acresWeekly Monday
USDA FAS Export SalesWeekly export commitments by commodityThursday 08:30 ET
CFTC COTManaged money positioning in ZC, ZS, ZW, ZL, ZMFriday 15:30 ET
FRED (St. Louis Fed)Fertilizer PPI, WTI crude, diesel, natural gasDaily 06:00 UTC
EIA Open DataEthanol production, diesel retail pricesWeekly
NASA POWERTemperature, precipitation, wind, GDD fieldwork signalsDaily, newest valid observation
USGS Water ServicesRiver stage for freight and barge corridor stressHourly/Daily by gauge
Crowdsourced bidsFarmer-submitted elevator cash bids (anonymous)Real-time

Rate Limits

TierLimitHistory
Free (public endpoints)60 req/min per IPNone (today only)
Pro ($49/mo)600 req/min30 days
Enterprise (custom)UnlimitedFull history + bulk export

Exceeding free limits returns 429 Too Many Requests. Pro API keys bypass IP-level limits.

Need Pro or Enterprise Access?

30-day price history, alert webhooks, bulk CSV export, and dedicated support.

Get API Access →