Getting started

PakDataHub is one REST API for Pakistan's official economic and financial data: exchange rates, inflation, interest rates, the balance of payments, money and banking, GDP, trade by product and country, retail and daily wholesale (mandi) prices, electricity and fuel prices, district and census data, digital payments, mutual funds, debt securities and more. It holds 17,158 series from 1947 to today, sourced from the State Bank of Pakistan (SBP), the Pakistan Bureau of Statistics (PBS), the PTA, MUFAP, PSO, ISMO, NEPRA and the agriculture departments of Punjab and Sindh.

Every series is a clean time series. You can pull it as JSON or CSV from https://api.pakdatahub.com.

1. Get a key

Create an account at pakdatahub.com/signup, using email and password or Google. Your first API key appears straight away, and it is also emailed to you. A free account makes 20 API calls a day over the last 5 years (resetting at 00:00 UTC) and downloads 5 files a day from any chart on the site - one series, every observation, as CSV or Excel. No card. See Plans & limits.

2. Find a series

The catalog is public, so you can search it without a key:

curl "https://api.pakdatahub.com/v1/search?q=kibor"
{ "success": true, "count": 3, "data": [
  { "id": "rates.kibor.1y", "module": "fixed-income", "name": "KIBOR 1-Year", "unit": "percent", "frequency": "daily", "source": "SBP", "tier": "basic" },
  { "id": "rates.kibor.3m", "module": "fixed-income", "name": "KIBOR 3-Month", "unit": "percent", "frequency": "daily", "source": "SBP", "tier": "basic" },
  { "id": "rates.kibor.6m", "module": "fixed-income", "name": "KIBOR 6-Month", "unit": "percent", "frequency": "daily", "source": "SBP", "tier": "basic" }
] }

Every result has an id. That's the stable, lowercase identifier you use everywhere else, such as fx.rate.avg.usd, rates.kibor.3m or inflation.cpi.national.yoy.

3. Make your first call

Send your key in the X-API-Key header:

curl -H "X-API-Key: pk_live_xxx" \
  "https://api.pakdatahub.com/v1/series/fx.rate.avg.usd/latest"
{
  "success": true,
  "series": "fx.rate.avg.usd",
  "meta": { "name": "Average Exchange rate of Pak Rupees per U.S. Dollar", "unit": "pkr",
            "frequency": "monthly", "source": "SBP", "last_updated": "2026-08-31", "transform": null },
  "data": [ { "date": "2026-08-31", "value": 277.9187406, "dims": {} } ],
  "pagination": { "next_cursor": null, "count": 1 }
}

That's it. Every one of the 17,158 series comes back in this same shape, whether you ask for the 1953 exchange rate or last week's flour price.

4. In Python

import httpx

r = httpx.get(
    "https://api.pakdatahub.com/v1/series/inflation.cpi.national.yoy",
    params={"from": "2020-01-01", "sort": "asc"},
    headers={"X-API-Key": "pk_live_xxx"},
    timeout=30,
)
for point in r.json()["data"]:
    print(point["date"], point["value"])

Or load straight into pandas with CSV:

import pandas as pd
url = ("https://api.pakdatahub.com/v1/series/fx.rate.avg.usd"
       "?from=1947-01-01&sort=asc&format=csv&api_key=pk_live_xxx")
df = pd.read_csv(url, parse_dates=["date"])

Next

Also as Markdown: getting-started.md · All docs