Back to docs|

API Sandbox

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

GET/v1/series key required

Price 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`).

Parameters
  • commodityquery · requiredcorn | soybean | wheat
  • sourcequeryAMS | FRED | NASSFilter by data source. Omit to return all sources.
  • start_datequery
  • end_datequery
  • limitquery
  • as_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.
Example request
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"
GET/v1/commodities key required

List commodities

Returns all commodities and their free-tier availability.

Example request
curl -X GET \
  "https://api.datacrop.dev/v1/commodities" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/v1/freshness/{commodity} key required

Data freshness

Returns the last ingested date and row count per source for a commodity.

Parameters
  • commoditypath · requiredcorn | soybean | wheat
Example request
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

GET/v1/forecasts key required

Price 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`.

Parameters
  • commodityquery · requiredcorn | soybean | wheat
Example request
curl -X GET \
  "https://api.datacrop.dev/v1/forecasts?commodity=corn" \
  -H "Authorization: Bearer YOUR_API_KEY"

Alerts

Price alert rule management

GET/v1/alerts key required

List alert rules

Returns all active alert rules for the authenticated API key. Max+ tier required.

Example request
curl -X GET \
  "https://api.datacrop.dev/v1/alerts" \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/v1/alerts key required

Create alert rule

Creates a new price alert rule. Max+ tier required.

Body (JSON)
  • commoditystring · required
  • sourcestring · requiredAMS | FRED | NASS
  • threshold_typestring · requiredabove | below
  • threshold_valuenumber · required
  • delivery_cadencestringdigest | immediate
Example request
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}'
DELETE/v1/alerts/{id} key required

Delete alert rule

Soft-deletes an alert rule by ID. Returns 204 No Content on success.

Parameters
  • idpath · requiredAlert rule UUID (from the create or list response)
Example request
curl -X DELETE \
  "https://api.datacrop.dev/v1/alerts/id" \
  -H "Authorization: Bearer YOUR_API_KEY"

Export

Bulk data export

GET/v1/export key required

Export CSV

Downloads a CSV of price series data. Team+ tier required.

Parameters
  • commodityquery · required
  • sourcequery
Example request
curl -X GET \
  "https://api.datacrop.dev/v1/export" \
  -H "Authorization: Bearer YOUR_API_KEY"

Provenance

Restatement history, normalization receipts, and redistribution terms

GET/v1/revisions key required

price 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.

Parameters
  • commodityquery · required
  • sourcequeryAMS | FRED | NASS
  • source_refquery
  • observed_datequery
  • sincequeryOnly restatements observed on or after this date.
  • limitquery
  • offsetquery
Example request
curl -X GET \
  "https://api.datacrop.dev/v1/revisions?commodity=corn" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/v1/lineage key required

Normalization 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.

Parameters
  • commodityquery · required
Example request
curl -X GET \
  "https://api.datacrop.dev/v1/lineage?commodity=corn" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/v1/license key required

Redistribution 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.

Parameters
  • sourcequeryAMS | FRED | NASSScope to specific sources. Omit for all. Repeatable.
Example request
curl -X GET \
  "https://api.datacrop.dev/v1/license" \
  -H "Authorization: Bearer YOUR_API_KEY"

Basis

Regional cash spreads against a benchmark identifier

GET/v1/basis key required

Regional 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.

Parameters
  • commodityquery · required
  • benchmarkquerysource_ref to spread against. Defaults to the curated primary AMS identifier.
  • windowquery30 | 60 | 90 | 180 | 365
Example request
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

GET/v1/correlations key required

Commodity 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.

Parameters
  • 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.
Example request
curl -X GET \
  "https://api.datacrop.dev/v1/correlations" \
  -H "Authorization: Bearer YOUR_API_KEY"