API Hub

Developer docs

Two free JSON APIs. No key, no signup — every read endpoint is open. Data is 100% USDA; when a source can't deliver, the API says so instead of guessing.

Quickstart

Pick a base URL and fetch. Everything is GET and returns JSON.

curl "https://ag.morningbrief.link/v1/grain/prices?product=corn&geography=IL"
APIBase URLWhat it covers
Magpiehttps://ag.morningbrief.linkUSDA market data: prices, forecasts, export sales, trade flows, crop conditions
Farmlandhttps://land.morningbrief.linkUSDA land values and cash rents, all 50 states

Magpie — USDA market data

EndpointWhat you get
GET /v1/grain/pricesDaily grain bids (corn, soybeans, wheat, …) by region
GET /v1/grain/historyPrice time series for a product and region
GET /v1/livestock/pricesAuction and direct-trade livestock prices
GET /v1/dairy/pricesWeekly dairy product prices
GET /v1/fertilizer/pricesFertilizer prices (urea, ammonia, …)
GET /v1/nass/conditionWeekly crop condition ratings + good/excellent share
GET /v1/nass/progressPlanting and harvest progress by stage
GET /v1/nass/statsYields, production, acreage
GET /v1/wasde/projectionsMonthly USDA supply & demand forecasts
GET /v1/wasde/historyHow past forecasts were revised
GET /v1/esr/salesWeekly export sales contracts by country
GET /v1/esr/historyWeekly sales history
GET /v1/gats/flowsMonthly export shipments by destination
GET /v1/gats/compareContracts vs. actual shipments gap
GET /v1/weather/currentCurrent conditions for growing regions
GET /v1/weather/forecastForecast for growing regions
GET /v1/statusDataset row counts and last fetch

Every response carries a _provenance stamp: where the data came from, how often it refreshes, and the exact date it covers. Gaps are labeled, not hidden: no_data (nothing matches), source_unavailable (upstream failed), withheld (excluded by a quality check, with the reason).

Farmland — land values & cash rents

EndpointWhat you get
GET /v1/land/valuesFarmland values by state/county and year (?state=IL&year=2026)
GET /v1/land/rentsCash rents by state/county and year
GET /v1/statusDataset coverage and row counts

Source: USDA NASS. Updated once a year when NASS publishes (August).

MCP — for AI agents

Magpie speaks the Model Context Protocol. One endpoint, standard JSON-RPC:

POST https://ag.morningbrief.link/mcp
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/list"}

Protocol version 2024-11-05. Every tool result arrives in an envelope — {status, data, provenance} — so agents can tell fresh data from a gap without guessing.

26 tools

ToolWhat it does
get_grain_price / get_grain_historyGrain prices, latest or time series
get_spreadsCash price spreads
get_livestock_price / get_livestock_historyLivestock prices, latest or time series
get_dairy_priceDairy product prices
get_fertilizer_price / get_fertilizer_historyFertilizer prices, latest or time series
get_nass_stat / get_crop_statsNASS statistics (yield, production, acreage)
get_crop_condition / get_crop_progressCrop ratings and planting/harvest progress
get_wasde_projection / get_wasde_historyUSDA supply & demand forecasts
get_export_sales / get_export_sales_historyWeekly export sales by country
get_trade_flowsMonthly export shipments
compare_contracts_vs_shipmentsContracted vs. shipped gap
get_weather / get_forecastGrowing-region weather
list_grain_products, list_livestock_products, list_dairy_products, list_fertilizer_productsWhat each price dataset tracks
list_wasde_commodities, list_esr_commodities, list_gats_commoditiesWhat each trade/forecast dataset tracks

How we handle missing data

A gap is a data problem, not an excuse to guess. When a dataset has nothing to show, the API tells you which kind of gap it is:

SignalMeaning
no_dataValid question, nothing matches the filter.
source_unavailableThe USDA source (or our copy) failed right now.
withheldDeliberately excluded by a quality check — e.g. butter (USDA publishes only price differences, no base price) or rice trade flows (source unit errors). The reason ships in the response.