Commodity Prices API provides real-time and historical commodity prices in JSON format for developers, analytics tools and financial applications.
Access commodity market data including precious metals, industrial metals, energy products and agricultural commodities through a simple REST API.
| Category | Examples |
|---|---|
| Precious Metals | Gold, Silver |
| Industrial Metals | Copper, Aluminum, Lithium and more |
| Energy | Crude Oil, Natural Gas |
| Agriculture | Corn, Wheat, Coffee and more |
The Commodities Price API by Fin2Dev provides real-time and historical commodity market data in JSON format.
Retrieve commodity prices, daily changes, weekly performance, monthly performance and historical trend information for precious metals, industrial metals, energy products and agricultural commodities.
https://apidata.fin2dev.com/v1/commodities?key={YOUR_API_KEY}&commodity_name={COMMODITY_NAME}
| Name | Type | Description |
|---|---|---|
| key * | string (query) | Your API key |
| commodity_name * | string (query) | Commodity name to retrieve price data |
https://apidata.fin2dev.com/v1/commodities?key=YOUR_API_KEY&commodity_name=crude_oil
{
"result": {
"output": [
{
"commodity_name": "crude oil",
"commodity_unit": "usd/bbl",
"commodity_price": "63.72",
"price_change_day": "-1.08",
"percentage_day": "-1.67%",
"percentage_week": "3.14%",
"percentage_month": "-4.50%",
"percentage_year": "-15.65%",
"quarter3_25": "65.647",
"quarter4_25": "67.644",
"quarter1_26": "63.848",
"datetime": "2025-08-26T11:23:00.000"
}
]
}
}Try the Commodity Prices API directly in your browser.
π Try Commodity Prices API Demo
Enter your API key, select a commodity and instantly view the JSON response.
Gold Price API Example
Get real-time and historical gold price data in JSON format.
Example Request
https://apidata.fin2dev.com/v1/commodities?key=YOUR_API_KEY&commodity_name=gold
Example Response
{
"result": {
"output": [
{
"commodity_name": "gold",
"commodity_unit": "usd/t oz",
"commodity_price": "3367.12",
"price_change_day": "12.45",
"percentage_day": "0.37%",
"datetime": "2025-08-26T11:23:00.000"
}
]
}
}Learn more: Gold Price API
Silver Price API Example
Get silver price data for financial dashboards, market analysis and commodity tracking tools.
Example Request
https://apidata.fin2dev.com/v1/commodities?key=YOUR_API_KEY&commodity_name=silver
Example Response
{
"result": {
"output": [
{
"commodity_name": "silver",
"commodity_unit": "usd/t oz",
"commodity_price": "34.90",
"price_change_day": "0.21",
"percentage_day": "0.61%",
"datetime": "2025-08-26T11:23:00.000"
}
]
}
}Learn more: Silver Price API
Oil Price API Example
Get crude oil price data including price changes and market performance indicators.
Example Request
https://apidata.fin2dev.com/v1/commodities?key=YOUR_API_KEY&commodity_name=crude_oil
Example Response
{
"result": {
"output": [
{
"commodity_name": "crude oil",
"commodity_unit": "usd/bbl",
"commodity_price": "63.72",
"price_change_day": "-1.08",
"percentage_day": "-1.67%",
"datetime": "2025-08-26T11:23:00.000"
}
]
}
}Learn more: Oil Price API
Natural Gas Price API Example
Get natural gas price data for energy market applications and analytics tools.
Example Request
https://apidata.fin2dev.com/v1/commodities?key=YOUR_API_KEY&commodity_name=natural_gas
Example Response
{
"result": {
"output": [
{
"commodity_name": "natural gas",
"commodity_unit": "usd/mmbtu",
"commodity_price": "2.91",
"price_change_day": "0.04",
"percentage_day": "1.39%",
"datetime": "2025-08-26T11:23:00.000"
}
]
}
}Learn more: Natural Gas Price API
Metal Price API Example
Get industrial metal price data such as copper, aluminum and lithium.
Example Request
https://apidata.fin2dev.com/v1/commodities?key=YOUR_API_KEY&commodity_name=copper
Example Response
{
"result": {
"output": [
{
"commodity_name": "copper",
"commodity_unit": "usd/lbs",
"commodity_price": "4.43",
"price_change_day": "0.03",
"percentage_day": "0.68%",
"datetime": "2025-08-26T11:23:00.000"
}
]
}
}Learn more: Metal Price API
Agricultural Commodities Price API Example
Get agricultural commodity price data such as corn, wheat and coffee.
Example Request
https://apidata.fin2dev.com/v1/commodities?key=YOUR_API_KEY&commodity_name=corn
Example Response
{
"result": {
"output": [
{
"commodity_name": "corn",
"commodity_unit": "usd/bu",
"commodity_price": "4.21",
"price_change_day": "-0.02",
"percentage_day": "-0.47%",
"datetime": "2025-08-26T11:23:00.000"
}
]
}
}Learn more: Agricultural Commodities Price API
Python Example
import requests
url = "https://apidata.fin2dev.com/v1/commodities"
params = {
"key": "YOUR_API_KEY",
"commodity_name": "crude_oil"
}
response = requests.get(url, params=params)
print(response.json())PHP Example
<?php
$url = 'https://apidata.fin2dev.com/v1/commodities?key=YOUR_API_KEY&commodity_name=crude_oil';
$response = file_get_contents($url);
echo $response;
?>JavaScript Example
fetch(
'https://apidata.fin2dev.com/v1/commodities?key=YOUR_API_KEY&commodity_name=crude_oil'
)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));Get instant access to commodity market data through a simple JSON API.
π Get API Access
π View Documentation
If you have any questions about the API, pricing, data coverage or integration, feel free to contact us.
π Website
π§ Contact Form
π GitHub Profile
- Simple JSON APIs
- Historical and real-time data
- Developer-friendly integration
- Fast onboarding
- Transparent pricing