Demo (No Auth)

Get demo prices (No authentication required)

Changed on

Start here - no API key needed!

Returns the latest prices for free-tier commodities. Perfect for testing the API before signing up or for embedding in documentation examples.

Available commodities:

  • Brent Crude Oil (BRENT_CRUDE_USD)
  • WTI Crude Oil (WTI_USD)
  • Natural Gas Henry Hub (NATURAL_GAS_USD)
  • Gold (GOLD_USD)
  • Gold AM/PM Fix (GOLD_AM_USD, GOLD_AM_GBP, GOLD_AM_EUR, GOLD_PM_USD, GOLD_PM_GBP, GOLD_PM_EUR)
  • Silver (SILVER_USD)
  • Silver Fix (SILVER_FIX_USD, SILVER_FIX_GBP, SILVER_FIX_EUR)
  • EUR/USD (EUR_USD)
  • USD/NOK (USD_NOK)
  • EUR/NOK (EUR_NOK)
  • GBP/USD (GBP_USD)
  • Heating Oil (HEATING_OIL_USD)
  • Gasoline RBOB (GASOLINE_USD)
  • Diesel (DIESEL_USD)

Rate limit: 25 requests per day, per IP (no key required). The count resets at 00:00 UTC.

Batch size: up to 20 codes per request (?codes=A,B,C), counted as a single request — the same cap the authenticated /v1/prices/latest enforces. More than 20 returns 400. With no parameters the endpoint returns the first 20 free codes.

Need more? Get a free API key for full access.

get/v1/demo/prices

Request

  • Base URL
    https://api.oilpriceapi.com
  • Auth
    none required

Response

Demo price data with code examples

statusstring

Example response

{
  "status": "success",
  "data": {
    "prices": [
      {
        "code": "BRENT_CRUDE_USD",
        "name": "Brent Crude Oil",
        "price": 75.42,
        "currency": "USD",
        "benchmark": {
          "id": "nymex_wti_front_month",
          "instrument_type": "front_month_futures",
          "quote_type": "indicative_last_price",
          "unit": "barrel",
          "contract_month": "2026-12",
          "roll_method": "explicit_contract_curve",
          "roll_signal": "volume"
        },
        "source": "OilPriceAPI"
      }
    ],
    "meta": {
      "demo_mode": true,
      "rate_limit": "25 requests per day, per IP",
      "signup_url": "https://www.oilpriceapi.com/signup",
      "documentation_url": "https://docs.oilpriceapi.com"
    }
  }
}

Changes

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status