---
title: "Get prices from the past 7 days (most recent 100 raw points)"
method: GET
path: "/v1/prices/past_week"
tags: ["Prices"]
---

# Get prices from the past 7 days (most recent 100 raw points)

`GET /v1/prices/past_week`

## Request

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

Returns the most recent page of raw price points inside a 7-day window
(default `interval=raw`).

**Page cap.** This endpoint returns at most **100 raw points per page**. `per_page`
above 100 is reduced to 100; the applied value is returned in `X-Per-Page` and in
`data.metadata.truncation.pagination`.

**Read this if you want a daily series.** Series stored as hourly snapshots of a
once-daily assessment (all marine/bunker codes, e.g. `VLSFO_SGSIN_USD`) spend the
entire 100-point budget on ~4-5 calendar days, so this endpoint cannot cover a week
for them. Use `/v1/prices/historical?by_code=…&start_date=…&end_date=…&per_page=500`,
which returns one point per day for the full window. Use `/v1/prices/past_day` for
intraday detail.

**Truncation is signalled.** When the response does not cover the requested window,
`data.metadata.truncation` is present — `truncated`, `points_returned`,
`points_available_in_window`, `window_requested` vs `window_covered` (including the
number of distinct days actually covered), and the `/v1/prices/historical` request
that returns the complete daily series. The response also carries `X-Truncated: true`.
When `data.metadata.truncation` is absent, the page covers the full requested window.

## Query parameters

- `by_code` 'ALUMINUM_USD' | 'AMMONIA_USD' | 'ASPHALT_USD' | 'AZERI_LIGHT_USD' | 'BAKKEN_DUC_WELLS' | 'BAKKEN_FRAC_SPREADS' | 'BIODIESEL_USD' | 'BRENT_CRUDE_USD' | 'CANADA_RIG_COUNT' | 'CAPP_COAL_USD' | 'CME_COAL_USD' | 'COAL_USD' | 'COKING_COAL_USD' | 'COPPER_USD' | 'CUSHING_STORAGE' | 'DIESEL_USD' | 'DUBAI_CRUDE_USD' | 'DUTCH_TTF_EUR' | 'DUTCH_TTF_NATURAL_GAS_USD' | 'EAGLEFORD_DUC_WELLS' | 'EAGLEFORD_FRAC_SPREADS' | 'ETHANOL_USD' | 'ETHYLENE_USD' | 'EUR_USD' | 'USD_NOK' | 'EUR_NOK' | 'EU_CARBON_EUR' | 'UK_CARBON_GBP' | 'GASOLINE_RBOB_USD' | 'GASOLINE_USD' | 'GBP_USD' | 'GOLD_USD' | 'SILVER_USD' | 'GOLD_AM_USD' | 'GOLD_AM_GBP' | 'GOLD_AM_EUR' | 'GOLD_PM_USD' | 'GOLD_PM_GBP' | 'GOLD_PM_EUR' | 'SILVER_FIX_USD' | 'SILVER_FIX_GBP' | 'SILVER_FIX_EUR' | 'HEATING_OIL_USD' | 'HFO_380_USD' | 'ILLINOIS_COAL_USD' | 'INTERNATIONAL_RIG_COUNT' | 'IRON_ORE_USD' | 'JET_A1_NWE_USD' | 'JET_FUEL_USD' | 'JKM_LNG_USD' | 'LEAD_USD' | 'MGO_05S_USD' | 'METHANOL_USD' | 'NAPHTHA_USD' | 'NICKEL_USD' | 'NATURAL_GAS_GBP' | 'NATURAL_GAS_STORAGE' | 'NATURAL_GAS_USD' | 'NEWCASTLE_COAL_USD' | 'NORTH_DAKOTA_WELL_PERMITS' | 'NYMEX_APPALACHIAN_USD' | 'NYMEX_WESTERN_RAIL_USD' | 'OKLAHOMA_WELL_PERMITS' | 'PALLADIUM_USD' | 'PERMIAN_DUC_WELLS' | 'PERMIAN_FRAC_SPREADS' | 'POLYETHYLENE_USD' | 'POLYPROPYLENE_USD' | 'PLATINUM_USD' | 'PRB_COAL_USD' | 'TAPIS_CRUDE_USD' | 'TIN_USD' | 'TEXAS_WELL_PERMITS' | 'ULSD_DIESEL_USD' | 'URALS_CRUDE_USD' | 'URANIUM_USD' | 'UREA_USD' | 'US_RIG_COUNT' | 'VLSFO_USD' | 'WCS_CRUDE_USD' | 'WTI_USD' | 'ZINC_USD'
- `by_type` 'spot_price' | 'daily_average_price'
- `start_date` string, date
- `end_date` string, date
- `interval` 'raw' | 'hourly' | 'daily' | 'weekly' | 'monthly'
- `per_page` integer
- `page` integer

## Response `200`

Past week price data

- PricesResponse
  - `prices` Price[]
    - `benchmark` PriceBenchmark: Semantic identity and provenance for WTI or Brent benchmark prices. Explicit contract identity is included only when known. WTI retains its early-roll policy; the selected delivery month may differ from the earliest unexpired contract. Compare contract_month and observed_at when comparing quotes.
      - `id` string: Stable benchmark identifier
      - `name` string: Benchmark instrument name
      - `instrument_type` string
      - `quote_type` string
      - `unit` string
      - `contract_month` string: Selected delivery month when explicitly known; omitted for an unidentified publisher-managed contract
      - `roll_method` string: How the selected observation identifies its contract
      - `roll_signal` string: Stored signal used in contract selection, when available. A signal does not by itself mean a roll occurred.
      - `observed_at` string, date-time, nullable: Source market observation time; null when unavailable, never substituted with collection time
      - `observation_time_basis` 'upstream_market' | 'unavailable'
      - `collected_at` string, date-time: Time the selected price row was collected
      - `source_tier` string: Selection tier of the observation
    - `price` number, float: Numeric price value
    - `formatted` string: Formatted price with currency symbol
    - `currency` string: Currency code
    - `code` string: Commodity code
    - `contract_month` string, nullable: For WTI_USD and BRENT_CRUDE_USD benchmark quotes, the selected backing row's delivery month (YYYY-MM), matching benchmark.contract_month when known. Null when the publisher-managed quote does not identify a month. This identifies the contract served; it does not necessarily mean the nearest unexpired contract, because a benchmark may roll before expiry.
    - `created_at` string, date-time: Timestamp when price was recorded
    - `updated_at` string, date-time: Timestamp when price was last updated (alias for created_at)
    - `type` string: Price type
    - `change_24h` number, float, nullable: Price change vs 24 hours ago (absolute value). Returns null when insufficient historical data exists for comparison. A value of 0.0 means the price is unchanged.
    - `change_24h_percent` number, float, nullable: Price change vs 24 hours ago (percentage). Returns null when insufficient historical data exists for comparison. A value of 0.0 means the price is unchanged.
  - `meta` object
    - `current_page` integer
    - `total_pages` integer
    - `total_count` integer
    - `per_page` integer

## Other responses

- `401`: Unauthorized
- `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 `prices/items/benchmark` to the response with the `200` status
  - added the optional property `prices/items/contract_month` to the response with the `200` status
- **2026-09-12** `d2f641b576d7`: 1 breaking
  - removed the enum value `HFO_180_USD` from the `query` request parameter `by_code`

[Operation history](https://skmtc.dev/oilpriceapi/apis/oil-price-api-v1/changes/v1/prices/past_week/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)
