# EIA Petroleum Prices & Stocks API

> EIA Petroleum Prices & Stocks API is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns US petroleum market data from EIA including retail gasoline/diesel prices by PADD region, WTI/Brent crude spot prices, and weekly crude/gasoline/distillate inventory levels.

## Facts

- Endpoint: GET https://api.agentstools.dev/energy/petroleum
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/eia-petroleum-prices-stocks-api-2e68da94
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jUjiYxnOPOHARX39HXofn

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability eia-petroleum-prices-stocks-api-2e68da94
```

Example prompt: What's the current retail gasoline price on the West Coast compared to the US average — can you pull the last 8 weeks of data so I can see the trend?

## When to prefer this

Use this endpoint when you need authoritative US petroleum market data from the EIA — retail pump prices by PADD region, WTI or Brent crude benchmarks, or weekly inventory snapshots — especially when you need the built-in period-over-period change and regional spread without doing your own calculations.

## Known failure modes

- Invalid metric enum value returns 400 with validation error
- Invalid region enum value for non-price metrics returns 400
- History parameter out of range (>120 or <1) returns 400
- EIA data source temporarily unavailable returns 503
- No data available for requested region/metric combination

## How this service works

US petroleum prices and stocks from the EIA: retail gasoline and diesel by PADD region (weekly), WTI and Brent crude spot (daily), and weekly crude/gasoline/distillate inventories. Returns latest value, change vs prior period, short history, and a region-vs-US spread.

## Output

Returns the latest value for the requested petroleum metric, the change vs the prior period, a short history of recent data points (up to 120), and for regional gasoline/diesel metrics a spread showing the region's price versus the US national average.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "metric": {
       "enum": [
        "gas_prices",
        "diesel_prices",
        "crude_wti",
        "crude_brent",
        "crude_stocks",
        "gasoline_stocks",
        "distillate_stocks"
       ],
       "type": "string",
       "description": "Which petroleum series to return (default gas_prices)"
      },
      "region": {
       "enum": [
        "us",
        "east_coast",
        "midwest",
        "gulf_coast",
        "rocky_mountain",
        "west_coast"
       ],
       "type": "string",
       "description": "PADD region for retail gasoline/diesel (default us)"
      },
      "history": {
       "type": "integer",
       "maximum": 120,
       "minimum": 1,
       "description": "Number of recent data points to include"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/eia-petroleum-prices-stocks-api-2e68da94/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
