Developers and the data API
Every page has a machine-readable twin. All endpoints are static files served with Access-Control-Allow-Origin: * and cached for 24 hours. No key, no rate limit beyond ordinary politeness.
Endpoints
| Path | What it holds |
|---|---|
/data/index.json | Every commodity with category, tier, top-3 producers, latest benchmark price and links. |
/data/commodities/{slug}.json | Full page data: production by country (latest year and series), reserves, top-15 exporters and importers per HS line, every price series with derived statistics and the last 24 months, balances, harvest calendar, and the sources with vintages. Example: /data/commodities/coffee.json. |
/data/prices/{slug}.json | The full monthly series for sources that allow redistribution (World Bank) and derived statistics for all. |
/data/prices.json | Every series' latest value and changes (the prices dashboard). |
/data/countries.json, /data/countries/{iso3}.json | The reverse index: where each country ranks in the top ten. |
/data/csv/{slug}-production.csv, -trade.csv, -prices.csv | Flat CSV downloads (only for sources whose license allows redistribution). |
/data/manifest.json | Per-source vintage, fetch time and check status. |
/commodities/{slug}.md | The page as plain Markdown, for assistants and offline reading. |
/llms.txt, /llms-full.txt | Site purpose, how to cite, and links to every page and JSON file. |
Example
curl -s https://commodityorigins.com/data/commodities/coffee.json | jq '.production.items[0].top[:3]'Shape notes
- Production values are in the
unitfield of each item (tonnes for crops and minerals, thousand barrels daily for oil, billion cubic metres for gas). - Trade values are US dollars and net weight in kilograms;
shareis percent of the world total for that HS line. - Price series carry
unit,source_id,vintageandredistribution; IMF series include statistics but not row-level data. - Every object that came from a source has
source_id; thesourcesmap on each commodity gives the license and citation for that id.
License and citation
Commodity Origins's derived tables and prose are CC BY 4.0. Upstream rows keep their own license (see Sources). Suggested citation:
Commodity Origins, "{page title}", data {vintage}, https://commodityorigins.com/{path}/ (accessed {date}). Underlying data: {source citation from the page}.Last publish: 6 September 2026.