Main
DashboardAPI DocsData SourcesAbout
Economy
GDP GrowthInflationInterest Rate
Currency
Exchange RateMulti-CurrencyNFEM RatesCurrency Converter
CBN Data
FX ReservesCurrency CirculationAssets & LiabilitiesFinancial Statement
Analytics
OverviewCompare IndicatorsReform ImpactBriefing StudioPipeline Playground

Nigeria Economic Data — Open API

Free. Public read-only anon key. No rate limits beyond Supabase's free tier.

https://npedata-api.onrender.com
How It Works

A FastAPI backend hosted on Render aggregates and serves the underlying Supabase data through purpose-built REST endpoints. No authentication, no API key, CORS fully open. Interactive Swagger documentation with live request testing is available at /docs on the base URL above. Machine-readable docs for AI agents/LLMs: /llms.txt. Live API and database health: status page.

REST Maturity — Richardson Maturity Model Level 3

Every JSON response carries a _links block describing the available next actions, so the entire API is navigable from the root without hardcoding any URL but the base — full HATEOAS, not just CRUD endpoints with status codes.

✓ Level 1 — Resources identified by URI (one endpoint per resource)
✓ Level 2 — Proper HTTP verbs & status codes (GET reads, POST ingestion, 404 on unknown indicator)
✓ Level 3 — Hypermedia controls: every response includes _links (CSV downloads carry an RFC 8288 Link header instead)
GET /api/v1/gdp
{
  "gdp_growth": [ ... ],
  "source": "NBS and World Bank",
  "_links": {
    "self":       { "href": ".../api/v1/gdp" },
    "analytics":  { "href": ".../api/v1/analytics/gdp_growth" },
    "export_csv": { "href": ".../api/v1/export/gdp_growth" },
    "summary":    { "href": ".../api/v1/summary" },
    "coverage":   { "href": ".../api/v1/coverage" }
  }
}

Endpoints

Press Try it on any endpoint to run it live from your browser — the real response, status code and timing appear right here on the page. (First call may take up to ~30s while the free-tier server wakes.)

GET
/api/v1/summary

Latest single value for all five headline indicators — GDP, Inflation, Exchange Rate, MPR, FX Reserves. Ideal for KPI dashboards.

Try it →
GET
/api/v1/gdp

Quarterly real GDP growth rate (%) and annual nominal GDP in USD billions. Optional start and end date params.

Try it →
GET
/api/v1/inflation

Monthly headline, food, and core inflation rates. Optional date range params. Source: NBS CPI Report.

Try it →
GET
/api/v1/exchange-rate

Monthly average NGN/USD official rate, capturing the full impact of the June 2023 FX unification reform.

Try it →
GET
/api/v1/interest-rate

CBN Monetary Policy Rate (MPR) at each MPC decision date. Rose from 11.5% to 27.5% between 2022 and 2024.

Try it →
GET
/api/v1/fx-reserves

Monthly gross, liquid and blocked foreign exchange reserves plus block percentage. CBN data 2020–2026.

Try it →
GET
/api/v1/currency-circulation

Currency in circulation (NGN millions) — full history from 2002 to 2024. Source: CBN Statistical Bulletin.

Try it →
GET
/api/v1/nfem

NFEM daily rates — closing, highest, lowest and weighted average. December 2024 to April 2026.

Try it →
GET
/api/v1/multicurrency

Buying, central and selling rates for 11 currencies (USD, GBP, EUR, CNY, CHF, ZAR, AED, SAR, SDR, CFA, WAUA). AED coverage is Jan–Apr 2026 only; all others span 2020–2026. Optional ?currency= filter.

Try it →
GET
/api/v1/gdp-sectors

Real GDP by sector — agriculture, industry, services, manufacturing, telecoms, construction and trade. NBS data.

Try it →
GET
/api/v1/cbn-balance-sheet

CBN balance sheet — total assets, liabilities, gold and currency issued. 2005 to 2023.

Try it →
GET
/api/v1/analytics

Pearson correlation between inflation and the exchange rate over 2020–2026 — a strong positive association consistent with the June 2023 FX reform as a common driver (correlation, not proof of causation).

Try it →
GET
/api/v1/analytics/{indicator_id}

Full analytical profile of one indicator — latest value, period change, year-on-year comparison, trend direction and a simple linear-regression forecast (?forecast_periods=, 1–12).

Try it →
GET
/api/v1/coverage

Data-coverage report: observation counts, first/last dates, min/max values and sources for every indicator exposed through the analytics layer.

Try it →
GET
/api/v1/export/{indicator_id}

Download any indicator's full series as CSV. Hypermedia for the non-JSON body travels in an RFC 8288 Link header, keeping the API Level 3 end to end.

Try it →
POST
/api/v1/observations

Validate one normalised observation (indicator, date, value, source). Demo-safe: rows are validated and normalised but only written when the server runs with ALLOW_DATA_WRITES=true and the request sends commit=true.

POST
/api/v1/ingest/csv

Bulk-validate a CSV of obs_date,value,source rows for one indicator — the platform's Data Validation Layer. Same demo-safe write gate as above.

Use Cases

For Researchers

Download complete time series for econometric modelling. All data is deduplicated, date-normalised to ISO 8601, and sourced from primary CBN, NBS and World Bank publications.

For Developers

Integrate Nigerian economic data into your own applications with zero authentication. CORS is fully open and all responses are standard JSON arrays.

For Students

Use the data for dissertations, final year projects and academic analysis in economics, data science, finance or computer science. Free and openly accessible.

POST
/api/v1/validate/csv

The platform's Validation Layer as a service: send any CSV (obs_date,value) and get a per-row verdict report — valid or rejected with reasons (bad dates, non-numeric values, duplicates, future observations). Never writes. Try it interactively in the Pipeline Playground.

Explore the Living API — follow the links

This API is hypermedia-driven (HATEOAS — Richardson Maturity Level 3): every response carries a _links block describing where you can go next. That means the entire API is navigable from the root without reading any documentation — like browsing the web. The response below is live: click any green link to follow it.

/
Contacting the live API…
Live requests from your browser to npedata-api.onrender.com. The free-tier server sleeps when idle — the first request can take up to ~30 seconds to wake it.

Embed a Live Chart

Any indicator can be embedded in a blog, article or report as a live, self-updating widget — paste one iframe, no API key. Use any indicator id from the catalogue (e.g. inflation, exchange_rate, fx_reserves, nfem_closing); an optional &months=24 limits the window.

<iframe src="https://antd-cr7.github.io/nigerian-dashboard/embed.html?indicator=inflation"
        width="440" height="280" style="border:0;border-radius:10px;" loading="lazy"
        title="Nigeria headline inflation — NPEDATA"></iframe>
Live preview
Each widget shows the latest value, the change vs the previous reading, the full series, the source, and links back to NPEDATA.

AI Agent Access

Model Context Protocol (MCP) Server

A standalone Node.js MCP server in the repository at /mcp-server exposes the read endpoints above as read-only tools for Claude Desktop, Cursor, and other MCP-compatible clients — so an AI agent can query Nigeria's GDP, inflation, exchange rate, FX reserves and CBN balance-sheet data directly in conversation, with no API key required. Setup instructions and the client config snippet are in mcp-server/README.md in the source repository. The API also publishes an llms.txt — a machine-readable description of the whole platform — so any AI agent that lands on the API can discover what it offers and how to use it, the same way the _links let a program navigate it.