Crude Oil Inventory API

API ID 13998

Crude Oil Inventory API returns closing stocks in thousand barrels by country and United States hub, including Cushing, with latest levels, history and changes.

100% uptime 161 ms avg response

API Documentation

Endpoints

Request
Lists commodities in the Crude Oil Inventory API catalog, including group, unit, geographic coverage, live or planned status and the last updated date.
Endpoint ID: 33722
GET https://zylalabs.com/api/13998/crude+oil+inventory+api/33722/list+commodities
INPUT PARAMETERS

List Commodities — Endpoint Features

Object Description
group Optional Commodity group to return. Example: energy, agriculture or metals.
status Optional Catalog status to return. Example: live or planned.

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

group
status
API EXAMPLE RESPONSE
JSON
{
    "data": [
        {
            "commodity": "crude_oil",
            "group": "energy",
            "metric": "closing_stocks",
            "unit": "thousand_barrels",
            "coverage": "countries with available stocks + US hubs",
            "status": "live",
            "last_updated": "2026-08-21"
        }
    ]
}
List Commodities — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13998/crude+oil+inventory+api/33722/list+commodities?group=energy&status=live' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request
Returns one crude oil inventory profile, with the thousand-barrel unit, geographic coverage, history start date and country and hub counts.
Endpoint ID: 33723
GET https://zylalabs.com/api/13998/crude+oil+inventory+api/33723/get+commodity
INPUT PARAMETERS

Free test requests remaining: 3 of 3.

API EXAMPLE RESPONSE
JSON
{
    "commodity": "crude_oil",
    "group": "energy",
    "metric": "closing_stocks",
    "unit": "thousand_barrels",
    "history_from": "1982-08-20",
    "last_updated": "2026-08-21",
    "coverage": "countries with available stocks + US hubs",
    "areas_count": {
        "countries": 35,
        "hubs": 7
    }
}
Get Commodity — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13998/crude+oil+inventory+api/33723/get+commodity&commodity=Required' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request
Lists countries or United States hubs for a commodity, with the area code, name and latest inventory period for each place.
Endpoint ID: 33724
GET https://zylalabs.com/api/13998/crude+oil+inventory+api/33724/list+commodity+areas
INPUT PARAMETERS

List Commodity Areas — Endpoint Features

Object Description
type Optional Kind of area to list. Example: country or hub.
commodity Required

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

type
API EXAMPLE RESPONSE
JSON
{
    "commodity": "crude_oil",
    "data": [
        {
            "area": "AT",
            "name": "Austria",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "AU",
            "name": "Australia",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "BE",
            "name": "Belgium",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "CA",
            "name": "Canada",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "CH",
            "name": "Switzerland",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "CL",
            "name": "Chile",
            "type": "country",
            "latest": "2026-05-01"
        },
        {
            "area": "CZ",
            "name": "Czech Republic",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "DE",
            "name": "Germany",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "DK",
            "name": "Denmark",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "EE",
            "name": "Estonia",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "ES",
            "name": "Spain",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "FI",
            "name": "Finland",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "FR",
            "name": "France",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "GB",
            "name": "United Kingdom",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "GR",
            "name": "Greece",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "HU",
            "name": "Hungary",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "IE",
            "name": "Ireland",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "IS",
            "name": "Iceland",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "IT",
            "name": "Italy",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "JP",
            "name": "Japan",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "KR",
            "name": "South Korea",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "LT",
            "name": "Lithuania",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "LU",
            "name": "Luxembourg",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "LV",
            "name": "Latvia",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "MX",
            "name": "Mexico",
            "type": "country",
            "latest": "2025-02-01"
        },
        {
            "area": "NL",
            "name": "Netherlands",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "NO",
            "name": "Norway",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "NZ",
            "name": "New Zealand",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "PL",
            "name": "Poland",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "PT",
            "name": "Portugal",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "SE",
            "name": "Sweden",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "SI",
            "name": "Slovenia",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "SK",
            "name": "Slovakia",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "TR",
            "name": "Turkey",
            "type": "country",
            "latest": "2026-06-01"
        },
        {
            "area": "US",
            "name": "United States",
            "type": "country",
            "latest": "2026-08-21"
        }
    ]
}
List Commodity Areas — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13998/crude+oil+inventory+api/33724/list+commodity+areas?type=country&commodity=Required' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request
Returns the latest crude oil closing stock for each country or US hub, including Cushing, with period, thousand-barrel value and reliability.
Endpoint ID: 33725
GET https://zylalabs.com/api/13998/crude+oil+inventory+api/33725/latest+inventory
INPUT PARAMETERS

Latest Inventory — Endpoint Features

Object Description
type Optional Area type in the snapshot. Example: country or hub.
sort Optional Row order. Example: value_desc or area_asc.
commodity Required

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

type
sort
API EXAMPLE RESPONSE
JSON
{
    "commodity": "crude_oil",
    "metric": "closing_stocks",
    "unit": "thousand_barrels",
    "as_of": "2026-08-21",
    "data": [
        {
            "area": "US-SPR",
            "name": "Strategic Petroleum Reserve",
            "period": "2026-08-21",
            "value": 289726,
            "reliability": "reported"
        },
        {
            "area": "US-PADD3",
            "name": "PADD 3 - Gulf Coast",
            "period": "2026-08-21",
            "value": 251424,
            "reliability": "reported"
        },
        {
            "area": "US-PADD2",
            "name": "PADD 2 - Midwest",
            "period": "2026-08-21",
            "value": 101195,
            "reliability": "reported"
        },
        {
            "area": "US-PADD5",
            "name": "PADD 5 - West Coast",
            "period": "2026-08-21",
            "value": 45343,
            "reliability": "reported"
        },
        {
            "area": "US-PADD4",
            "name": "PADD 4 - Rocky Mountain",
            "period": "2026-08-21",
            "value": 22524,
            "reliability": "reported"
        },
        {
            "area": "US-CUSHING",
            "name": "Cushing, OK",
            "period": "2026-08-21",
            "value": 22428,
            "reliability": "reported"
        },
        {
            "area": "US-PADD1",
            "name": "PADD 1 - East Coast",
            "period": "2026-08-21",
            "value": 8423,
            "reliability": "reported"
        }
    ],
    "meta": {
        "count": 7,
        "period_min": "2026-08-21",
        "period_max": "2026-08-21"
    }
}
Latest Inventory — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13998/crude+oil+inventory+api/33725/latest+inventory?type=hub&sort=value_desc&commodity=Required' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request
Returns historical crude oil inventory for one or more countries or hubs, such as the United States and Cushing, newest period first.
Endpoint ID: 33726
GET https://zylalabs.com/api/13998/crude+oil+inventory+api/33726/inventory+time+series
INPUT PARAMETERS

Inventory Time Series — Endpoint Features

Object Description
area Optional Area codes, comma-separated. Example: US,US-CUSHING. Empty returns every area.
from Optional First period to include, as YYYY-MM-DD. Example: 2026-08-01.
to Optional Last period to include, as YYYY-MM-DD. Example: 2026-08-21.
limit Optional Maximum rows in the page. Example: 2. Default is 1000 and the maximum is 5000.
cursor Optional Page cursor from meta.next_cursor. Example: MjAyNi0wOC0yMXxVUy1DVVNISU5HfDE4OTgy.
commodity Required

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

area
from
to
limit
cursor
API EXAMPLE RESPONSE
JSON
{
    "commodity": "crude_oil",
    "metric": "closing_stocks",
    "unit": "thousand_barrels",
    "as_of": "2026-08-21",
    "data": [
        {
            "area": "US",
            "period": "2026-08-21",
            "value": 428910,
            "reliability": "reported"
        },
        {
            "area": "US-CUSHING",
            "period": "2026-08-21",
            "value": 22428,
            "reliability": "reported"
        }
    ],
    "meta": {
        "count": 2,
        "next_cursor": "MjAyNi0wOC0yMXxVUy1DVVNISU5HfDE4OTgy",
        "from": "2026-08-01",
        "to": "2026-08-21",
        "from_defaulted": false
    }
}
Inventory Time Series — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13998/crude+oil+inventory+api/33726/inventory+time+series?area=US,US-CUSHING&from=2026-08-01&to=2026-08-21&limit=2&cursor=MjAyNi0wOC0yMXxVUy1DVVNISU5HfDE4OTgy&commodity=Required' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request
Returns the crude oil stock change versus the previous period for countries or hubs such as the United States and Cushing, in level and percent.
Endpoint ID: 33727
GET https://zylalabs.com/api/13998/crude+oil+inventory+api/33727/inventory+changes
INPUT PARAMETERS

Inventory Changes — Endpoint Features

Object Description
area Optional Area codes, comma-separated. Example: US,US-CUSHING.
periods Optional How many periods to return. Example: 4. The default is 8.
commodity Required

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

area
periods
API EXAMPLE RESPONSE
JSON
{
    "commodity": "crude_oil",
    "unit": "thousand_barrels",
    "as_of": "2026-08-21",
    "data": [
        {
            "area": "US",
            "period": "2026-08-21",
            "value": 428910,
            "change": 95,
            "change_pct": 0.02
        },
        {
            "area": "US-CUSHING",
            "period": "2026-08-21",
            "value": 22428,
            "change": 1176,
            "change_pct": 5.53
        },
        {
            "area": "US",
            "period": "2026-08-14",
            "value": 428815,
            "change": 4405,
            "change_pct": 1.04
        },
        {
            "area": "US-CUSHING",
            "period": "2026-08-14",
            "value": 21252,
            "change": -1314,
            "change_pct": -5.82
        },
        {
            "area": "US",
            "period": "2026-08-07",
            "value": 424410,
            "change": 17423,
            "change_pct": 4.28
        },
        {
            "area": "US-CUSHING",
            "period": "2026-08-07",
            "value": 22566,
            "change": 1611,
            "change_pct": 7.69
        },
        {
            "area": "US",
            "period": "2026-07-31",
            "value": 406987,
            "change": 2479,
            "change_pct": 0.61
        },
        {
            "area": "US-CUSHING",
            "period": "2026-07-31",
            "value": 20955,
            "change": 2356,
            "change_pct": 12.67
        }
    ]
}
Inventory Changes — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13998/crude+oil+inventory+api/33727/inventory+changes?area=US,US-CUSHING&periods=4&commodity=Required' --header 'Authorization: Bearer YOUR_API_KEY' 


    

API Access Key & Authentication

After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Crude Oil Inventory API simply include your bearer token in the Authorization header.

Headers
Header Description
Authorization Required Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.

No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.

(Save 2 months with annual billing 🎉)

🚀 Enterprise Plan

Starts at
$ 10,000/Year


  • Custom Volume
  • Custom Rate Limit
  • Specialized Customer Support
  • Real-Time API Monitoring

Overview

The Crude Oil Inventory API returns closing crude oil stocks by country and by United States storage hub. Values are in thousand barrels. Coverage includes countries that report stocks and hubs such as Cushing, Oklahoma, the Strategic Petroleum Reserve and the five PADD regions. The live commodity code is crude_oil. Use List Commodities to read the catalog, Get Commodity for the profile and history start, List Commodity Areas for country and hub codes, Latest Inventory for the current level of each area, Inventory Time Series for history, and Inventory Changes for the move versus the previous period. Filter a series or a change with area codes such as US, JP or US-CUSHING. Wheat, corn, natural gas, lithium and copper are listed as planned, and inventory calls for those codes return not available until they go live.

Crude Oil Inventory API FAQs

Thousand barrels. Inventory responses include unit set to thousand_barrels. Get Commodity returns the same unit on the commodity profile.

Closing crude oil stocks by country and by United States hub, in thousand barrels. Each row has the area, the period and the stock level. Inventory Changes also returns the change versus the previous period and the percent change.

Countries that report stocks, plus United States hubs. Hubs include Cushing, Oklahoma, the Strategic Petroleum Reserve and PADD regions 1 through 5. Area codes look like US, JP and US-CUSHING.

Pass commodity crude_oil and area US-CUSHING to Latest Inventory, Inventory Time Series or Inventory Changes. US-CUSHING is the hub code for Cushing, Oklahoma.

Get Commodity returns history_from. For crude oil that date is 1982-08-20 on the United States series. Other countries start on the first period that exists for that area. Set from on Inventory Time Series to choose the start date.

Crude_oil is live. Wheat, corn, natural gas, lithium and copper are in the catalog with status planned. An inventory call for a planned code returns not available until that commodity goes live.

Each endpoint returns specific data related to crude oil inventory. For example, Latest Inventory provides current stock levels, Inventory Time Series offers historical data, and Inventory Changes shows stock changes over time. Each response includes relevant fields such as area, period, and value.

Key fields include "area" (location code), "name" (location name), "period" (date of data), "value" (stock level in thousand barrels), and "reliability" (data source reliability). These fields help users understand the context and accuracy of the data.

The response data is structured in JSON format, typically containing a "commodity" field, a "metric" field, and a "data" array. Each entry in the "data" array corresponds to a specific area and includes relevant metrics like stock levels and changes.

Parameters vary by endpoint. For example, Latest Inventory can accept area codes (like US-CUSHING) to filter results. Inventory Time Series allows users to specify date ranges using "from" and "to" parameters to customize their data requests.

Each endpoint provides distinct information: List Commodities shows available commodities, Get Commodity details the crude oil profile, List Commodity Areas enumerates countries and hubs, Latest Inventory gives current stock levels, Inventory Time Series presents historical data, and Inventory Changes reports stock variations.

Data accuracy is maintained through reliable reporting from countries and storage hubs. Each response includes a "reliability" field indicating the source of the data, ensuring users can assess the trustworthiness of the information provided.

Typical use cases include market analysis, inventory tracking, and trend forecasting in the energy sector. Analysts and businesses can use this data to make informed decisions regarding crude oil supply and demand dynamics.

Users can analyze the data by comparing stock levels across different regions or time periods. For instance, they can track changes in Cushing inventory over time using Inventory Changes, or assess overall trends in crude oil stocks by examining Inventory Time Series data.

General FAQs

To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.

You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.

The free trial lasts for 7 days and allows you to make up to 50 API requests.

No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.

Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.

Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.

Prices are listed in USD (United States Dollar), EUR (Euro), CAD (Canadian Dollar), AUD (Australian Dollar), and GBP (British Pound). We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the world's most reliable payment companies. If you have any trouble paying by card, just contact us at [email protected]

Additionally, if you already have an active subscription in any of these currencies (USD, EUR, CAD, AUD, GBP), that currency will remain for subsequent subscriptions. You can change the currency at any time as long as you don't have any active subscriptions.
The local currency shown on the pricing page is based on the country of your IP address and is provided for reference only. The actual prices are in USD (United States Dollar). When you make a payment, the charge will appear on your card statement in USD, even if you see the equivalent amount in your local currency on our website. This means you cannot pay directly with your local currency.
Occasionally, a bank may decline the charge due to its fraud protection settings. We suggest reaching out to your bank initially to check if they are blocking our charges. Also, you can access the Billing Portal and change the card associated to make the payment. If these does not work and you need further assistance, please contact our team at [email protected]
Prices are determined by a recurring monthly or yearly subscription, depending on the chosen plan.
API calls are deducted from your plan based on successful requests. Each plan comes with a specific number of calls that you can make per month. Only successful calls, indicated by a Status 200 response, will be counted against your total. This ensures that failed or incomplete requests do not impact your monthly quota.
Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.
To upgrade your current subscription plan, simply go to the pricing page of the API and select the plan you want to upgrade to. The upgrade will be instant, allowing you to immediately enjoy the features of the new plan. Please note that any remaining calls from your previous plan will not be carried over to the new plan, so be aware of this when upgrading. You will be charged the full amount of the new plan.
To check how many API calls you have left for the current month, refer to the 'X-Zyla-API-Calls-Monthly-Remaining' field in the response header. For example, if your plan allows 1,000 requests per month and you've used 100, this field in the response header will indicate 900 remaining calls.

You can monitor your API usage through the response headers included with every request:

x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.

The 'X-Zyla-RateLimit-Reset' header shows the number of seconds until your rate limit resets. This tells you when your request count will start fresh. For example, if it displays 3,600, it means 3,600 seconds are left until the limit resets.

Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.

Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.

After 7 days, you will be charged the full amount for the plan you were subscribed to during the trial. Therefore, it's important to cancel before the trial period ends. Refund requests for forgetting to cancel on time are not accepted.
When you subscribe to an API free trial, you can make up to 50 API calls. If you wish to make additional API calls beyond this limit, the API will prompt you to perform an "Start Your Paid Plan." You can find the "Start Your Paid Plan" button in your profile under Subscription -> Choose the API you are subscribed to -> Pricing tab.
You can contact us through our chat channel to receive immediate assistance. We are always online from 8 am to 5 pm (EST). If you reach us after that time, we will get back to you as soon as possible. Additionally, you can contact us via email at [email protected]

Please have a look at our Refund Policy: https://zylalabs.com/terms#refund


Related APIs