API Documentation
Everything you need to integrate real-time oil and gas price data into your application. Get started in minutes with our simple REST API.
Quick Start
1. Authentication
Get your API key from the dashboard and include it in the Authorization header:
Authorization: Token YOUR_API_KEY2. Base URL
All API requests should be made to:
https://api.wtibrentgas.com/v1Code Examples
cURL
Get latest Brent Crude price:
curl https://api.wtibrentgas.com/v1/prices/latest?by_code=BRENT_USD \
-H 'Authorization: Token YOUR_API_TOKEN' \
-H 'Content-Type: application/json'
Python
Using the requests library:
import requests
url = "https://api.wtibrentgas.com/v1/prices/latest"
headers = {
"Authorization": "Token YOUR_API_TOKEN",
"Content-Type": "application/json"
}
params = {"by_code": "BRENT_USD"}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print("Brent Crude: $" + str(data['data']['price']))
JavaScript (Node.js)
Using fetch API:
const fetch = require('node-fetch');
const url = 'https://api.wtibrentgas.com/v1/prices/latest?by_code=BRENT_USD';
const options = {
headers: {
'Authorization': 'Token YOUR_API_TOKEN',
'Content-Type': 'application/json'
}
};
fetch(url, options)
.then(res => res.json())
.then(data => console.log('Brent Crude: $' + data.data.price))
.catch(err => console.error(err));Response Format
JSON Response
{
"status": "success",
"data": {
"price": 62.04,
"formatted": "$62.04",
"currency": "USD",
"unit": "barrel",
"timestamp": "2026-01-06T12:18:16.973Z",
"code": "BRENT_USD",
"name": "Brent Crude",
"source": "cache"
}
}Available Price Codes
BRENT_USDBrent Crude Oil (USD)
WTI_USDWTI Crude Oil (USD)
NATURAL_GAS_USDNatural Gas US (USD)
NATURAL_GAS_UK_GBPNatural Gas UK (GBP)
DUBAI_USDDubai Crude Oil (USD)
Rate Limits
Important
Rate limits vary by plan. Free plan: 100 requests/month, Production: 10,000 requests/month, Enterprise: Unlimited. All plans have a maximum of 10 requests per second.