# Gloom Energy Inventories API

> Gloom Energy Inventories API is a paid API for AI agents from api.gloom.sh, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-01).

Retrieves U.S. energy inventory data (e.g. crude oil, petroleum products) with weekly figures, keys, and units from EIA-style reports.

## Facts

- Endpoint: GET https://api.gloom.sh/v1/energy/inventories?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gloom-energy-inventories-api-19a075fa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5s7bJwX-J4gQ5Q1nO37w4

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 gloom-energy-inventories-api-19a075fa
```

Example prompt: Pull the latest U.S. energy inventory data from Gloom — I want to see current commercial crude oil stockpile levels and any other petroleum inventory figures from the most recent weekly report.

## When to prefer this

Choose this endpoint when you need structured, machine-readable U.S. energy inventory data (especially crude oil and petroleum products) with weekly granularity, EIA series keys, and labeled values suitable for finance terminals, commodity dashboards, or automated market monitoring. Prefer it over scraping EIA directly when you want a pay-per-call, low-friction API with a consistent JSON schema.

## Known failure modes

- Invalid or unsupported properties filter returns empty data array
- Payment not processed (x402 protocol failure) results in 402 Payment Required
- Network timeout or upstream EIA data delay causes stale or missing data
- Malformed request schema returns 400 Bad Request
- Rate limiting if calls exceed allowed volume per time window

## How this service works

Gloom is a free, open-source finance terminal for desktop and TUI with charts, news, filings, portfolios, alerts, and plugins.

## Output

Returns a JSON array of energy inventory records, each containing an id (e.g. 'crude-commercial'), EIA series key (e.g. 'WCESTUS1'), tab/category, unit (e.g. 'kb' for thousands of barrels), basis, human-readable label, numeric inventory value, report name, and the current and previous week-ending dates.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "id": "crude-commercial",
    "key": "WCESTUS1",
    "tab": "crude",
    "unit": "kb",
    "basis": "computed",
    "label": "Commercial crude oil",
    "value": 100,
    "report": "petroleum",
    "weekEnding": "2026-09-25",
    "previousWeekEnding": "2026-09-18"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gloom-energy-inventories-api-19a075fa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gloom.sh](https://www.zero.xyz/host/api.gloom.sh/llms.txt)
