Docs
Quickstart
Get from zero to a labeled observation on commodities.sh in a few minutes. Marketing, REST, MCP, and discovery all share one host: https://api.commodities.sh.
Base URL
All REST, MCP, and discovery routes are served from:
https://api.commodities.sh
Free call — catalog
No payment, no key. Returns instruments, inventory series, and pricing.
curl -s https://api.commodities.sh/v1/catalog | jq '.instruments | length'Shape: { service, phase, instruments[], inventory_series, pricing_usd, claims }
Full walkthrough: Getting started →
Observation contract
Every paid response is an Observation. Honesty fields are required — not optional marketing fluff.
freshness_classeod | weekly | monthly | decree | …qualityofficial | indicative | derived | delayedlicense_tagRedistribution posture (us_gov_public, us_fed_public, …)source{ name, series_id, url }provenanceretrieved_at, cache_hit, cache_ttl_spriorOptional previous print (price.latest enrichment)pct_changeOptional % change vs priorshort_historyOptional newest-first ≤8 { as_of, value }citeOptional one-line agent citation
See observation contract and claims for what commodities.sh does and does not sell.
Paid call (x402)
Request a price. When enforce is on, expect HTTP 402, settle USDC on Base, retry with X-PAYMENT. Soft-GO demos may leave enforce off so the body returns without payment.
curl -i https://api.commodities.sh/v1/price/CL
# → HTTP 402 Payment Required (when X402_ENFORCE=true)
# Settle USDC on Base, retry with X-PAYMENTSample 402 body
{
"x402Version": 2,
"error": "PAYMENT_REQUIRED",
"accepts": [{
"scheme": "exact",
"network": "eip155:8453",
"maxAmountRequired": "10000",
"resource": "/v1/price/CL",
"description": "commodities.sh price"
}]
}Retry: same URL + header X-PAYMENT: <proof>. Details: Authentication →
What you can ask for that one agency cannot answer
Each of these joins two agencies. The underlying numbers are free at the source; the join is the work.
GET /v1/cash-bids/grain
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.
GET /v1/minerals/copper
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.
GET /v1/releases
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.
GET /v1/sourcing/CC
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.
Every route, with prices: API reference →
Connect MCP
Point your MCP host at the absolute HTTP endpoint on commodities.sh.
{
"mcpServers": {
"commodities": {
"url": "https://api.commodities.sh/api/mcp"
}
}
}Agent discovery stack: Agents guide →
Discovery index
Free surfaces agents and humans can scrape without paying — same host as the API.
- https://api.commodities.sh/llms.txt— Agent briefing
- https://api.commodities.sh/v1/catalog— Instruments JSON
- https://api.commodities.sh/openapi.json— Spec
- https://api.commodities.sh/SKILL.md— Agent skill
- https://api.commodities.sh/.well-known/agent.json— A2A
- https://api.commodities.sh/api/mcp— Tools
- https://api.commodities.sh/llms-full.txt— Full instrument + price dump
- https://api.commodities.sh/health— Status
Postman: browse the published collection , or File → Import → Link with https://api.commodities.sh/postman-collection.json. Ready to run against production out of the box — override the collection's base_url variable to point at https://api.commodities.sh instead.
Claims / placeholders
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.