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"| API | Base URL | What it covers |
|---|---|---|
| Magpie | https://ag.morningbrief.link | USDA market data: prices, forecasts, export sales, trade flows, crop conditions |
| Farmland | https://land.morningbrief.link | USDA land values and cash rents, all 50 states |
Magpie — USDA market data
| Endpoint | What you get |
|---|---|
GET /v1/grain/prices | Daily grain bids (corn, soybeans, wheat, …) by region |
GET /v1/grain/history | Price time series for a product and region |
GET /v1/livestock/prices | Auction and direct-trade livestock prices |
GET /v1/dairy/prices | Weekly dairy product prices |
GET /v1/fertilizer/prices | Fertilizer prices (urea, ammonia, …) |
GET /v1/nass/condition | Weekly crop condition ratings + good/excellent share |
GET /v1/nass/progress | Planting and harvest progress by stage |
GET /v1/nass/stats | Yields, production, acreage |
GET /v1/wasde/projections | Monthly USDA supply & demand forecasts |
GET /v1/wasde/history | How past forecasts were revised |
GET /v1/esr/sales | Weekly export sales contracts by country |
GET /v1/esr/history | Weekly sales history |
GET /v1/gats/flows | Monthly export shipments by destination |
GET /v1/gats/compare | Contracts vs. actual shipments gap |
GET /v1/weather/current | Current conditions for growing regions |
GET /v1/weather/forecast | Forecast for growing regions |
GET /v1/status | Dataset 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
| Endpoint | What you get |
|---|---|
GET /v1/land/values | Farmland values by state/county and year (?state=IL&year=2026) |
GET /v1/land/rents | Cash rents by state/county and year |
GET /v1/status | Dataset 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
| Tool | What it does |
|---|---|
get_grain_price / get_grain_history | Grain prices, latest or time series |
get_spreads | Cash price spreads |
get_livestock_price / get_livestock_history | Livestock prices, latest or time series |
get_dairy_price | Dairy product prices |
get_fertilizer_price / get_fertilizer_history | Fertilizer prices, latest or time series |
get_nass_stat / get_crop_stats | NASS statistics (yield, production, acreage) |
get_crop_condition / get_crop_progress | Crop ratings and planting/harvest progress |
get_wasde_projection / get_wasde_history | USDA supply & demand forecasts |
get_export_sales / get_export_sales_history | Weekly export sales by country |
get_trade_flows | Monthly export shipments |
compare_contracts_vs_shipments | Contracted vs. shipped gap |
get_weather / get_forecast | Growing-region weather |
list_grain_products, list_livestock_products, list_dairy_products, list_fertilizer_products | What each price dataset tracks |
list_wasde_commodities, list_esr_commodities, list_gats_commodities | What 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:
| Signal | Meaning |
|---|---|
no_data | Valid question, nothing matches the filter. |
source_unavailable | The USDA source (or our copy) failed right now. |
withheld | Deliberately 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. |