Primary-source · EIA · USDA NASS · CFTC · IMF · USGS · FAOSTAT · UN Comtrade
Primary-source commodities for agents
Inventories, cash, COT, and structure — every print labeled for freshness, quality, and source.
Works with Claude · Cursor · ChatGPT · any AI agent via MCP
GET api.commodities.sh/v1/price/CL · from $0.01 · or Pro credits
Not exchange real-time futures.
{
"id": "obs_6363a358d0f6971751334765",
"instrument": "CL",
"name": "WTI Cushing",
"value": 78.42,
"unit": "USD/bbl",
"as_of": "2026-07-09",
"freshness_class": "eod",
"quality": "official",
"derived": false,
"source": {
"name": "EIA",
"series_id": "PET.RWTC.D"
},
"license_tag": "us_gov_public",
"cite": "EIA PET.RWTC.D as of 2026-07-09 (eod, official)"
}eod·official·us_gov_public
Every field is labeled so agents know what they may cite.
Free discovery
API host api.commodities.sh·loading catalog…
Why this exists
Four joins no single agency publishes
Every number here is free at the source. What is not free anywhere is the join — a mineral's mine production against its export flows, a grower's price against the border, a report's due date against what it last printed.
Every USDA AMS state report searched by commodity in one call — something AMS itself cannot do, because each report is a separate PDF. Price and basis never share a unit, and each basis carries the futures month it was quoted against.
Who mines a mineral, who holds the reserves and who exports it — USGS Mineral Commodity Summaries joined to UN Comtrade export flows, with supply concentration and US net import reliance for nine minerals including cobalt and lithium.
When each report is due and what the last one printed, in one object instead of three calls and some arithmetic — expected publish time with a real Eastern offset, the week-on-week change and the five-year comparison.
What a grower was paid against what the crop left the country for — FAOSTAT farm-gate producer prices joined to UN Comtrade export unit values, country by country, with a grower-share figure and the concept separation stated rather than assumed.
UN Comtrade's redistribution licence is unresolved, so production serves the supply side and reports the trade side as unavailable with its reason rather than omitting it. The joins above run in full where the licence permits it.
Coverage
What you get
Government cash and fundies across energy, metals, and ags — every observation carries freshness, quality, and license tags.
Energy
WTI, Brent, nat gas, heating oil, gasoline cash — plus EIA inventories.
CL · BZ · NG · HO · RB
5 instruments
EIA
Metals
Base metals official monthly; gold, silver, platinum and iron ore monthly indicative. Mine production and reserves by country via the minerals dossier.
GC · HG · SI · PL · PA · AL · NI · ZN · IO
9 instruments
IMF · World Bank
Ags
Grains, softs, palm oil and a cash soy crush — plus WASDE, crop progress, export sales, farm-gate producer prices and cash elevator basis.
ZC · ZW · ZS · ZL · ZM · KC · CC · SB · PO · CT · ZR · LE · HE
13 instruments
IMF · USDA AMS · USDA NASS
Freshness labels
eod
End-of-day official cash
weekly
EIA / COT / USDA cadence
monthly
Decree and monthly prints
quality:derived
Crack, crush, decision packs
Payments
Pay per call with x402
Agents request, see HTTP 402 when enforce is on, pay USDC on Base, retry with proof. Soft-GO demos may leave enforce off.
01
Request
GET api.commodities.sh/v1/inventory/eia — or any paid route. No API key.
02
402
Server returns HTTP 402 with USDC payment requirements on Base.
03
Pay & retry
Settle in USDC, attach the X-PAYMENT proof header, receive the observation.
curl -i https://api.commodities.sh/v1/price/CLAPI
Endpoints that sell
Path-priced reference data. Pull what you need; leave the rest.
Weekly EIA stocks with WoW and vs-5y surprise.
$0.03 / call
3-2-1 crack from official cash legs.
$0.03 / call
Realized volatility, change, and range over stored history.
$0.02 / call
Managed-money COT nets from CFTC.
$0.02 / call
USGS Mineral Commodity Summaries — annual metals fundies.
$0.03 / call
Sector bundle: energy | metals | ags.
$0.05 / call
Deterministic decision pack for agents.
$0.10 / call
Connect
Use it in Claude and Cursor
Add the remote MCP server — or call REST with a free or Pro key.
Remote MCP
https://api.commodities.sh/api/mcp
claude mcp add --transport http commodities https://api.commodities.sh/api/mcpclaude.ai or Claude Desktop → Settings → Connectors → Add custom connector. Free tools work straight away; paid tools need a key — see /mcp.
{
"mcpServers": {
"commodities": {
"url": "https://api.commodities.sh/api/mcp"
}
}
}MCP tools
https://api.commodities.sh/api/mcp
- catalog.listEvery instrument with its unit, freshness class and source
- catalog.searchResolve a commodity name or synonym to an instrument code
- calendar.getEIA, USDA and CFTC release cadence with the next expected date
- trade.codesResolve a country to the M49 code the trade tools require
- minerals.listMineral coverage, curated HS codes and the comparability caveats
- cash.reportsWhich AMS cash grain reports exist, and how fresh each one is
- account.quotaCredits left on this key and the scopes it may read
- price.latestLatest cash or fundies print for one instrument
- price.bundleLatest prints for up to 20 instruments in one call
- price.historyStored history for one instrument
- price.statsVolatility, change and range over a window
- stats.bundleThe same statistics for up to 20 instruments at once
- fx.latestLatest FX cross rate, for converting a quote
- observation.resolveFetch one observation by its stable id, for citation
- inventory.getEIA weekly stocks with week-on-week and 5-year comparison
- positioning.getCFTC managed-money net positioning by instrument
- spread.getCrack, crush, WTI-Brent basis and calendar structure
- trade.calculateLanded cost, trade margin, break-even or an FX shock
- fundamentals.getWASDE, crop progress, export sales or the USGS summaries
- releases.nextWhen each report is due and what the last one printed
- cash.bidsCash elevator bids and basis across every AMS state report
- trade.flowBilateral trade volume and value between two countries
- trade.partnersEvery trading partner of one country, ranked by value
- trade.rankingEvery country ranked for one commodity, with unit values
- producer.pricesFAOSTAT farm-gate prices by country for one crop
- producer.prices.bundleFarm-gate prices for up to 20 crops in one call
- sourcing.compareFarm-gate against border unit value, country by country
- minerals.dossierMine production, reserves and export flows by country
- snapshot.getOne sector's prices, inventories, positioning and fundies
- decision.getRule-based signal pack with direction and rationale
Pricing
Pricing
A free key by email, USDC per call on Base, or Pro credits. Free discovery stays free.
| Endpoint | USDC |
|---|---|
| GET /v1/price/{code} | $0.01 |
| GET /v1/prices | $0.02 |
| GET /v1/history/{code} | $0.02 |
| GET /v1/trade/flows | $0.05 |
| GET /v1/trade/partners | $0.08 |
| GET /v1/trade/ranking | $0.08 |
| GET /v1/stats/{code} | $0.02 |
| GET /v1/observation/{id} | $0.01 |
| GET /v1/fx/{pair} | $0.01 |
| GET /v1/inventory/eia | $0.03 |
| GET /v1/inventory/eia/{series} | $0.02 |
| GET /v1/cot/{code} | $0.02 |
| GET /v1/spreads/crack | $0.03 |
| GET /v1/spreads/crush | $0.03 |
| GET /v1/spreads/basis | $0.03 |
| GET /v1/fundamentals/wasde | $0.03 |
| GET /v1/fundamentals/crop-progress | $0.02 |
| GET /v1/fundamentals/export-sales | $0.02 |
| GET /v1/stats | $0.04 |
| GET /v1/producer-prices | $0.06 |
| GET /v1/sourcing/{code} | $0.10 |
| GET /v1/producer-prices/{code} | $0.03 |
| GET /v1/fundamentals/usgs | $0.03 |
| GET /v1/calc/landed-cost | $0.02 |
| GET /v1/calc/trade-margin | $0.02 |
| GET /v1/calc/break-even | $0.02 |
| GET /v1/calc/fx-impact | $0.02 |
| GET /v1/snapshot/{sector} | $0.05 |
| GET /v1/decision/{sector} | $0.10 |
| GET /v1/minerals/{mineral} | $0.08 |
| GET /v1/cash-bids/grain | $0.05 |
| GET /v1/releases | $0.04 |
| GET /v1/snapshot/all | $0.12 |
| GET /v1/decision/all | $0.25 |
Free on api.commodities.sh: /health, /v1/catalog, /v1/calendar, /llms.txt, /llms-full.txt, /openapi.json, /SKILL.md, /.well-known/agent.json, /.well-known/x402.json, /terms.txt, /v1/trade/codes, /v1/search, /v1/cash-bids/reports, /v1/minerals
FAQ
Quick answers
What is commodities.sh?
commodities.sh is a primary-source commodities reference API for AI agents. It serves government cash, inventories, COT, USDA fundies, USGS minerals, and derived structure (crack, crush, basis) — each observation labeled with freshness, quality, license, and provenance. Agents discover it via llms.txt, SKILL.md, agent.json, OpenAPI, and MCP. Production traffic pays with x402 USDC on Base when enforce is on (or Pro credits).
How do agents pay?
When X402_ENFORCE is on, paid routes return HTTP 402 with USDC payment requirements on Base; the agent settles and retries with an X-PAYMENT proof header. Soft-GO demos may leave enforce off. Free discovery — catalog, calendar, llms.txt, OpenAPI, SKILL.md, and the agent card — stays free. Pro operators may use credit keys.
What does commodities.sh do that calling the agencies directly does not?
It joins them. USGS says who mines a mineral; UN Comtrade says who exports it — neither says both, and the join needs a country map because USGS publishes free-text country names with no ISO code. USDA AMS publishes cash grain bids as one PDF per state with no commodity-wide search, so one call searches every report. FAOSTAT farm-gate prices sit against Comtrade export unit values with the concepts kept separate. And the release calendar carries what each report last printed. Every underlying number is free at the source; the seam between them is the product.
Does it sell real-time futures?
No. commodities.sh does not sell real-time CME/ICE/LME exchange futures. It serves cash, inventories, COT, USDA fundies, USGS minerals, and derived structure with explicit freshness and quality labels — not exchange real-time prints.
Get started
Ship the next commodities agent
Get a free key. Wire MCP. Pay only when you outgrow it.
Does not sell real-time exchange futures. Cash, inventories, COT, USDA fundies (PSD/NASS/ESR when keyed), trade flows, farm-gate prices, cash grain basis, mineral supply, and derived structure. Base metals and softs are official monthly series from IMF and World Bank; gold, silver, platinum and iron ore stay monthly indicative (Pink Sheet). Soy crush is a cash proxy from official oil and meal legs.