The energy data API
your trading app needs
broad commodity coverage. Batch requests. Webhooks. Price alerts. Everything to build professional energy data features — without managing your own scrapers.
Built for developers who ship
Broad commodity coverage
Crude oil, refined products, natural gas, LNG, metals, agricultural commodities, and more — all in one unified API.
Batch Endpoint
Fetch up to 20 commodity prices in a single HTTP request. One call, one bill, zero rate-limit headaches.
Webhooks
Push price updates to your server the moment they happen. No polling, no wasted requests, no stale data.
Price Alerts
Trigger alerts when prices cross thresholds. Notify your users in real time when Brent moves past $90 or WTI drops below $70.
Statistical Analytics
Moving averages, volatility, percentage changes, and correlation data available via the analytics endpoint.
REST API
RESTful JSON API for polling and history. WebSocket for streaming price ticks into charts and dashboards.
Batch 20 prices in one call
Reduce API calls 20x with the batch endpoint
# Fetch multiple commodities in one request
curl "https://api.oilpriceapi.com/v1/prices/latest" \
-d '{"by_code":["BRENT_CRUDE_USD","WTI_USD","NATURAL_GAS_USD","GASOLINE_USD","HEATING_OIL_USD"]}' \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json"
{
"status": "success",
"data": [
{ "code": "BRENT_CRUDE_USD", "price": 84.21, "created_at": "2026-03-29T09:15:00Z" },
{ "code": "WTI_USD", "price": 80.47, "created_at": "2026-03-29T09:15:00Z" },
{ "code": "NATURAL_GAS_USD", "price": 2.18, "created_at": "2026-03-29T09:15:00Z" },
{ "code": "GASOLINE_USD", "price": 2.67, "created_at": "2026-03-29T09:15:00Z" },
{ "code": "HEATING_OIL_USD", "price": 2.82, "created_at": "2026-03-29T09:15:00Z" }
]
}Powering apps in 150+ countries
"We evaluated five commodity data APIs. OilPriceAPI had the cleanest REST design, the most commodities, and the fastest response times. Integration took 2 hours."
"The webhook feature is exactly what we needed. Our users get price alerts without us having to build any polling infrastructure."
Start free. Scale as you grow.
No enterprise contracts. No data licensing fees. Just clean pricing you can budget.
Starter
- ✓ 50,000 requests/month
- ✓ broad commodity coverage
- ✓ Batch endpoint
- ✓ Historical data
Professional
- ✓ 100,000 requests/month
- ✓ Webhooks & price alerts
- ✓ account-enabled streaming
- ✓ Statistical analytics API
- ✓ 99.9% uptime target
Business
- ✓ 500,000 requests/month
- ✓ Everything in Professional
- ✓ Dedicated support
- ✓ Custom integrations
Frequently asked questions
What commodities are available?+
177+ including Brent, WTI, Dubai crude, all major refined products (gasoline, diesel, jet fuel, heating oil), natural gas (Henry Hub, TTF, NBP), LNG, NGL, petrochemicals, agriculture, and metals. Full list in our docs.
How does the batch endpoint work?+
POST to /v1/prices/latest with a JSON array of commodity codes. Returns all prices in one response. Each commodity in the batch counts as one request against your quota.
How do webhooks work?+
Register a URL on your account dashboard. We POST a JSON payload to your endpoint whenever a price update occurs for commodities you've subscribed to. Includes HMAC signature for verification.
Can I use this in a commercial SaaS product?+
Yes. All plans, including the free tier, may be used commercially — many businesses, trading platforms, and financial applications build on the API. That is about your subscription to our service, and it is the only thing we are in a position to sell you. It is not a grant of rights over the underlying price data: we hold no licence from any upstream source, so permission over the data is not ours to give and we give none. Where you stand depends on where a series comes from — see our Data Usage Policy and Redistribution page.
Do you have SDKs?+
Official SDKs are available for Python, Node.js, Go, and PHP. Ruby, Java, C#, and Rust can call the REST API directly with standard HTTP clients.
Ship energy data features today
Get your API key in seconds. 50 free requests per day. No credit card required.
Get Your API Key — Free50 free requests/day • Batch + webhooks included • Up in 5 minutes