Developer Reference

API Documentation

Complete reference for the Energy API — electricity, gas, oil, coal, carbon, and carbon intensity prices.

Sections

Introduction

Energy API aggregates price data from official exchanges and agencies — OMIE, ENTSO-E, ESIOS, EIA/FRED, Ember, Electricity Maps, AEMO, and more — and normalizes it under a single REST interface. Query by symbol for full flexibility, or use category endpoints for common product workflows.

The API exposes 16 endpoints: six generic symbol-based routes (/latest, /timeseries, …) plus ten category endpoints for electricity intraday curves, gas/coal/emissions shortcuts, carbon intensity, day-ahead forecasts, cost estimates, and provider status.

Data update frequency follows each source's publication schedule (see GET /status). The dates field in responses shows the exact observation date per symbol.

Base URL

https://energy-api.com/api/v1

Authentication

All requests must include your API key using the api_key query parameter.

Replace YOUR_API_KEY with your actual key from your dashboard.

Try in your browser

https://energy-api.com/api/v1/latest?symbols=BRENT_CRUDE,TTF_GAS&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/latest \
  --data-urlencode "symbols=BRENT_CRUDE,TTF_GAS" \
  --data-urlencode "api_key=YOUR_API_KEY"

Keep your API key secret. Never expose it in client-side JavaScript or public repositories. If a key is compromised, rotate it immediately from the dashboard.

Symbol Model

Every price is identified by a normalized symbol — a stable string like BRENT_CRUDE or OMIE_ES_DA. Symbols are grouped into six categories:

Electricity category=electricity

Day-ahead and spot power prices. Examples: OMIE_ES_DA, EPEX_DE_DA, PVPC_ES_2TD, AEMO_NSW1.

Gas category=gas

Natural gas benchmarks. Examples: TTF_GAS (EU monthly), HENRY_HUB (US daily).

Oil category=oil

Crude oil spot prices. Examples: BRENT_CRUDE, WTI_CRUDE.

Coal category=coal

Thermal coal benchmarks. Examples: COAL_ROTTERDAM, COAL_NEWCASTLE.

Carbon category=carbon

EU ETS allowance prices. Example: EUA_CO2.

Carbon Intensity category=carbon_intensity

Grid emissions intensity in gCO₂eq/kWh. Examples: CARBON_INT_DE, CARBON_INT_EU.

Use GET /symbols to list all active symbols with metadata. Pass category or base to filter. The base parameter filters by currency code (e.g. base=EUR returns all EUR-denominated symbols).

Validation note: if base does not match a supported active currency code, the API returns 422.

GET /symbols

Discover all available energy price symbols with their metadata. Use this endpoint to build dynamic symbol pickers or validate that a symbol exists before querying other endpoints.

Parameters

Param Type Required Description
basestring (3)optionalFilter rates by currency code. Must be a supported active currency code; otherwise returns 422.
categorystringoptionalOne of: gas, electricity, oil, coal, carbon_intensity. Invalid values return 422.
providerstringoptionalOne of: fred, omie, eex. Invalid values return 422 including the allowed list.

Example request

Try in your browser

https://energy-api.com/api/v1/symbols?category=gas&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/symbols \
  --data-urlencode "category=gas" \
  --data-urlencode "api_key=YOUR_API_KEY"

Response

{
  "success": true,
  "count": 3,
  "symbols": [
    {
      "symbol":        "TTF_GAS",
      "name":          "TTF Natural Gas Day-Ahead",
      "category":      "gas",
      "country_code":  "EU",
      "currency_code": "EUR",
      "frequency":     "daily",
      "description":   "TTF day-ahead price for natural gas delivery at the Title Transfer Facility hub. Published by EEX."
    },
    {
      "symbol":        "HENRY_HUB",
      "name":          "Henry Hub Natural Gas Spot Price",
      "category":      "gas",
      "country_code":  "US",
      "currency_code": "USD",
      "frequency":     "daily",
      "description":   "Henry Hub spot price for natural gas in USD/MMBtu. Published by EIA/FRED."
    }
    // ... more symbols
  ]
}
GET /latest

Returns the most recent available value for each requested symbol.

Parameters

Param Type Required Description
symbolsstringrequiredComma-separated symbol names. E.g. BRENT_CRUDE,TTF_GAS,EUA_CO2.
basestring (3)optionalFilter by currency code. Must be a supported active currency code; otherwise returns 422.
categorystringoptionalFilter by category. One of: gas, electricity, oil, coal, carbon_intensity.

Example request

Try in your browser

https://energy-api.com/api/v1/latest?symbols=BRENT_CRUDE,TTF_GAS,EUA_CO2,OMIE_ES_DA&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/latest \
  --data-urlencode "symbols=BRENT_CRUDE,TTF_GAS,EUA_CO2,OMIE_ES_DA" \
  --data-urlencode "api_key=YOUR_API_KEY"

Response

{
  "success": true,
  "date":    "2026-06-11",
  "base":    "MIXED",
  "rates": {
    "BRENT_CRUDE": 74.82,
    "TTF_GAS":      38.15,
    "EUA_CO2":    67.40,
    "OMIE_ES_DA":  82.30
  },
  "dates": {
    "BRENT_CRUDE": "2026-06-11",
    "TTF_GAS":      "2026-06-11",
    "EUA_CO2":    "2026-06-11",
    "OMIE_ES_DA":  "2026-06-11"
  },
  "currencies": {
    "BRENT_CRUDE": "USD",
    "TTF_GAS":      "EUR",
    "EUA_CO2":    "EUR",
    "OMIE_ES_DA":  "EUR"
  }
}
Important: if you pass base, symbols with a different currency code are excluded. For example, with base=USD, EUR-denominated symbols like TTF_GAS or EUA_CO2 will not be returned.
The top-level date is the most recent date across all returned prices. Use the dates object to see the exact observation date per symbol — energy markets generally publish daily on business days.
GET /historical

Returns values for all requested symbols on a specific date. If a symbol does not publish on the exact date requested (e.g., weekend), the API returns the most recent available value before that date.

Parameters

Param Type Required Description
datedate (YYYY-MM-DD)requiredThe date to query.
symbolsstringrequiredComma-separated symbol names.
basestring (3)optionalFilter rates by currency code. Must be a supported active currency code; otherwise returns 422.

Example request

Try in your browser

https://energy-api.com/api/v1/historical?date=2025-09-15&symbols=BRENT_CRUDE,TTF_GAS&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/historical \
  --data-urlencode "date=2025-09-15" \
  --data-urlencode "symbols=BRENT_CRUDE,TTF_GAS" \
  --data-urlencode "api_key=YOUR_API_KEY"

Response

{
  "success": true,
  "date":    "2025-09-15",
  "base":    "MIXED",
  "rates": {
    "BRENT_CRUDE": 71.45,
    "TTF_GAS":      36.20
  },
  "currencies": {
    "BRENT_CRUDE": "USD",
    "TTF_GAS":      "EUR"
  }
}
GET /timeseries

Returns all observations for the requested symbols between start and end, keyed by date. Ideal for charting and trend analysis.

Parameters

Param Type Required Description
startdate (YYYY-MM-DD)requiredStart date (inclusive).
enddate (YYYY-MM-DD)requiredEnd date (inclusive). Must be ≥ start.
symbolsstringrequiredComma-separated symbol names.
basestring (3)optionalFilter rates by currency code. Must be a supported active currency code; otherwise returns 422.

Example request

Try in your browser

https://energy-api.com/api/v1/timeseries?start=2025-01-01&end=2025-03-31&symbols=BRENT_CRUDE,TTF_GAS&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/timeseries \
  --data-urlencode "start=2025-01-01" \
  --data-urlencode "end=2025-03-31" \
  --data-urlencode "symbols=BRENT_CRUDE,TTF_GAS" \
  --data-urlencode "api_key=YOUR_API_KEY"

Response

{
  "success":    true,
  "base":       "MIXED",
  "start_date": "2025-01-01",
  "end_date":   "2025-03-31",
  "rates": {
    "BRENT_CRUDE": {
      "2025-01-02": 76.30,
      "2025-01-03": 75.90,
      "2025-01-06": 76.15
      // ... daily observations
    },
    "TTF_GAS": {
      "2025-01-02": 46.80,
      "2025-01-03": 47.10,
      "2025-01-06": 45.90
      // ... daily observations
    }
  },
  "frequencies": {
    "BRENT_CRUDE": "daily",
    "TTF_GAS":      "daily"
  },
  "currencies": {
    "BRENT_CRUDE": "USD",
    "TTF_GAS":      "EUR"
  }
}
GET /fluctuation

Returns the start value, end value, absolute change, and percentage change for each symbol over the requested period. Calculations use the first and last available observations inside the requested range (not synthetic values for missing days).

Parameters

Param Type Required Description
startdate (YYYY-MM-DD)requiredStart date of the period.
enddate (YYYY-MM-DD)requiredEnd date of the period.
symbolsstringrequiredComma-separated symbol names.
basestring (3)optionalFilter rates by currency code. Must be a supported active currency code; otherwise returns 422.

Example request

Try in your browser

https://energy-api.com/api/v1/fluctuation?start=2025-01-01&end=2026-01-01&symbols=BRENT_CRUDE,EUA_CO2&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/fluctuation \
  --data-urlencode "start=2025-01-01" \
  --data-urlencode "end=2026-01-01" \
  --data-urlencode "symbols=BRENT_CRUDE,EUA_CO2" \
  --data-urlencode "api_key=YOUR_API_KEY"

Response

{
  "success":    true,
  "base":       "MIXED",
  "start_date": "2025-01-01",
  "end_date":   "2026-01-01",
  "rates": {
    "BRENT_CRUDE": {
      "requested_start_date": "2025-01-01",
      "requested_end_date": "2026-01-01",
      "start_date": "2025-01-02",
      "end_date": "2025-12-31",
      "start_value": 76.30,
      "end_value":   74.82,
      "change":      -1.48,
      "change_pct":  -1.9398
    },
    "EUA_CO2": {
      "requested_start_date": "2025-01-01",
      "requested_end_date": "2026-01-01",
      "start_date": "2025-01-02",
      "end_date": "2025-12-31",
      "start_value": 58.40,
      "end_value":   67.40,
      "change":      9.00,
      "change_pct":  15.4110
    }
  }
}
Date alignment note: if your requested boundary falls on a non-publishing day (holiday/weekend/provider gap), start_date and end_date may differ from the requested dates. Use requested_start_date and requested_end_date to see the original input.
Why this happens: providers do not publish every calendar day. Most series are business-day only (no weekends/holidays), and some symbols are monthly or weekly by definition. The endpoint therefore computes fluctuation from the first and last available observations inside the requested window.
GET /ohlc

Returns open/high/low/close aggregates for each symbol over weekly, monthly, or quarterly periods. Designed for charting libraries and volatility analysis dashboards.

Parameters

Param Type Required Description
symbolsstringrequiredComma-separated symbol names.
periodstringoptionalOne of: weekly, monthly (default), quarterly.
startdate (YYYY-MM-DD)optionalStart date. Defaults to 1 year ago.
enddate (YYYY-MM-DD)optionalEnd date. Defaults to today.
basestring (3)optionalFilter rates by currency code. Must be a supported active currency code; otherwise returns 422.

Example request

Try in your browser

https://energy-api.com/api/v1/ohlc?symbols=BRENT_CRUDE&period=monthly&start=2025-01-01&end=2025-06-30&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/ohlc \
  --data-urlencode "symbols=BRENT_CRUDE" \
  --data-urlencode "period=monthly" \
  --data-urlencode "start=2025-01-01" \
  --data-urlencode "end=2025-06-30" \
  --data-urlencode "api_key=YOUR_API_KEY"

Response

{
  "success":    true,
  "period":     "monthly",
  "start_date": "2025-01-01",
  "end_date":   "2025-06-30",
  "rates": {
    "BRENT_CRUDE": [
      {
        "period":      "2025-01",
        "open":        76.30,
        "high":        80.15,
        "low":         73.20,
        "close":       78.40,
        "data_points": 22
      },
      {
        "period":      "2025-02",
        "open":        78.40,
        "high":        79.80,
        "low":         72.50,
        "close":       74.90,
        "data_points": 20
      }
      // ... more periods
    ]
  }
}

Category Endpoints

Higher-level endpoints shaped for common product use cases. Same authentication, quotas, and rate limits as the generic symbol endpoints above.

GET /electricity/latest

Electricity Latest

Returns the latest electricity prices for all active electricity symbols. Optional country filter (ISO-2). Response shape matches GET /latest.

Parameters

Name Type Required Description
country string optional ISO-2 country code, e.g. ES, DE, FR.
base string optional Filter by currency code (EUR, USD, …).

Example request

Try in your browser

https://energy-api.com/api/v1/electricity/latest?country=ES&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/electricity/latest \
  --data-urlencode "country=ES" \
  --data-urlencode "api_key=YOUR_API_KEY"
GET /electricity/hourly

Electricity Hourly (Intraday)

Full intraday price curve for one electricity symbol on a given date. Returns 15-min, hourly, or 5-min points depending on the symbol. Only symbols with has_intraday_storage=true are supported (404 otherwise).

Parameters

Name Type Required Description
symbol string required Electricity symbol, e.g. OMIE_ES_DA, PVPC_ES_2TD.
date date required Calendar date (YYYY-MM-DD).

Example request

Try in your browser

https://energy-api.com/api/v1/electricity/hourly?symbol=OMIE_ES_DA&date=2026-06-18&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/electricity/hourly \
  --data-urlencode "symbol=OMIE_ES_DA" \
  --data-urlencode "date=2026-06-18" \
  --data-urlencode "api_key=YOUR_API_KEY"
GET /electricity/pvpc

PVPC (Spain)

Hourly Spanish PVPC reference prices for a date. Convenience wrapper around PVPC_ES_2TD with friendly field names (hours, price_eur_mwh).

Parameters

Name Type Required Description
date date required Calendar date (YYYY-MM-DD).

Example request

Try in your browser

https://energy-api.com/api/v1/electricity/pvpc?date=2026-06-18&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/electricity/pvpc \
  --data-urlencode "date=2026-06-18" \
  --data-urlencode "api_key=YOUR_API_KEY"
GET /gas/latest

Gas Latest

Latest TTF_GAS (EU) and HENRY_HUB (US) prices. NBP, JKM, and AECO are not sourced — they are absent from the response, not returned as null.

Parameters

Name Type Required Description
base string optional Filter by currency code.

Example request

Try in your browser

https://energy-api.com/api/v1/gas/latest?api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/gas/latest \
  --data-urlencode "api_key=YOUR_API_KEY"
GET /emissions/latest

Emissions Latest

Latest EU ETS allowance price (EUA_CO2). UK ETS is not currently sourced.

Parameters

Name Type Required Description
base string optional Filter by currency code.

Example request

Try in your browser

https://energy-api.com/api/v1/emissions/latest?api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/emissions/latest \
  --data-urlencode "api_key=YOUR_API_KEY"
GET /coal/latest

Coal Latest

Latest COAL_ROTTERDAM and COAL_NEWCASTLE prices. Rotterdam may be missing if the Nasdaq feed is blocked.

Parameters

Name Type Required Description
base string optional Filter by currency code.

Example request

Try in your browser

https://energy-api.com/api/v1/coal/latest?api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/coal/latest \
  --data-urlencode "api_key=YOUR_API_KEY"
GET /carbon-intensity

Carbon Intensity

Latest grid carbon intensity values (gCO₂eq/kWh) for carbon_intensity symbols. Optional country filter.

Parameters

Name Type Required Description
country string optional ISO-2 country code, e.g. ES, DE, GB.
base string optional Pseudo-currency CO2 for intensity symbols.

Example request

Try in your browser

https://energy-api.com/api/v1/carbon-intensity?country=ES&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/carbon-intensity \
  --data-urlencode "country=ES" \
  --data-urlencode "api_key=YOUR_API_KEY"
GET /forecast

Forecast (Day-Ahead)

Returns the next published day-ahead price for auction-sourced electricity symbols. This is a deterministic lookup of already-published auction results, not a predictive model. Returns 404 for monthly symbols (EUA_CO2) and providers without day-ahead auctions.

Parameters

Name Type Required Description
symbol string required Day-ahead electricity symbol, e.g. OMIE_ES_DA.

Example request

Try in your browser

https://energy-api.com/api/v1/forecast?symbol=OMIE_ES_DA&api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/forecast \
  --data-urlencode "symbol=OMIE_ES_DA" \
  --data-urlencode "api_key=YOUR_API_KEY"
POST /cost-estimate

Cost Estimate

Simple monthly wholesale electricity cost estimate: latest daily-average price × kWh/month. Does not include taxes, network charges, or hourly usage profiles (see methodology_note in response).

Parameters

Name Type Required Description
symbol string required* Electricity symbol. Required if country is omitted.
country string required* ISO-2 country code. Required if symbol is omitted.
kwh_per_month number required Monthly consumption in kWh.

Example request

curl -X POST "POST https://energy-api.com/api/v1/cost-estimate?api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol":"OMIE_ES_DA","kwh_per_month":250}'
GET /status

Provider Status

Last fetch log entry per data provider — useful for monitoring pipeline health.

Example request

Try in your browser

https://energy-api.com/api/v1/status?api_key=YOUR_API_KEY

Example using cURL

curl -G https://energy-api.com/api/v1/status \
  --data-urlencode "api_key=YOUR_API_KEY"

Error Codes

All errors return a consistent JSON payload with success: false and a human-readable error message.

{
  "success": false,
  "error": "No symbols matched the requested base currency (USD). Requested symbol currencies: BANXICO_RATE=MXN."
}
HTTP Code Meaning Common cause
401UnauthorizedMissing or invalid api_key query parameter.
404Not FoundNo data found for the given symbols or date.
422Validation ErrorMissing required parameter, invalid date format, or unsupported value (e.g. unknown category).
429Too Many RequestsPer-minute rate limit exceeded. Back off and retry after a few seconds.

Rate Limits & Quotas

Each plan has a daily request quota, a per-minute rate limit, timeseries date-range caps, and a monthly cap on POST /cost-estimate. Quotas reset at midnight UTC. Monitor usage from your dashboard.

Plan Requests / day Timeseries Cost-estimate Req / min
Starter Unlimited Full history Unlimited 100
Pro Unlimited Full history Unlimited 500

• When the per-minute limit is exceeded the API returns HTTP 429. Implement exponential back-off in your client.

• When the daily quota is exhausted the API returns HTTP 429 until the next UTC day or you upgrade.

• Use the symbols parameter to request only what you need — this is the most effective way to reduce quota consumption.

• Need unlimited volume? Contact us about Business or Enterprise.

Ready to start building?

Get your API key, make your first request in under 2 minutes, and start shipping energy price features today.