Investing.com API: Get commodity prices
Gets 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.
Unofficial. Not affiliated with or endorsed by Investing.com.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Commodity optional
commodity Commodity name, such as Brent oil or gold. Leave blank for all major commodities on the page.
(default)
Input as JSON
{}Output
{ "commodity_prices": [ { "unit": "USD per barrel", "group": "energy", "change": 1.46, "day_low": 97.87, "currency": "USD", "day_high": 99.6, "commodity": "Brent Oil", "page_link": "https://www.investing.com/commodities/brent-oil" , "last_price": 99.29, "price_time": "2026-09-29T03:00:15+00:00", "change_percent": 1.49, "contract_month": "Dec 26" }, { "unit": "USD per barrel", "group": "energy", "change": 1.22, "day_low": 93.02, "currency": "USD", "day_high": 94.01, "commodity": "Crude Oil WTI", "page_link": "https://www.investing.com/commodities/crude-oil" , "last_price": 93.82, "price_time": "2026-09-29T03:00:11+00:00", "change_percent": 1.32, "contract_month": "Nov 26" }, { "unit": null, "group": "energy", "change": -1.787, "day_low": 71.65, "currency": null, "day_high": 71.775, "commodity": "Dutch TTF Natural Gas", "page_link": "https://www.investing.com/commodities/ice-dutch-ttf-gas-c1-futures" , "last_price": 71.65, "price_time": "2026-09-29T02:02:14+00:00", "change_percent": -2.43, "contract_month": "Oct 26" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"investing.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": "investing.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": "investing.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 investing.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, such as Brent oil or gold. Leave blank for all major commodities on the page." } }}Output schema
{ "type": "object", "required": [ "commodity_prices" ], "properties": { "commodity_prices": { "type": "array", "items": { "type": "object", "required": [ "commodity", "group", "contract_month", "last_price", "currency", "unit", "change", "change_percent", "day_high", "day_low", "price_time", "page_link" ], "properties": { "unit": { "type": [ "string", "null" ], "description": "Price denomination per physical unit." }, "group": { "type": "string", "description": "Energy, metals, or agriculture." }, "change": { "type": [ "number", "null" ], "description": "Change in the quoted price units." }, "day_low": { "type": [ "number", "null" ], "description": "Lowest quoted price today." }, "currency": { "type": [ "string", "null" ], "description": "Three-letter currency code for the quoted price." }, "day_high": { "type": [ "number", "null" ], "description": "Highest quoted price today." }, "commodity": { "type": "string", "description": "Commodity name as displayed on the page." }, "page_link": { "type": "string", "description": "Investing.com page for this commodity." }, "last_price": { "type": [ "number", "null" ], "description": "Last quoted price in the stated currency and unit." }, "price_time": { "type": [ "string", "null" ], "description": "Last price update time as ISO 8601 with offset." }, "change_percent": { "type": [ "number", "null" ], "description": "Percentage change in percentage points." }, "contract_month": { "type": [ "string", "null" ], "description": "Displayed futures contract month, if shown." } }, "additionalProperties": false }, "description": "Commodity prices grouped by category." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
investing.com/get_commodity_prices- Returns
- commodity, group, contract month, last price, currency, unit, change, change percent, day high/low, price time, page link
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 investing.com/get_commodity_prices with the inputs above.
Ask your agent
- What's Brent crude trading at right now, and how much has it moved today?
- Pull current futures quotes for all the major energy, metals, and agricultural commodities from investing.com
- Give me the latest gold futures price, including the contract month and today's high and low
- How are coffee and cocoa prices doing today? I need percent change and last price.
- Check investing.com for the current natural gas futures quote and the time it was last updated
See more
All Investing.com methodsGets current government bond yields from Investing.com's world government bonds table, optionally filtered by country and maturity term.
investing.com/get_bond_yieldsLists scheduled and recent economic releases from the Investing.com economic calendar for a date range (up to 31 days, default this week), countries and importance, with actual, forecast and previous values as displayed, in the requested time zone.
investing.com/get_economic_calendarGets 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.
tradingeconomics.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 the current quoted price and key figures for a stock, fund, index, or cryptocurrency on Google Finance, by name or ticker. Prices may be delayed, and figures Google does not show are null.
google.com/get_quoteLooks up a stock, fund, index, or cryptocurrency by name or ticker and returns its latest displayed price and key statistics. Unavailable figures are null; quotes may be delayed.
finance.yahoo.com/get_quoteGets the latest stock, ETF, forex or crypto quote for a symbol from Twelve Data. Some instruments do not report currency or volume; the demo key covers only a few symbols.
twelvedata.com/get_quote