Choose the right path first
Not sure which endpoint family fits your workflow?
Use the workflow router to separate latest prices, historical rows, futures contracts, Excel, source-specific connector work, and plan-fit checks before building around an endpoint.
What Makes Our API Different
Built for developers who need reliable energy market data without the complexity of traditional data vendors.
Fast & Reliable
Consistent JSON responses with source timestamps and freshness metadata where available. Enterprise accounts can include contractual support and data-source review.
Developer Friendly
Clean REST API with consistent JSON responses. Official SDKs for Python and Node.js. Comprehensive error handling and retry logic built-in.
Comprehensive Data
Commodity, futures, refined product, and drilling-intelligence endpoints organized by code and category. Availability and history depend on the selected package. Public display is governed by the source, not by your plan — see our Redistribution page.
Browse Endpoints by Category
Click on any endpoint to view detailed documentation including parameters, response schemas, and code examples.
Price Data Endpoints
Latest-available and historical commodity price data with timestamps
/v1/prices/latestReturns latest-available prices for commodities or filtered by code/category, with timestamps when available.
/v1/prices/latest?by_code={commodity_code}Get the latest-available price for a specific commodity (e.g., WTI_USD, BRENT_CRUDE_USD, NATURAL_GAS_USD). Fast single-commodity lookups.
/v1/prices/historicalTime-series data for backtesting and analysis. Query by date range (2014-present), interval (day/week/month), and commodity.
/v1/prices/latestFilter by category using the by_code parameter with multiple commodity codes (e.g., crude_oil codes: WTI_USD, BRENT_CRUDE_USD). Useful for building category-specific dashboards.
Futures Data Endpoints
Product-scoped futures routes with contract, source, and freshness metadata
/v1/futures/ice-brentCurrent Brent crude futures curve with contract prices, volume, open interest, and source metadata where available.
/v1/futures/ice-brent/historicalHistorical Brent futures data for supported contracts. Inspect the returned date range before using it in an analysis or backtest.
/v1/futures/ice-wtiCurrent WTI crude futures curve with contract-month metadata and trading statistics where available.
/v1/futures/natural-gas/historicalHistorical natural gas futures data (Henry Hub). Essential for energy trading and risk analysis.
/v1/futures/ice-gasoilICE gasoil futures contract data. European diesel benchmark pricing.
/v1/futures/lng-jkmJKM LNG 12-contract delayed/reference futures curve. When reference fallback is active, metadata reports coverage_status=full_curve_reference and source_semantics=delayed_reference_non_official.
Drilling Intelligence Endpoints
U.S. rig counts, basin data, and production metrics
/v1/drilling-intelligence/rig-countWeekly Baker Hughes rig count data by basin, state, and rig type. Leading indicator for production trends.
/v1/drilling-intelligence/basinsProduction basin analytics including Permian, Eagle Ford, Bakken, and more. Rig counts, production, and DUC well inventory.
/v1/drilling-intelligence/duc-wellsDrilled but uncompleted (DUC) well inventory by basin. Key metric for understanding production capacity.
Authentication & Utilities
Token management and account information
API Key Authentication: API keys are provisioned via the dashboard. Pass your key in every request as Authorization: Token YOUR_API_KEY.
/v1/commoditiesList all available commodities with codes, names, and categories. Use this to discover available data.
Consistent Response Format
Success Response
All successful requests return this structure
{
"status": "success",
"data": {
"price": 0,
"currency": "USD",
"unit": "barrel",
"change": null,
"created_at": "2026-01-01T00:00:00Z"
}
}Error Response
Errors include descriptive messages and codes
{
"status": "error",
"error": {
"code": "INVALID_API_KEY",
"message": "API token is invalid",
"details": "Check your token"
}
}Frequently Asked Questions
What format does the API return?
All endpoints return JSON responses with a consistent structure. Successful responses include a "status" field set to "success" and a "data" object containing the requested information. Errors return "status": "error" with detailed error information.
How do I authenticate API requests?
Use token-based authentication. Include your API token in the Authorization header as "Token YOUR_API_TOKEN" with every request. You can generate tokens from your dashboard after signing up.
What rate limits apply?
Rate limits depend on your current plan tier. Check the pricing page and account dashboard for current trial terms, plan limits, and package rights. Rate limit information is included in response headers (X-RateLimit-Remaining, X-RateLimit-Reset).
Are there SDKs available?
Can I test the API for free?
Yes. Sign up for a free account to test the API before upgrading. See the pricing page for current trial terms and plan limits.
Where is the full API documentation?
Complete technical documentation with detailed parameter references, response schemas, and interactive examples is available at docs.oilpriceapi.com. This page provides a high-level overview and endpoint directory.
Related Resources
Quick Start Guide
Make one focused request, inspect the response shape, and choose the next workflow.
Python SDK
Official Python SDK with pip installation and comprehensive examples.
Node.js SDK
TypeScript-ready Node.js SDK for building energy data applications.
Brent Futures API
Latest-available and historical Brent crude futures data with timestamps and supported OHLC fields.
Energy Data API
Comprehensive energy market data including drilling intelligence and rig counts.
Pricing Plans
View current package options and account limits on the pricing page.