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.
/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 |
|---|---|---|---|
| base | string (3) | optional | Filter rates by currency code. Must be a supported active currency code; otherwise returns 422. |
| category | string | optional | One of: gas, electricity, oil, coal, carbon_intensity. Invalid values return 422. |
| provider | string | optional | One 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
]
}
/latest
Returns the most recent available value for each requested symbol.
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | string | required | Comma-separated symbol names. E.g. BRENT_CRUDE,TTF_GAS,EUA_CO2. |
| base | string (3) | optional | Filter by currency code. Must be a supported active currency code; otherwise returns 422. |
| category | string | optional | Filter 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"
}
}
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.
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.
/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 |
|---|---|---|---|
| date | date (YYYY-MM-DD) | required | The date to query. |
| symbols | string | required | Comma-separated symbol names. |
| base | string (3) | optional | Filter 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"
}
}
/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 |
|---|---|---|---|
| start | date (YYYY-MM-DD) | required | Start date (inclusive). |
| end | date (YYYY-MM-DD) | required | End date (inclusive). Must be ≥ start. |
| symbols | string | required | Comma-separated symbol names. |
| base | string (3) | optional | Filter 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"
}
}
/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 |
|---|---|---|---|
| start | date (YYYY-MM-DD) | required | Start date of the period. |
| end | date (YYYY-MM-DD) | required | End date of the period. |
| symbols | string | required | Comma-separated symbol names. |
| base | string (3) | optional | Filter 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
}
}
}
start_date and end_date may differ from the requested dates. Use requested_start_date and requested_end_date to see the original input.
/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 |
|---|---|---|---|
| symbols | string | required | Comma-separated symbol names. |
| period | string | optional | One of: weekly, monthly (default), quarterly. |
| start | date (YYYY-MM-DD) | optional | Start date. Defaults to 1 year ago. |
| end | date (YYYY-MM-DD) | optional | End date. Defaults to today. |
| base | string (3) | optional | Filter 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.
/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"
/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"
/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"
/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"
/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"
/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"
/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"
/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"
/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}'
/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 |
|---|---|---|
| 401 | Unauthorized | Missing or invalid api_key query parameter. |
| 404 | Not Found | No data found for the given symbols or date. |
| 422 | Validation Error | Missing required parameter, invalid date format, or unsupported value (e.g. unknown category). |
| 429 | Too Many Requests | Per-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.