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.
Usage
These are plain static files on Cloudflare's CDN, not a metered API: there is no per-key quota and no throttling beyond what Cloudflare applies to any request pattern that looks abusive. Fetch a file once and cache it yourself rather than polling; every source updates at most monthly (see data status for each source's cadence), so polling more often than that returns the same bytes. A crawler pulling many files in a short burst should add a short delay between requests. If you build something that depends on this data at volume, a link back or a note in the contact form is appreciated but not required by the license.
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. |
/data-updates.xml | RSS: new data vintages as they publish. |
/movers.xml | RSS: benchmark series that moved 8% or more on the month, regenerated with every publish. |
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: 17 September 2026.