Oil Price API Documentation - Quick Start in 5 Minutes | REST API
GitHub
GitHub
  • Interactive Explorer

    • Interactive API Explorer
  • Price Data

    • API Reference
    • Get Latest Prices
    • Historical Prices
  • Commodities

    • List Commodities
    • Get Commodity Details
  • Marine Fuels

    • List Marine Fuel Ports
    • Get Port Details with Prices
  • Premium Endpoints

    • All Prices API - One Call, All Commodities
    • Cushing Oil Storage Intelligence API
    • Drilling Intelligence API
    • Marine Fuels API
    • ICE Brent Futures API
  • Futures

    • Futures API
    • ICE Brent Futures
    • ICE WTI Futures
    • ICE Gas Oil Futures
    • NYMEX Natural Gas Futures
  • Dark Data (Premium)

    • Dark Data API
    • Rig Counts
    • Oil Inventories
    • OPEC Production
    • Drilling Productivity
    • Forecasts (STEO)
  • Analytics

    • Analytics API
  • Account & Billing

    • Account API

Oil Inventories

Weekly petroleum inventory data from the EIA Weekly Petroleum Status Report (WPSR).

Source: EIA Weekly Petroleum Status Report Release: Every Wednesday at 10:30 AM ET Tier Required: Reservoir Mastery

Endpoints

MethodEndpointDescription
GET/v1/dark_data/oil_inventoriesList paginated reports
GET/v1/dark_data/oil_inventories/latestLatest full report
GET/v1/dark_data/oil_inventories/summaryCurrent levels summary
GET/v1/dark_data/oil_inventories/by_productFilter by product type
GET/v1/dark_data/oil_inventories/cushingCushing, OK levels (WTI delivery)
GET/v1/dark_data/oil_inventories/historicalHistorical data
GET/v1/dark_data/oil_inventories/:idSpecific report by ID

List Reports

GET /v1/dark_data/oil_inventories

Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
per_pageinteger10Results per page (max 50)

Latest Report

GET /v1/dark_data/oil_inventories/latest

Response

{
  "data": {
    "week_ending": "2025-01-09",
    "crude_commercial": {
      "volume_mmbbl": 421.2,
      "change_mmbbl": 2.3,
      "direction": "build"
    },
    "gasoline": {
      "volume_mmbbl": 237.8,
      "change_mmbbl": 4.1,
      "direction": "build"
    },
    "distillate": {
      "volume_mmbbl": 118.5,
      "change_mmbbl": -1.2,
      "direction": "draw"
    },
    "cushing": {
      "volume_mmbbl": 23.4,
      "change_mmbbl": 0.8
    }
  }
}

Summary

GET /v1/dark_data/oil_inventories/summary

Response

{
  "data": {
    "week_ending": "2025-01-09",
    "inventories": [
      {
        "product": "crude_commercial",
        "volume": "421.2 MMbbl",
        "change": "+2.3 MMbbl",
        "direction": "build"
      },
      {
        "product": "gasoline",
        "volume": "237.8 MMbbl",
        "change": "+4.1 MMbbl",
        "direction": "build"
      }
    ],
    "headline": "U.S. commercial crude stocks rose by 2.3 million barrels"
  }
}

By Product

GET /v1/dark_data/oil_inventories/by_product

Parameters

ParameterTypeRequiredDescription
productsstringNoComma-separated product types
datedateNoWeek ending date

Valid Products

Product CodeDescription
crudeTotal crude oil
crude_commercialCommercial crude (excl. SPR)
gasolineMotor gasoline
distillateDistillate fuel oil
jet_fuelJet fuel / kerosene
propanePropane/propylene
residualResidual fuel oil

Response

{
  "data": {
    "week_ending": "2025-01-09",
    "products": [
      {
        "product": "crude_commercial",
        "volume_mmbbl": 421.2,
        "change_mmbbl": 2.3,
        "week_over_week_pct": 0.55,
        "five_year_avg": 435.6,
        "vs_five_year_pct": -3.3
      }
    ]
  }
}

Cushing Inventory

WTI crude oil delivery point inventory levels.

GET /v1/dark_data/oil_inventories/cushing

Parameters

ParameterTypeDefaultDescription
weeksinteger52Weeks of history (max 260 = 5 years)

Response

{
  "data": {
    "location": "Cushing, Oklahoma",
    "description": "WTI crude oil delivery point inventory levels",
    "latest": {
      "week_ending": "2025-01-09",
      "volume_mmbbl": 23.4,
      "change_mmbbl": 0.8,
      "utilization_pct": 29.3
    },
    "history": [
      {
        "week_ending": "2025-01-09",
        "volume_mmbbl": 23.4
      },
      {
        "week_ending": "2025-01-02",
        "volume_mmbbl": 22.6
      }
    ],
    "capacity_mmbbl": 80.0
  }
}

Historical

GET /v1/dark_data/oil_inventories/historical

Parameters

ParameterTypeDefaultDescription
productstringcrude_commercialProduct type
locationstringtotalPADD region or total
weeksinteger52Weeks of data (max 520)

Valid Locations

LocationDescription
totalUS Total
padd1East Coast
padd2Midwest
padd3Gulf Coast
padd4Rocky Mountain
padd5West Coast

Code Examples

Python - Track Cushing Levels

import requests

response = requests.get(
    "https://api.oilpriceapi.com/v1/dark_data/oil_inventories/cushing",
    headers={"Authorization": "Token YOUR_API_KEY"},
    params={"weeks": 12}
)
data = response.json()

print(f"Cushing: {data['data']['latest']['volume_mmbbl']} MMbbl")
print(f"Utilization: {data['data']['latest']['utilization_pct']}%")

# Check trend
history = data['data']['history']
if history[0]['volume_mmbbl'] > history[-1]['volume_mmbbl']:
    print("Trend: Building")
else:
    print("Trend: Drawing")

JavaScript - Product Comparison

const response = await fetch(
  "https://api.oilpriceapi.com/v1/dark_data/oil_inventories/by_product?" +
  "products=crude_commercial,gasoline,distillate",
  { headers: { "Authorization": "Token YOUR_API_KEY" } }
);
const data = await response.json();

data.data.products.forEach(p => {
  const direction = p.change_mmbbl > 0 ? "BUILD" : "DRAW";
  console.log(`${p.product}: ${direction} ${Math.abs(p.change_mmbbl)} MMbbl`);
});

Why Inventories Matter

  • Price Impact: Unexpected builds/draws move crude prices
  • Cushing Premium: Low Cushing = wider WTI-Brent spread
  • Seasonal Patterns: Gasoline builds in winter, draws in summer
  • Refinery Utilization: Product builds signal demand weakness

Related

  • Rig Counts - Drilling activity
  • OPEC Production - Supply data
  • Forecasts - EIA price forecasts
Last Updated: 12/30/25, 12:33 PM
Prev
Rig Counts
Next
OPEC Production