An official service of the Energy Commission of Nigeria.
REST API · v1
NEDB Public API
Open access to the energy statistics the Energy Commission has published. A series appears here only once it has been published for public access; withheld series are not served. Base URL: https://nedb.vercel.app
GET
/api/series
List all active data series. Returns metadata, frequency, and record count for each series.
Example Response
[{ "id": "crude_oil_production", "name": "Crude Oil Production", "sector": "petroleum", "unit_default": "M Barrels", "frequency": "monthly", "viz_types": ["line","stacked-area"], "record_count": 48 }]GET
/api/series/{id}
Full metadata for a single series.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | Series type ID, e.g. crude_oil_production |
Example Response
{ "id": "...", "name": "...", "sector": "...", "unit_default": "M Barrels", "frequency": "monthly" }GET
/api/series/{id}/data
Paginated time-series records for a series. Filterable by region, period range, and page.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | Series type ID |
| region | query | string | ISO 3166-2:NG state or NGA for national |
| period_from | query | string | Start period, e.g. 2020-01 |
| period_to | query | string | End period, e.g. 2024-12 |
| page | query | integer | Page number (default 1) |
| limit | query | integer | Records per page (max 500, default 100) |
Example Request
GET https://nedb.vercel.app/api/series/crude_oil_production/data?period_from=2022-01&period_to=2023-12
Example Response
{ "rows": [...], "total": 24, "page": 1, "limit": 100 }GET
/api/series/{id}/stats
Auto-computed statistics: latest value, YoY change, MoM change, CAGR, rolling 3-period and 12-period averages.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | Series type ID |
Example Response
{ "latest": 85.4, "latest_period": "2024-06", "yoy_pct": 3.2, "mom_pct": -1.1, "cagr": 2.8, "rolling_3": 84.1, "rolling_12": 83.7, "unit": "M Barrels" }GET
/api/series/{id}/export
Download all records for a series as CSV or Excel (XLSX). Excel includes a metadata sheet.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | Series type ID |
| format | query | string | csv (default) or xlsx |
| year | query | string | Filter by year, e.g. 2023 |
| region | query | string | Filter by region |
Example Request
GET https://nedb.vercel.app/api/series/electricity_generation/export?format=xlsx&year=2023
POSTX-API-Key required
/api/iot/ingest
Real-time data ingest from IoT field devices and EOM systems. Accepts a single reading or a batch of up to 100 readings. Authenticate with X-API-Key header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| series_type_id* | body | string | Target series |
| period* | body | string | e.g. 2026-06 or 2026-Q2 |
| period_date* | body | string | ISO date e.g. 2026-06-01 |
| value* | body | number | Numeric reading |
| unit* | body | string | Must match series unit_default |
| region | body | string | NGA for national (default) |
| device_id | body | string | EOM device identifier |
| readings | body | array | Array of readings for batch ingest |
Example Request
POST https://nedb.vercel.app/api/iot/ingest
X-API-Key: <your-key>
Content-Type: application/json
{
"series_type_id": "crude_oil_production",
"period": "2026-06",
"period_date": "2026-06-01",
"value": 85.4,
"unit": "M Barrels",
"region": "NGA"
}Example Response
{ "inserted": 1, "series_type_id": "crude_oil_production" }GET
/api/health
System health check. Returns database and cache connectivity status.
Example Response
{ "status": "ok", "db": "ok", "ts": "2026-06-30T10:00:00.000Z" }Usage & Rate Limits
Authentication
No key needed to read published data. An API key raises your rate limit and is supplied in an X-API-Key header; it does not widen what you can see. Request one from ECN Data Management.
Rate limits
60 requests/minute for anonymous callers, 600/minute with an API key. Use the export endpoint for bulk downloads rather than paging the data endpoint.
Data licence
Published under ECN Open Data Policy. Attribution required: cite NEDB (Energy Commission of Nigeria).
Coverage
Only published series are served. An unpublished series returns 404, and each series exposes only the fields the Commission has published for it.
Format
All responses are JSON (UTF-8). Export endpoint returns CSV or XLSX. All dates are ISO 8601.
Contact
For API access issues or data queries, contact ECN Data Management at data@energy.gov.ng