---
title: "Get all commodity prices in one call"
method: GET
path: "/v1/prices/all"
tags: ["Prices", "Premium"]
---

# Get all commodity prices in one call

`GET /v1/prices/all`

## Request

- Base URL: `https://api.oilpriceapi.com`
- URL: `https://api.oilpriceapi.com/v1/prices/all`
- Auth: API key in header `Authorization`

Retrieve the commodity values available to the account in a single API call.
Responses include timestamps and metadata for evaluating freshness. Catalog access varies by dataset, plan, and entitlement.

## Query parameters

- `categories` string
- `codes` string
- `currency` 'USD' | 'EUR' | 'GBP'
- `include_metadata` boolean

## Response `200`

All commodity prices

- AllPricesResponse: Returns all commodity prices in a single response. Prices are indexed by commodity code for O(1) lookup. Includes 24-hour price change data when available (calculated by the most recently available calculation).
  - `status` string
  - `data` object
    - `prices` object: Commodity prices indexed by code (e.g., BRENT_CRUDE_USD, WTI_USD)
    - `count` integer: Number of commodities returned
    - `timestamp` string, date-time: Server timestamp when response was generated
    - `cached_at` string, date-time: When the data was cached; evaluate freshness using response timestamps and metadata
  - `metadata` object: Additional metadata (only included when include_metadata=true)
    - `categories` string[]
    - `data_sources` integer

## Other responses

- `401`: Unauthorized - Invalid API key
- `429`: Too many requests
- `500`: Unexpected server error. Retry transient failures with bounded backoff and retain the request ID when contacting support.

## Changes

- **2026-10-20** `b987321524a8`: 2 info
  - added the optional property `data/prices/additionalProperties/benchmark` to the response with the `200` status
  - added the optional property `data/prices/additionalProperties/contract_month` to the response with the `200` status

[Operation history](https://skmtc.dev/oilpriceapi/apis/oil-price-api-v1/changes/v1/prices/all/get.md)

---

[API](https://skmtc.dev/oilpriceapi/apis/oil-price-api-v1.md) - [All operations](https://skmtc.dev/oilpriceapi/apis/oil-price-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/oilpriceapi/apis/oil-price-api-v1/revisions/7f8b4d763210?raw)
