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 (header auth such as Authorization: Bearer is not supported).
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 across European and global markets.
Gas category=gas
Natural gas benchmarks for EU and US wholesale markets.
Oil category=oil
Crude oil spot prices from major global benchmarks.
Coal category=coal
Thermal coal benchmarks for Atlantic and Pacific basins.
Carbon category=carbon
EU ETS allowance prices for compliance and trading.
Carbon Intensity category=carbon_intensity
Grid emissions intensity in gCO₂eq/kWh by country.
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, carbon_intensity. Invalid values return 422. |
| provider | string | optional | One of: omie, fred, eia, entsoe, esios, ember, electricity_maps, nasdaq, energy_charts, gridstatus, aemo, 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, 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
},
"dates": {
"BRENT_CRUDE": "2025-09-15",
"TTF_GAS": "2025-09-01"
},
"currencies": {
"BRENT_CRUDE": "USD",
"TTF_GAS": "EUR"
}
}
date echoes your requested date as-is. The per-symbol dates map shows the date each value actually came from — it may differ from the requested date on a non-publishing day (weekend/holiday) or for monthly/weekly symbols.
/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=2025-12-31&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=2025-12-31" \
--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": "2025-12-31",
"rates": {
"BRENT_CRUDE": {
"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,
"high": 82.10,
"low": 68.45
},
"EUA_CO2": {
"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,
"high": 70.20,
"low": 55.10
}
}
}
start_date/end_date echo your requested range as-is. The per-symbol start_date/end_date reflect the first and last dates that symbol actually published inside that range, so they may differ from the requested boundary on a non-publishing day (holiday/weekend/provider gap).
/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 absent when the Nasdaq/ICE feed is unavailable (see coverage_note).
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. Country-level series require a working Electricity Maps feed (see GET /status); CARBON_INT_EU is sourced from Ember.
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. When multiple electricity symbols exist for a country (e.g. ES: OMIE_ES_DA + PVPC_ES_2TD), the day-ahead wholesale symbol (*_DA) is preferred. |
| kwh_per_month | number | required | Monthly consumption in kWh. |
Example request
curl -X 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 monthly request quota, a per-minute rate limit, and timeseries date-range caps. All endpoints — including POST /cost-estimate — count toward the same monthly quota. Quotas reset on the 1st of each month (UTC). Monitor usage from your dashboard.
• Guest playground (homepage, no account): 3 calls per month.
• Free account: 20 API calls per month after signup (no credit card).
• Paid plan limits below apply once you subscribe or start a trial.
| Plan | Requests / month | Timeseries | Req / min |
|---|---|---|---|
| Starter | 5,000 | 1 year | 60 |
| Professional | 15,000 | 5 years | 120 |
| Business | 40,000 | Full history | 240 |
| Enterprise | Custom | Full history | Custom |
• When the per-minute limit is exceeded the API returns HTTP 429. Implement exponential back-off in your client.
• When the monthly quota is exhausted the API returns HTTP 429 until the next billing month or you upgrade.
• Use the symbols parameter to request only what you need — this is the most effective way to reduce quota consumption.
• Need higher 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.