OilPriceAPI Docs
GitHub
GitHub
  • Interactive Explorer

    • Interactive API Explorer
  • Price Data

    • API Reference
    • Get Latest Prices
    • Historical Prices
  • Commodities

    • List Commodities
    • Get Commodity Details
  • AI Agents (MCP)

    • Get Market Brief
    • Subscriptions / Watches
    • Agent Subscriptions with MCP
  • Marine Fuels

    • List Marine Fuel Ports
    • Get Port Details with Prices
  • Premium Endpoints

    • All Prices API - One Call, All Commodities
    • Cushing Oil Storage Intelligence API
    • Drilling Intelligence API
    • Marine Fuels API
    • ICE Brent Futures API
  • Futures

    • Futures API
    • ICE Brent Futures
    • ICE WTI Futures
    • ICE Gas Oil Futures
    • NYMEX Natural Gas Futures
    • ICE EUA Carbon Futures
  • Dark Data (Premium)

    • Energy Intelligence API
    • Rig Counts
    • Well Permits
    • Oil Inventories
    • OPEC Production
    • Drilling Productivity
    • Forecasts (STEO)
  • Analytics

    • Analytics API
  • Account & Billing

    • Account API

Get Market Brief

Status: ✅ Available | ⚡ Real-time | 🤖 Built for AI agents

Returns a multi-commodity market snapshot in a single call: latest spot prices, 24-hour changes, 1-month forecasts (Brent, WTI, Natural Gas), and notable spreads. Optionally adds a plain-English narrative summary plus market context (active supply disruptions, key economic indicators).

This is the structured "morning brief" primitive used by the OilPriceAPI MCP server (opa_get_market_brief). It composes existing price data — it adds no new data sources and makes no LLM call — and counts as 1 request against your quota (same model as /prices/batch).

GET/v1/market-brief

An underscore alias, /v1/market_brief, is also accepted.

Authentication

See Authentication Guide for API key setup.

Authorization: Token YOUR_API_KEY
# Bearer is also accepted:
Authorization: Bearer YOUR_API_KEY

Parameters

ParameterTypeRequiredDescription
codesstringYesComma-separated commodity codes (e.g. BRENT_CRUDE_USD,WTI_USD). Shorthand aliases are resolved (WTI → WTI_USD).
narrativebooleanNoWhen true, adds a plain-English summary plus a context block (disruptions, economic indicators). Default: false.

Codes per brief (per plan)

The number of commodity codes allowed in a single brief scales with your plan:

PlanCodes per brief
Free3
Developer8
Starter15
Professional30
Scale50

The narrative is available on all tiers (including Free) — it is the deliberate hook for AI-agent use. Exceeding your code cap returns a BRIEF_CODE_LIMIT error (see below) with an upgrade URL.

Response

Success (200)

{
  "status": "success",
  "data": {
    "as_of": "2026-06-21T14:30:00Z",
    "codes": ["BRENT_CRUDE_USD", "WTI_USD"],
    "commodities": [
      {
        "code": "BRENT_CRUDE_USD",
        "name": "Brent Crude",
        "price": 78.42,
        "currency": "USD",
        "unit": "barrel",
        "change_24h_pct": 1.23,
        "change_24h_abs": 0.95,
        "as_of": "2026-06-21T14:25:00Z",
        "source": "oilprice.business_insider",
        "stale": false,
        "forecast_1m": {
          "point": 80.1,
          "low": 74.5,
          "high": 85.8,
          "confidence": 0.68
        }
      },
      {
        "code": "WTI_USD",
        "name": "WTI Crude",
        "price": 74.1,
        "currency": "USD",
        "unit": "barrel",
        "change_24h_pct": 1.05,
        "change_24h_abs": 0.77,
        "as_of": "2026-06-21T14:25:00Z",
        "source": "oilprice.business_insider",
        "stale": false,
        "forecast_1m": {
          "point": 75.9,
          "low": 70.2,
          "high": 81.4,
          "confidence": 0.65
        }
      }
    ],
    "spreads": [
      {
        "pair": "BRENT_CRUDE_USD/WTI_USD",
        "label": "Brent-WTI",
        "value": 4.32,
        "currency": "USD"
      }
    ]
  }
}

When narrative=true, the data object also includes:

{
  "summary": "Crude benchmarks firmed overnight, with Brent up 1.2% ...",
  "context": {
    "disruptions": [
      {
        "title": "Red Sea shipping diversions",
        "severity": "elevated",
        "region": "Middle East"
      }
    ],
    "indicators": [{ "name": "US Dollar Index", "value": 104.2 }]
  }
}

Response Fields

FieldTypeDescription
as_ofstringISO 8601 timestamp the brief was generated (UTC)
codesarrayResolved canonical codes included in the brief
commodities[]arrayOne object per commodity (see below)
commodities[].codestringCanonical commodity code
commodities[].namestringHuman-readable name
commodities[].pricenumberLatest spot price
commodities[].currencystringPrice currency (USD, EUR, GBP, GBp)
commodities[].unitstringPricing unit (e.g. "barrel")
commodities[].change_24h_pctnumber24-hour percent change
commodities[].change_24h_absnumber24-hour absolute change
commodities[].as_ofstringISO 8601 timestamp of the underlying price (UTC)
commodities[].sourcestringData source identifier
commodities[].stalebooleantrue if the price is older than your tier's freshness floor
commodities[].forecast_1mobject1-month forecast (Brent / WTI / Natural Gas only); omitted otherwise
commodities[].forecast_1m.pointnumberPoint estimate
commodities[].forecast_1m.lownumberLower bound
commodities[].forecast_1m.highnumberUpper bound
commodities[].forecast_1m.confidencenumberConfidence (0–1)
spreads[]arrayNotable spreads between included commodities
summarystringPlain-English summary (only when narrative=true)
contextobjectDisruptions + indicators (only when narrative=true)

Errors

CodeStatusDescription
VALIDATION_ERROR400codes parameter missing, or one or more codes invalid (response includes fuzzy suggestions)
BRIEF_CODE_LIMIT422Requested more codes than your plan allows; response includes limit, requested, and upgrade_url
INVALID_API_KEY401Missing or invalid API key
RATE_LIMIT_EXCEEDED429Rate limit exceeded

Example BRIEF_CODE_LIMIT response:

{
  "status": "error",
  "error": "BRIEF_CODE_LIMIT",
  "message": "Your plan allows up to 3 commodity codes per market-brief (requested: 5). Upgrade for more.",
  "limit": 3,
  "requested": 5,
  "upgrade_url": "https://oilpriceapi.com/pricing?utm_source=api&utm_medium=market_brief&utm_campaign=brief_code_limit"
}

Examples

# Structured brief for two crude benchmarks
curl "https://api.oilpriceapi.com/v1/market-brief?codes=BRENT_CRUDE_USD,WTI_USD" \
  -H "Authorization: Token YOUR_API_KEY"

# Add a plain-English narrative + market context
curl "https://api.oilpriceapi.com/v1/market-brief?codes=BRENT_CRUDE_USD,WTI_USD,NATURAL_GAS_USD&narrative=true" \
  -H "Authorization: Token YOUR_API_KEY"
# Python
import requests

def market_brief(codes, narrative=False):
    url = 'https://api.oilpriceapi.com/v1/market-brief'
    headers = {'Authorization': 'Token YOUR_API_KEY'}
    params = {'codes': ','.join(codes)}
    if narrative:
        params['narrative'] = 'true'

    response = requests.get(url, headers=headers, params=params)
    data = response.json()['data']

    for c in data['commodities']:
        print(f"{c['name']}: {c['price']} {c['currency']} "
              f"({c['change_24h_pct']:+}% 24h)")
    return data

market_brief(['BRENT_CRUDE_USD', 'WTI_USD'], narrative=True)
// JavaScript
async function marketBrief(codes, narrative = false) {
  const params = new URLSearchParams({ codes: codes.join(",") });
  if (narrative) params.set("narrative", "true");

  const response = await fetch(
    `https://api.oilpriceapi.com/v1/market-brief?${params}`,
    { headers: { Authorization: "Token YOUR_API_KEY" } },
  );

  const { data } = await response.json();
  for (const c of data.commodities) {
    console.log(
      `${c.name}: ${c.price} ${c.currency} (${c.change_24h_pct}% 24h)`,
    );
  }
  return data;
}

Best Practices

  • Batch commodities: request everything you need in one brief rather than many single-price calls — the brief counts as 1 request.
  • Use narrative for agents: when an AI agent needs a human-readable read of the market, narrative=true returns a ready-to-relay summary.
  • Check stale: on paid tiers a stale: true flag means the underlying price is older than your tier's freshness floor.
  • For recurring monitoring, create a Subscription / Watch instead of polling this endpoint on a schedule.

Related

  • Subscriptions / Watches - Recurring, poll-based monitoring
  • Agent Subscriptions with MCP - AI-agent recipe
  • Get Latest Prices - Single-commodity spot price
  • Batch Prices - Multiple prices in one call
Last Updated: 6/21/26, 9:07 PM
Next
Subscriptions / Watches