Trading Economics API: Get commodity prices
Gets current commodity prices and price movements from the Trading Economics commodities page, in the page's group order; filter by a commodity name, slug, symbol or group (e.g. copper, energy), or leave blank for all groups including Electricity.
Unofficial. Not affiliated with or endorsed by Trading Economics.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Commodity optional
commodity Commodity name or group to return, for example "copper", "crude oil", "wheat", or "metals". Leave blank for all groups.
(default)
Input as JSON
{}Output
{ "commodities": [ { "unit": "USD per barrel", "group": "Energy", "price": 93.978, "page_url": "https://tradingeconomics.com/commodity/crude-oil" , "commodity": "Crude Oil", "price_date": "2026-09-29", "daily_change": 1.3778, "daily_percent": 1.49, "weekly_percent": 3.8199, "yearly_percent": 50.6779, "monthly_percent": 9.5823, "year_to_date_percent": 63.6674 }, { "unit": "USD per barrel", "group": "Energy", "price": 106.942, "page_url": "https://tradingeconomics.com/commodity/brent-crude-oil" , "commodity": "Brent", "price_date": "2026-09-29", "daily_change": 1.6624, "daily_percent": 1.58, "weekly_percent": 7.7505, "yearly_percent": 61.9603, "monthly_percent": 18.1815, "year_to_date_percent": 75.7476 }, { "unit": "USD per million British thermal units", "group": "Energy", "price": 3.1377, "page_url": "https://tradingeconomics.com/commodity/natural-gas" , "commodity": "Natural gas", "price_date": "2026-09-29", "daily_change": 0.0317, "daily_percent": 1.02, "weekly_percent": 5.8246, "yearly_percent": -5.0045, "monthly_percent": 6.9063, "year_to_date_percent": -14.8752 } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"tradingeconomics.com/get_commodity_prices","input":{}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "tradingeconomics.com/get_commodity_prices" , "input": {}})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "tradingeconomics.com/get_commodity_prices" , "input": {} }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run tradingeconomics.com/get_commodity_prices# with {}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "properties": { "commodity": { "type": "string", "default": "", "description": "Commodity name or group to return, for example \"copper\", \"crude oil\", \"wheat\", or \"metals\". Leave blank for all groups." } }}Output schema
{ "type": "object", "required": [ "commodities" ], "properties": { "commodities": { "type": "array", "items": { "type": "object", "required": [ "commodity", "group", "price", "unit", "daily_change", "daily_percent", "weekly_percent", "monthly_percent", "year_to_date_percent", "yearly_percent", "price_date", "page_url" ], "properties": { "unit": { "type": [ "string", "null" ] }, "group": { "type": "string" }, "price": { "type": [ "number", "null" ] }, "page_url": { "type": "string", "format": "uri" }, "commodity": { "type": "string" }, "price_date": { "type": [ "string", "null" ], "format": "date" }, "daily_change": { "type": [ "number", "null" ] }, "daily_percent": { "type": [ "number", "null" ] }, "weekly_percent": { "type": [ "number", "null" ] }, "yearly_percent": { "type": [ "number", "null" ] }, "monthly_percent": { "type": [ "number", "null" ] }, "year_to_date_percent": { "type": [ "number", "null" ] } }, "additionalProperties": false } } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
tradingeconomics.com/get_commodity_prices- Returns
- commodity, group, price, unit, daily change, daily/weekly/monthly/YTD/yearly percent, price date, page URL
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method tradingeconomics.com/get_commodity_prices with the inputs above.
Ask your agent
- What's the current price of copper and how much has it moved this week and year-to-date?
- Pull the latest energy commodity prices from tradingeconomics.com, including Brent, WTI and natural gas with their daily percent changes
- Show me today's wheat price per bushel along with its monthly and yearly performance
- I need a full snapshot of all commodity groups on Trading Economics right now, electricity included
- How are gold, silver and the other metals doing today? Give me prices, units and daily changes.
See more
All Trading Economics methodsReturns seven key economic indicators for a country from its public Trading Economics overview: GDP growth rate, inflation rate, interest rate, unemployment rate, government debt to GDP, currency and stock market. Indicators absent from the overview are null; the US dollar index is not reported as a USD exchange rate.
tradingeconomics.com/get_country_overviewCompares the latest reported value of an economic indicator across countries in a region, highest first. World includes all listed countries; Australia uses the Oceania region.
tradingeconomics.com/list_countries_by_indicatorGets current quoted prices for energy, metals, and agricultural commodities from Investing.com's real-time futures page, optionally for one commodity. Some quotes may be delayed or indicative; units are null when the contract specification is missing.
investing.com/get_commodity_pricesGets decades of yearly commodity or stock-index price history from Macrotrends: yearly average, open, high, low, close, annual change and inflation-adjusted value for gold, silver, crude oil, natural gas, copper, Dow Jones, S&P 500 and Nasdaq. The current year may be incomplete.
macrotrends.net/get_long_term_price_historyGets Kitco spot bid, ask, daily change and range for gold, silver, platinum or palladium. Non-USD prices use Kitco's current exchange rate, so converted daily changes are not adjusted for exchange-rate moves since the prior close.
kitco.com/get_precious_metal_pricesGets a state's latest monthly electricity price for a customer type from EIA. It also returns the year-over-year change, the year-to-date average and the matching US average.
eia.gov/get_electricity_pricesGets a Binance spot pair's latest price and rolling 24-hour trading statistics from a coin name or symbol. Only currently trading pairs are available.
binance.com/get_coin_priceGets a cryptocurrency's price, changes, supply, market cap, volume and all-time high in a chosen currency. If a name or symbol is shared, returns the coin with the largest market cap.
coinmarketcap.com/get_coin_price