PAKDATAHUB
Docs · API reference

For AI agents: this page is available as raw Markdown at /docs/api-reference.md · every page in one file at /llms-full.txt · index at /docs/llms.txt

API reference

  • Base URL: https://api.pakdatahub.com. Every data endpoint is under /v1.
  • Format: JSON (UTF-8) by default; CSV on /v1/series/{id} with ?format=csv.
  • Auth: X-API-Key: pk_live_xxx header (Authentication). 🔑 marks keyed endpoints; the rest are public.
  • Dates: ISO YYYY-MM-DD. Monthly data is dated to the last day of the month, and quarterly data to the quarter end.

Response envelopes

Series endpoints (/v1/series, /v1/commodities) return:

{
  "success": true,
  "series": "rates.kibor.3m",
  "meta": { "name": "KIBOR 3-Month", "unit": "percent", "frequency": "daily",
            "source": "SBP", "last_updated": "2026-09-24", "transform": null },
  "data": [ { "date": "2026-09-24", "value": 11.75, "dims": { "side": "offer" } } ],
  "pagination": { "next_cursor": null, "count": 1 }
}

List endpoints (funds, securities, auctions, trade, AMCs, search, calendar) return { "success": true, "data": [...], "count": N }.

Errors return { "success": false, "error": { "code", "message" } } (Errors).

Endpoints

Discovery (public)

Endpoint Page
GET /v1/catalog, GET /v1/catalog/{id} Catalog
GET /v1/search?q= Search
GET /v1/calendar Release calendar
GET /v1/status Status
GET /v1/plans Billing

Time series 🔑

Endpoint Page
GET /v1/series/{id}, GET /v1/series/{id}/latest Series
?transform=yoy|mom|pct_change|3ma|index Transforms
?vintage=YYYY-MM-DD Revision vintages
GET /v1/commodities, /by-city, /items, /cities Commodities

Datasets 🔑

Endpoint Page
GET /v1/funds, /screener, /{id}, /{id}/nav|returns|payouts|expenses|portfolio Mutual funds
GET /v1/funds/{id}/analytics Fund analytics
GET /v1/amcs, GET /v1/amcs/{amc} AMCs
GET /v1/securities, /{code}/prices, /trades Debt securities
GET /v1/fixed-income/auctions Auctions
GET /v1/trade External trade

Account 🔑 / session

Endpoint Page
GET /v1/usage, /v1/usage/history Usage
GET/PATCH /v1/account, GET/POST/DELETE /v1/keys Account & keys
GET/POST/DELETE /v1/webhooks Webhooks
POST /auth/signup|login|logout|change-password|set-password, Google Auth
POST /v1/checkout, GET /v1/billing/portal, GET /v1/account/key/{token} Billing

Quick examples

# public: discover
curl "https://api.pakdatahub.com/v1/search?q=remittances"
# keyed: data
curl -H "X-API-Key: pk_live_xxx" "https://api.pakdatahub.com/v1/series/remittances.total?from=2024-01-01&sort=asc"
import httpx
r = httpx.get("https://api.pakdatahub.com/v1/series/fx.rate.avg.usd",
              params={"from": "1947-01-01", "sort": "asc"},
              headers={"X-API-Key": "pk_live_xxx"}, timeout=30)
print(r.json()["data"][-1])
const res = await fetch("https://api.pakdatahub.com/v1/series/rates.kibor.3m/latest?dims=side:offer",
  { headers: { "X-API-Key": "pk_live_xxx" } });
const { meta, data } = await res.json();
console.log(meta.name, data[0].value);

What data exists: the data dictionary. Copy-paste recipes for each dataset: API guides.

View as Markdown (.md)