OilPriceAPI Docs
GitHub
GitHub
  • Interactive Explorer

    • Interactive API Explorer
  • Price Data

    • API Reference
    • Get Latest Prices
    • Historical Prices
    • Batch Prices
    • Excel Latest Price Gateway
    • Price Widget Endpoints
    • Price Utility Endpoints
    • Natural Gas Intelligence
  • Commodities

    • List Commodities
    • Get Commodity Details
  • AI Agents (MCP)

    • Get Market Brief
    • Subscriptions / Watches
    • Agent Subscriptions with MCP
  • Marine Fuels

    • Marine Fuel API
    • List Marine Fuel Ports
    • Get Port Details with Prices
    • Bunker Fuels
    • Maritime Fuels
  • Premium Endpoints

    • All Prices API - One Call, All Commodities
    • Cushing Oil Storage Intelligence API
    • Drilling Intelligence API
    • Marine Fuels API
    • ICE Brent Futures API
    • Benchmark Close
    • Aviation Fuel Pilot
  • Spreads & Margins

    • Spreads & Margins
    • Crack Spreads
    • Basis Spreads
    • Refining Margins
    • Curve Structure
    • Physical Premiums
  • Market Indicators

    • Market Indicators
    • Fuel Switching
    • Price Context
    • Storage Analytics
    • CFTC Positioning
    • Congressional Trades
    • Market Annotations
  • Futures

    • Futures API
    • ICE Brent Futures
    • ICE WTI Futures
    • ICE Gas Oil Futures
    • NYMEX Natural Gas Futures
    • ICE EUA Carbon Futures
    • EU Carbon Futures
    • TTF Gas Futures
    • LNG JKM Futures
    • UK Carbon Futures
  • Dark Data (Premium)

    • Energy Intelligence API
    • Rig Counts
    • Well Permits
    • Well Production Beta
    • Oil Inventories
    • OPEC Production
    • Drilling Productivity
    • Forecasts (STEO)
  • Well Production (Beta)

    • Well Production Data
    • Well Production API Reference
  • Analytics

    • Analytics API
  • Webhooks API

    • Webhooks API Reference
    • Webhook Endpoint Reference
  • Alerts

    • Price Alerts API
  • Account & Billing

    • Account API
    • API Keys
    • Subscriptions
    • Organizations

Price Utility Endpoints

These endpoints support specific product workflows around the core price API. Prefer /v1/prices/latest and /v1/prices/historical for new general-purpose integrations unless a workflow below matches your use case.

Endpoints

MethodEndpointPurpose
GET/v1/prices/crude-oilCrude-oil focused latest-price helper
GET/v1/prices/data-connectorConnector payload used by data-connector integrations
GET/v1/prices/historyLegacy history surface; prefer /v1/prices/historical for new work
GET/v1/prices/metricsPrice API metrics payload

/v1/prices/crude-oil

curl "https://api.oilpriceapi.com/v1/prices/crude-oil" \
  -H "Authorization: Token YOUR_API_KEY"

Returns a crude-focused price payload for WTI, Brent, and related crude benchmarks.

/v1/prices/data-connector

curl "https://api.oilpriceapi.com/v1/prices/data-connector" \
  -H "Authorization: Token YOUR_API_KEY"

Used by connector workflows such as the Ship & Bunker connector. Treat the shape as integration-specific and pin your downstream parser to the fields you actually use.

/v1/prices/history

curl "https://api.oilpriceapi.com/v1/prices/history?by_code=WTI_USD&start_date=2026-01-01&end_date=2026-01-31" \
  -H "Authorization: Token YOUR_API_KEY"

/v1/prices/history is distinct from the canonical Historical Prices endpoint. For new integrations, use /v1/prices/historical unless support has directed you to the legacy path.

/v1/prices/metrics

curl "https://api.oilpriceapi.com/v1/prices/metrics" \
  -H "Authorization: Token YOUR_API_KEY"

Returns price API metrics for monitoring and internal operational dashboards.

Do Not Use Yet

GET /v1/prices/export is intentionally not documented as a working endpoint here because the current backend issue list records a hard 500. Wait for the backend fix before building exports.

Error Cases

StatusWhen
400Missing required query parameter or invalid code
401Missing or invalid API key
402Quota exhausted
429Rate limit exceeded
Last Updated: 7/16/26, 1:53 PM
Prev
Price Widget Endpoints
Next
Natural Gas Intelligence