Explore the API live below. Sandbox runs on a shared demo key — no sign-up, bounded to corn and the last 30 days. Liveuses your own key at your real tier (free: corn, wheat & soybean, 500 requests/day — grab one). Every endpoint authenticates with Authorization: Bearer — copy the curl to call it from your code.
Try it · Sandbox
Shared demo key, no sign-up. Bounded to corn, the last 30 days, one series per source.
Pinned in sandbox
Pinned in sandbox
Pinned in sandbox
Series Data
Historical grain price observations
/v1/series key requiredPrice series
Returns historical grain price observations from USDA AMS, FRED, and NASS. Requires an API key (`Authorization: Bearer <key>`), like every /v1 endpoint. The free tier covers corn, wheat, and soybean at 500 requests/day (keys created before 2026-08-20 keep 2,000 — check `grandfathered` on `/v1/me`).
commodityquery · requiredcorn | soybean | wheatsourcequeryAMS | FRED | NASSFilter by data source. Omit to return all sources.start_datequeryend_datequerylimitqueryas_ofqueryVintage cutoff. Returns the data as it was known on this date, using the per-row ingestion timestamp.formatqueryjson | csv`csv` returns the rows only, so the body loads directly into pandas/R/Excel. Pagination, freshness, warning severity and attribution move to `X-DataCrop-*` response headers.
curl -X GET \
"https://api.datacrop.dev/v1/series?commodity=corn&start_date=2024-01-01&end_date=2025-06-01&as_of=2026-01-15" \
-H "Authorization: Bearer YOUR_API_KEY"/v1/commodities key requiredList commodities
Returns all commodities and their free-tier availability.
curl -X GET \
"https://api.datacrop.dev/v1/commodities" \
-H "Authorization: Bearer YOUR_API_KEY"/v1/freshness/{commodity} key requiredData freshness
Returns the last ingested date and row count per source for a commodity.
commoditypath · requiredcorn | soybean | wheat
curl -X GET \
"https://api.datacrop.dev/v1/freshness/corn" \
-H "Authorization: Bearer YOUR_API_KEY"Forecasts
LightGBM price forecast bands, published up to 3 weeks ahead
/v1/forecasts key requiredPrice forecast band (up to 3 weeks)
Returns the latest LightGBM forecast band (P10/P50/P90), published up to 3 weeks ahead for a grain commodity (corn, soybean, or wheat — the series with live USDA AMS cash bids). Commodities without an AMS bid feed have price data but no forecast. Requires an API key on a Pro or higher tier — free-tier keys receive 403 `forecasts_not_included`.
commodityquery · requiredcorn | soybean | wheat
curl -X GET \
"https://api.datacrop.dev/v1/forecasts?commodity=corn" \
-H "Authorization: Bearer YOUR_API_KEY"Alerts
Price alert rule management
/v1/alerts key requiredList alert rules
Returns all active alert rules for the authenticated API key. Max+ tier required.
curl -X GET \
"https://api.datacrop.dev/v1/alerts" \
-H "Authorization: Bearer YOUR_API_KEY"/v1/alerts key requiredCreate alert rule
Creates a new price alert rule. Max+ tier required.
commoditystring · requiredsourcestring · requiredAMS | FRED | NASSthreshold_typestring · requiredabove | belowthreshold_valuenumber · requireddelivery_cadencestringdigest | immediate
curl -X POST \
"https://api.datacrop.dev/v1/alerts" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"commodity":"corn","source":"AMS","threshold_type":"above","threshold_value":5}'/v1/alerts/{id} key requiredDelete alert rule
Soft-deletes an alert rule by ID. Returns 204 No Content on success.
idpath · requiredAlert rule UUID (from the create or list response)
curl -X DELETE \
"https://api.datacrop.dev/v1/alerts/id" \
-H "Authorization: Bearer YOUR_API_KEY"Export
Bulk data export
/v1/export key requiredExport CSV
Downloads a CSV of price series data. Team+ tier required.
commodityquery · requiredsourcequery
curl -X GET \
"https://api.datacrop.dev/v1/export" \
-H "Authorization: Bearer YOUR_API_KEY"Provenance
Restatement history, normalization receipts, and redistribution terms
/v1/revisions key requiredprice restatement log
The log of value restatements. Captured at the moment a published price is overwritten — the only moment the previous value is still knowable — so the history runs forward from when tracking began and cannot be backfilled. The `coverage` block reports how far back this log actually reaches. Pro+ tier required.
commodityquery · requiredsourcequeryAMS | FRED | NASSsource_refqueryobserved_datequerysincequeryOnly restatements observed on or after this date.limitqueryoffsetquery
curl -X GET \
"https://api.datacrop.dev/v1/revisions?commodity=corn" \
-H "Authorization: Bearer YOUR_API_KEY"/v1/lineage key requiredNormalization receipt
Every filter, conversion and exclusion applied between the raw USDA response and the series you query, itemised from the same catalog files the pipeline runs on. Counts are derived at request time. Available on all tiers.
commodityquery · required
curl -X GET \
"https://api.datacrop.dev/v1/lineage?commodity=corn" \
-H "Authorization: Bearer YOUR_API_KEY"/v1/license key requiredRedistribution terms
Machine-readable provenance and redistribution terms for every upstream source, each linking the statement it summarises. Available on all tiers, including free — the redistribution question gates the decision to build on a feed at all.
sourcequeryAMS | FRED | NASSScope to specific sources. Omit for all. Repeatable.
curl -X GET \
"https://api.datacrop.dev/v1/license" \
-H "Authorization: Bearer YOUR_API_KEY"Basis
Regional cash spreads against a benchmark identifier
/v1/basis key requiredRegional cash basis
Each AMS identifier's cash spread against a benchmark identifier, in the commodity's canonical unit. Legs are unit-converted before subtraction and paired to the benchmark as-of their own observation date, because report calendars do not line up. Pro+ tier required.
commodityquery · requiredbenchmarkquerysource_ref to spread against. Defaults to the curated primary AMS identifier.windowquery30 | 60 | 90 | 180 | 365
curl -X GET \
"https://api.datacrop.dev/v1/basis?commodity=corn" \
-H "Authorization: Bearer YOUR_API_KEY"Correlations
Pairwise commodity price correlation on weekly log-returns
/v1/correlations key requiredCommodity price correlations
Pearson correlation between AMS commodity price series' weekly log-returns, not price levels, over a rolling window. Differencing to returns removes a shared trend that would otherwise make two independently-moving commodities look correlated. Every pair reports `n`, the overlapping weekly-return count (pairwise-complete, so it varies per pair); pairs below the reliability floor ship `insufficient: true` with `r`, `strength`, and `direction` null rather than an unreliable coefficient — `interpretation` explains why in plain language either way. An empty AMS window is a 404, never an empty `pairs` list (which would read as "these commodities are uncorrelated", a claim with no data behind it). Pro+ tier required.
windowquery180 | 365Rolling window in days: 180 (~6 months) or 365 (~1 year, default). Both are wide enough that a commodity pair with real overlapping AMS history can clear the reliability floor; narrower windows could not.
curl -X GET \
"https://api.datacrop.dev/v1/correlations" \
-H "Authorization: Bearer YOUR_API_KEY"