Dataminal

Quickstart

  1. Get a key

    Sign in and open Settings, API access. Say what you will build and choose only the datasets it needs: requests for a few datasets with a clear purpose are approved fastest, and requests for many are rarely approved. Once the request is approved, create your key there. It is shown once, so keep it in an environment variable on your machine or server.

  2. Make a first request

    export DATAMINAL_API_KEY="dmk_..."   # the key from Settings, API access
    
    curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/cpi/latest"

    Every data route answers with a count and a data array of flat records.

  3. Save it as CSV

    A year of the official dollar rate, written to a file:

    import os
    
    import pandas as pd
    import requests
    
    response = requests.get(
        "https://api.dataminal.com/nigeria/exchange-rate/history",
        params={"currency": "USD", "from": "2025-11-01", "to": "2026-10-31"},
        headers={"X-Api-Key": os.environ["DATAMINAL_API_KEY"]},
        timeout=60,
    )
    response.raise_for_status()
    rows = response.json()["data"]
    pd.DataFrame(rows).to_csv("usd_ngn.csv", index=False)
    print(len(rows), "rows saved")
  4. Stay within the limits

    • Ask for what you need with filters (indicator, state, period, from/to) rather than walking a table page by page.
    • Daily series come in pieces of 366 days on a Developer key: loop over the years.
    • Keep under 600 different requests in an hour, or the key pauses for six hours.
    • Read X-RateLimit-Remaining and X-Quota-Remaining; after a 429, wait the seconds in Retry-After.

    Every limit is under Access and limits.

Using an AI assistant

There are two ways. To ask an assistant about Nigeria's economy, markets and companies with Dataminal's data behind the answer, add Dataminal's MCP server to Claude, ChatGPT, Gemini or Perplexity and sign in: no key and no code. To build something of your own, have the assistant write the script, as below.

ChatGPT, Claude, Copilot and similar assistants can write the script for you. Give them the OpenAPI document, which describes every route, parameter and limit, or one dataset's file (for example electricity), with the prompt below. Keep your key out of the chat: the script reads it from DATAMINAL_API_KEY.

Write a Python script that downloads data from the Dataminal API and saves it as CSV.

What I need: [describe the data, for example "monthly CPI inflation for Lagos since 2020"]

About the API:
- OpenAPI document: https://dataminal.com/openapi.json (one dataset at https://dataminal.com/openapi/<dataset>.json, for example electricity.json). Read it before choosing routes and parameters.
- Base URL https://api.dataminal.com. GET only. Responses are JSON: {"count": n, "data": [...]}.
- Read my key from the DATAMINAL_API_KEY environment variable and send it in the X-Api-Key header. Never print it or put it in a URL.
- My Developer key allows 1,000 rows per response, 60 requests a minute, 5,000 a day and 100,000 rows a day. Daily series come 366 days per request. More than 600 different requests in an hour pauses the key for six hours, so use filters rather than paging through whole tables, and make as few requests as the task needs.
- On HTTP 429, wait the number of seconds in Retry-After and try once more. On any other error, print the "error" field and stop.
- Save the rows with pandas (DataFrame(data).to_csv) and print how many rows were saved.

Code generators and API clients such as Postman import the same document.

Base URL

https://api.dataminal.com

All endpoints are relative to this base and accept only GET. Send your key in the X-Api-Key header; limits are under Access and limits. CPI data changes once per NBS release; FAAC data changes when the OAGF or NBS publishes a month, and a month first served from the OAGF report is marked provisional until the NBS release replaces it.

Access and limits

Every route answers without a key. Catalog, release and methodology routes return in full; data routes return a ten-row sample with an access block that says so. An API key returns full rows up to the plan's per-response cap.

To get a key, sign in and open Settings, API access. Tell us what you are building and with which data; we review every request, usually within two working days. Once it is approved you create your key there and see it once. A key reads the datasets approved for it, and answers 403 for any other. Production access starts with a conversation with our team.

Send the key in the X-Api-Key header, from a server. A key in a URL is refused, and browsers cannot send the header to the API, so a key never has to sit in a web page.

LimitNo keyDeveloper keyProduction key
Rows per response10 (a sample)1,0005,000
Requests per minute3060120
Requests per day5005,00020,000
Requests per monthNot applicable100,000400,000
Rows per day5,000100,0001,000,000
Daily series per requestNot applicable366 days5 years
Paging depth (offset)None2,00010,000
Different requests in an hour before a pause3006002,000
Pause1 hour6 hours6 hours

Every key on one account draws on that account's quota. Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-Quota-Remaining; a 429 carries Retry-After. A request for more rows than the cap returns the newest rows up to it, with an X-Dataminal-Row-Cap header and an access note in the body. A client that walks a table request by request is paused automatically, so narrow queries with filters.

Market data licensed to Dataminal (NGX prices, indices and market summaries), payments data, private-market deal records and the document corpus are analysed inside Research Intelligence and are never served by the API.

Nigeria GDP endpoints

Quarterly and annual output from the National Bureau of Statistics: the latest quarter, the history of any measure, output and growth by activity, the oil and non-oil split, every vintage of a figure, and the releases ingested. NBS rebased from 2010 to 2019 prices in 2025 and both series are kept, so every response is pinned to one base year; pass base_year to read the older one.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/gdp/history?measure=growth&frequency=quarterly&series=total_gdp"
Full GDP API reference

Nigeria CPI endpoints

Monthly consumer price indices from the National Bureau of Statistics: national, urban and rural series, components, states, and release records.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/cpi/history?category=food&geography=national"
Full CPI API reference

Nigeria FAAC endpoints

Monthly Federation Account disbursements: the monthly summary, state and local government allocations, revenue sources, deductions, and release records. Every row names its publisher; pass final=true to exclude provisional months.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/faac/states?state=lagos"
Full FAAC API reference

Nigeria electricity endpoints

Daily grid generation from the system operator: the grid summary, daily and monthly series, generation by plant, hourly readings and the plant registry; and monthly customers, revenue and energy billed by distribution company from NBS.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/electricity/grid/plants?plant=egbin&limit=30"
Full electricity API reference

Nigeria oil production endpoints

Monthly crude oil and condensate production from the upstream regulator: the latest month, the national history, production by terminal and stream, a terminal summary, and the releases ingested.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/oil/terminals?terminal=forcados&liquid_type=crude_oil&limit=12"
Full oil production API reference

Nigeria public procurement endpoints

Federal contracting from the Bureau of Public Procurement, published as Open Contracting Data Standard 1.1 compiled releases: a summary per release year, the contracting processes themselves, awards, contracts, and the supplier and buying-entity registries. The OCDS procurement method is always open; filter on procurement_method_details for the method actually used.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/procurement/suppliers?year=2024&limit=10"
Full procurement API reference

Nigeria solid minerals endpoints

Production and royalty from NEITI's Solid Minerals Industry Audit: the latest audit cycle, production rows by company, state and mineral, totals by mineral and by state, company totals, and the cycles ingested. The cadence is annual, by audit cycle, so year selects a cycle rather than a month.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/mining/production?year=2023&mineral=limestone&limit=20"
Full solid minerals API reference

Nigeria state fiscal endpoints

Internally generated revenue for the 36 states and the Federal Capital Territory, from the National Bureau of Statistics: the latest year, the full history, the wide revenue table, the same revenue in long form by category, the derived summary, the releases ingested, and one state's whole profile. Amounts are naira as published and nominal. Where has_category_breakdown is false (the source publishes no split by tax type for those years), the eight category columns are null, not zero. And faac_dependence_pct is null wherever faac_year_complete is false.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/states/fiscal/igr?state=lagos&year=2024"
Full state fiscal API reference

Nigeria exchange rate endpoints

The Central Bank of Nigeria's official naira rate: the latest published rate per currency with the NFEM close beside it, the daily history with day, week, month, year-to-date and year-on-year change, monthly open, high, low and close, the currencies quoted, the eight regimes since 2001, the NFEM series and the sync runs. Rates are naira per unit as published; rate_date is the CBN's own date, so check it before calling a rate today's.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/exchange-rate/history?currency=USD&limit=30"
Full exchange rate API reference

Nigeria foreign trade endpoints

Merchandise trade from the National Bureau of Statistics' quarterly release: the latest quarter, the headline series by year, quarter and month, the ranked products, partners and ports of a quarter, trade by mode of transport, trade by classification and the editions ingested. Amounts are naira as published. Every edition republishes and revises the recent years; the API serves the newest publication of each period and names it in source_release.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/trade/partners?flow=export&scope=world"
Full foreign trade API reference

Nigeria labour market endpoints

The Nigeria Labour Force Survey: unemployment, labour-force participation, the employment-to-population ratio, time-related underemployment, informal employment and the labour-underutilisation measures, nationally by quarter and by state each year, cut by sex, age, education, place of residence and disability status.

Read the methodologies endpoint first if you plan to compare with anything before 2023. NBS replaced the survey in 2023 and redefined working age, employment and unemployment with it, so the series breaks: 23.1% in Q3 2018 and 4.3% in Q2 2024 are both correct and are not the same measurement. Every response is pinned to one methodology_version, and a request whose range crosses the break returns the current series with a methodology_break block saying what was withheld and why.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/labour/breakdown?dimension=sex&metric=unemployment_rate"
Full labour market API reference

Nigeria telecommunications endpoints

Subscribers, internet and broadband, operator market share, network generations, porting and data usage, as the Nigerian Communications Commission collates them from operators' returns. Monthly since 2012 and annually since 2002.

Two things differ from the other datasets here. NCC republishes its entire history in every monthly file and the files disagree, so each response serves the newest published statement of a figure and /revisions carries the ones it replaced. And breaks are per metric: teledensity has four population denominators and broadband penetration two, active subscriptions fall 44.8 million at the May 2024 NIN-SIM disconnection, and the telecoms share of GDP breaks where NBS rebased. A request that crosses a break touching its metric carries a methodology_break block; one that does not carries nothing.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/telecom/operators?metric=active_voice_subscriptions&service=gsm"
Full telecommunications API reference

Nigeria capital importation endpoints

Foreign capital entering Nigeria by type of investment, sector, country of origin, destination state and receiving bank, as the National Bureau of Statistics publishes it from the Central Bank of Nigeria's banking returns. Quarterly since 2013.

Three things to know before you chart it. NBS restates its whole history in every edition and the editions disagree, so each response serves the newest published statement of a figure, /revisions carries the ones it replaced and /vintages carries every statement of one figure. The workbooks carry quarters, years and months side by side and a year is the sum of its quarters, so a grain is always pinned. And coverage differs by cut: the state series ends at 2025-Q1, where NBS stopped publishing it.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/capital/countries?period=2026-Q1"
Full capital importation API reference

Nigeria balance of payments endpoints

Nigeria's balance of payments on the IMF BPM6 basis, quarterly since 2014, from the Central Bank of Nigeria's Quarterly Statistical Bulletin: the current account (goods, services, primary and secondary income, remittances), the capital and financial accounts, net errors and omissions and the memorandum items. US$ million, flows during each quarter.

Before you chart it. Every figure is the newest bulletin's statement; the CBN revises in batches, and /revisions shows what a later bulletin changed. A balance is one signed figure, surplus positive. overall_balance is derived: it is the reserve assets line, because BPM6 prints no overall balance. Memorandum items carry their own unit.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/balance-of-payments/series?indicator=current_account_balance%2Cpersonal_transfers&from=2020-Q1"
Full balance of payments API reference

Nigeria international investment position endpoints

Nigeria's external financial assets and liabilities on the IMF BPM6 basis, at the end of each quarter since 2010, from the Central Bank of Nigeria's Quarterly Statistical Bulletin: direct, portfolio and other investment, the reserves by component and the net position. US$ million, stocks.

Before you chart it. These are positions, not flows: the change between two quarters includes price and exchange-rate changes the CBN does not publish separately, so never compute a flow as a difference of positions. A negative net_international_investment_position means Nigeria is a net debtor.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/international-investment-position/series?indicator=net_international_investment_position&from=2015-Q1"
Full investment position API reference

Nigeria pension assets endpoints

Nigeria's pension fund assets at each month-end since January 2013, from the National Pension Commission's (PenCom) monthly report: the industry total, each fund type (RSA Funds I to VI, closed pension fund administrators, approved existing schemes) and the allocation by asset class. Naira million, stocks, unaudited.

Before you chart it. Add only rows with level top: a child row (FGN bonds, Treasury bills) is already inside its parent. From 2024 some bonds come as two rows, told apart by holding_basis (htm or afs). The RSA funds were split in 2019, so compare them across the break only as their sum, and never add rsa_funds_total to the funds.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/pension-assets/allocations?fund_type=total&level=top&from=2022-01"
Full pension assets API reference

Nigeria government finance endpoints

Federal, state and local government finances as the Central Bank of Nigeria's Quarterly and Annual Statistical Bulletins print them: federally collected revenue (oil and non-oil), the Federal Government's revenue, spending, balance and the financing of its deficit, the states' and local governments' combined accounts and the Federation Account. Naira million; annual from 1981, monthly from 2010 to December 2024, when the CBN stopped printing the tables.

Before you chart it. Always pass table: the annual summary (fgn_annual) and the monthly accounts (fgn_monthly) measure the budget on different bases and must not be joined. A balance is revenue less expenditure, so a deficit is negative; financing lines carry the opposite sign. Every read takes each figure's newest statement; /revisions shows what the CBN changed.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/government-finance/series?indicator=overall_balance%2Coverall_balance_pct_gdp&table=fgn_annual&from=2015"
Full government finance API reference

Nigeria interest rates endpoints

The CBN's policy, money market, treasury bill, deposit and lending rates as its statistical bulletins print them: monthly from January 2000, annual from 1981, per cent a year. The policy rates are end-of-period; market and bank rates are period averages.

Before you chart it. Months the CBN did not publish are null, never zero. /spreads subtracts two rates of the same month and labels the result derived. For the newest month and MPC decision dates, the monetary dataset is updated sooner.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/interest-rates/spreads?spread=prime_lending_less_mpr&from=2024-01"
Full interest rates API reference

Nigeria population endpoints

Nigeria's population by state, sex and age, and the states' vital rates, as the National Population Commission projects them from the 2006 census and the National Bureau of Statistics publishes them: national 2006 to 2023, states 2012 to 2020 and 2023. Each publication is a vintage; reads take the newest.

Before you divide by it. Only 2006 is a census (estimate_type census); later years are projections. /denominator returns the population for one place and year and refuses a year no publication prints unless you pass allow_nearest=true, in which case it says which year it used.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/population/denominator?geography=lagos&year=2023"
Full population API reference

Nigeria banking and credit endpoints

The Central Bank of Nigeria's banking statistics: deposit money banks' credit by sector (monthly since 2007), the commercial and merchant banks' balance sheet (monthly since December 2018), the system's liquidity and loan-to-deposit ratios, and the daily banking-liquidity statement (since November 2009). Money is in naira million.

Before you chart it. Credit and balance-sheet figures are month-end stocks, so growth is the change in the stock and months are never added together. The sector template changed in February 2015 and the sectors do not map across it. From September 2025 the sector columns sum to more than the CBN's own total, so shares use the total. The monetary survey's credit to the private sector is a different aggregate and stays under /nigeria/monetary.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/banking-credit/history?metric=dmb_credit_total&from=2021-01"
Full banking and credit API reference

Nigeria private equity and infrastructure fund endpoints

The SEC Nigeria's quarterly update on registered private equity and infrastructure funds, since Q4 2019: each fund's manager, structure, registration date and stated target size, and its committed capital, drawdown, investments and assets under management. Amounts are in naira; target sizes keep the currency the SEC printed.

Before you chart it. Each quarter is a snapshot as at its end, and the SEC publishes late, so the newest quarter can be more than a year old. A registered fund is not capital deployed. Dollar commitments are the SEC's naira conversions and move with the exchange rate, and target sizes are never added across currencies. There is no sector or portfolio data.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/private-capital/history?metric=fund_count"
Full private equity and infrastructure funds API reference

Nigeria fixed income endpoints

Primary-market auction results for Nigerian government securities: every Treasury bill and OMO auction from the Central Bank of Nigeria's government-securities feed, and every FGN bond auction from the Debt Management Office's results documents. Amount offered, bids, amount allotted and the stop rate, per auction line. Amounts are in naira million and rates in per cent.

Before you chart it. A stop rate is not a coupon: marginal_rate is what the auction cleared at, and bills are compared with bonds on true_yield. OMO bills are the CBN's monetary policy, not government borrowing. Read amount_allotted_scope before adding non-competitive allotment. Rows with a suspect quality flag are left out unless you pass include_flagged=true. There is no secondary-market data.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/fixed-income/rates?instrument=ntb&tenor=364&from=2025-01-01"
Full fixed income API reference

Nigeria monetary endpoints

The Central Bank's monetary statistics: external reserves every business day, the Monetary Policy Rate and every Committee decision that set it, the Cash Reserve Ratio and Liquidity Ratio in force, money supply and credit monthly, and interbank and lending rates. Each observation carries its own unit and nothing is converted between dollars, naira and percentages.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/monetary/latest"
Full monetary API reference

Nigeria public debt endpoints

Nigeria's public debt stock from the Debt Management Office: the quarterly total in US dollars and naira, the Federal Government's domestic debt by instrument, external debt by creditor, and every state's domestic and external debt, with the release each figure came from. Amounts are in currency units, never millions, and currencies are never mixed.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/debt/states?domestic_external=domestic"
Full public debt API reference

Nigeria election endpoints

Official records from the Independent National Electoral Commission: elections and INEC's calendar with its revisions, parties and candidates, electoral geography down to the polling unit, the voter register and PVC collection, declared results and outcomes, and whether each polling unit's result sheet is on INEC's results portal.

Three things differ from the other datasets here. The polling-unit tables are paged, never shipped whole: list routes take limit and offset and return paging.next_offset, and polling units are served a state at a time. Turnout, vote share and sheet completeness are Dataminal's arithmetic, marked derived with their method. And a result sheet is not a result: a unit with no sheet on the portal is not a unit with no votes.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/elections/polling-units?state=lagos&limit=50&offset=0"
Election data overview

Nigeria context endpoints

Reference tables that give the other datasets their setting. The national leadership timeline lists every Prime Minister, President and Head of State since independence with tenure dates and government type, as published by the State House; query it by year or date to name the administration in office for a period.

Example

curl -H "X-Api-Key: $DATAMINAL_API_KEY" "https://api.dataminal.com/nigeria/context/leaders?year=1985"
National leadership timeline

Response format

Endpoints return a count and a data array of flat records. Numbers are plain JSON numbers; dates are ISO strings.

{
  "count": 4,
  "data": [
    {
      "period": "2026-07-01",
      "geography_type": "national",
      "category": "all_items",
      "index_value": 145.268506,
      "mom_pct": 1.5721619353936518,
      "yoy_pct": 15.429881605085427,
      "avg_12m_pct": 16.892930987800824,
      "base_year": 2024,
      "source_release": "2026-07",
      "publication_date": "2026-08-17"
    }
  ]
}

Errors

Invalid parameters return HTTP 400; a missing, revoked or expired key returns 401; licensed data, or a dataset a key is not approved for, returns 403; a rate limit or used-up quota returns 429; unknown routes return HTTP 404. If a key or its quota cannot be checked, the API returns 503 with Retry-After rather than unmetered rows. The body always carries an error string, and access refusals add a code.

HTTP/1.1 400 Bad Request
{ "error": "category must be one of: all_items, all_items_less_farm_produce, core, food" }

HTTP/1.1 401 Unauthorized
{ "error": "The API key has been revoked.", "code": "key_revoked" }

HTTP/1.1 429 Too Many Requests
Retry-After: 42
{ "error": "More than 60 requests a minute. Slow down.", "code": "rate_limited" }

HTTP/1.1 404 Not Found
{ "error": "Not found" }

Client examples

Python

import os
import requests

BASE = "https://api.dataminal.com"
HEADERS = {"X-Api-Key": os.environ["DATAMINAL_API_KEY"]}

history = requests.get(
    f"{BASE}/nigeria/cpi/history",
    params={"category": "food", "geography": "national"},
    headers=HEADERS,
    timeout=30,
).json()

for row in sorted(history["data"], key=lambda r: r["period"]):
    print(row["period"], round(row["yoy_pct"], 2))

JavaScript

// Server-side (Node): keep the key out of browser code.
const BASE = "https://api.dataminal.com";

const response = await fetch(
  `${BASE}/nigeria/cpi/latest?category=food&geography=national`,
  { headers: { "X-Api-Key": process.env.DATAMINAL_API_KEY } },
);
const { data } = await response.json();

console.log(data.map((row) => [row.period, row.yoy_pct]));

Downloads and direct access

Tables and charts on most dataset pages offer signed-in readers (a free account) a CSV download of the rows behind them, generated from the API response in the browser. Readers who are not signed in see the most recent five years of each time series on the site. NGX, election, fixed income, balance of payments, investment position, pension assets, government finance, interest rates and population pages offer none: election data is served a page at a time through the API, and the others are served through the API alone. Banking and private capital also offer whole-dataset workbooks and CSV files to signed-in readers and API keys: /nigeria/banking-credit/download?file=… and /nigeria/private-capital/download?file=… return a link valid for five minutes, 20 a day on a Developer key. A signed-in reader on the site has 5 downloads a day, files and CSVs together; for more, write to research@dataminal.com. Direct Parquet downloads are not offered.