Start Using Our Oil Price API in 2 Minutes
Python Example
import requests
# Get your free API key at oilpriceapi.com
API_KEY = "your_api_key"
url = "https://api.oilpriceapi.com/v1/prices/latest"
headers = {"Authorization": f"Token {API_KEY}"}
response = requests.get(url, headers=headers)
data = response.json()
print(f"WTI: ${data['wti']}/barrel")
print(f"Brent: ${data['brent']}/barrel")
# Response:
# WTI: $63.53/barrel
# Brent: $67.91/barrel
Why Choose Our Oil Price API?
Real-Time Data
Oil prices updated every 5 minutes during market hours. WebSocket support for instant updates on Pro plans.
Simple Integration
Clean REST API with SDKs for Python, JavaScript, Ruby, and PHP. Comprehensive documentation with examples.
Enterprise Reliable
99.9% uptime SLA. Same data sources as Bloomberg Terminal. Used by 83+ professional trading firms.
Historical Data
Access historical oil prices back to 2020. Daily, weekly, and monthly aggregations available on all paid plans.
50+ Commodities
Beyond WTI and Brent: Natural Gas, Heating Oil, Gasoline, Marine Fuels (MGO, HFO, VLSFO), and more.
Developer Support
Active developer community. Email support on all plans. Dedicated support for Enterprise customers.
Trusted by Energy Companies Worldwide
Trusted by developers and analysts in over 20 countries