Developers · v1

NagarData API

Every dataset on the site is available as JSON or CSV over HTTPS. The same key works for all of them.

Base URL https://api.nagardata.com/v1
1 · Get a keyFree with any account.
2 · Call an endpointJSON by default, CSV on request.
3 · Cite the sourceEvery response names it.

Your API key

Create a free account to get a key, then send it in the Authorization header of every request. Keep keys out of public code.

Header
Authorization: Bearer YOUR_API_KEY
Create a free account to get a key

Endpoints

All endpoints are read-only and return JSON.

MethodPathWhat it returns
GET/datasetsList of all datasets, with sector and update date.
GET/datasets/{id}Details of one dataset: source, columns, coverage.
GET/datasets/{id}/dataThe rows. Filter by date, district, market or item.
GET/sectorsList of sectors and how many datasets each holds.
GET/usageYour calls and downloads used in the current period.

Example

Local onion retail prices in Dhaka for the last 30 days, from TCB's daily price sheets.

Request
curl "https://api.nagardata.com/v1/datasets/retail-basket-dhaka/data?item=onion-local&days=30" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response · 200
{
  "dataset": "retail-basket-dhaka",
  "source": "Trading Corporation of Bangladesh",
  "source_url": "https://tcb.gov.bd/pages/daily-rmps",
  "window": { "from": "2026-10-14", "to": "2026-11-12" },
  "columns": ["retail_min", "retail_max"],
  "rows": [
    {
      "date": "2026-11-12",
      "item": "Onion, local",
      "district": "Dhaka city",
      "retail_min": 40,
      "retail_max": 55
    }
  ]
}
Add format=csv to any data request to get a CSV file instead.

Limits by plan

PlanCallsHistory returned
Free100 a dayLatest 30 days
Pro5,000 a dayEvery year on record
Business50,000 a day, more by agreementEvery year on record
Compare plans

Errors

Errors return JSON with a message field explaining what went wrong.

401
Unauthorized
The key is missing or wrong.
403
Forbidden
Your plan does not include the period you asked for.
404
Not found
No dataset has that name.
429
Too many requests
You have reached your call limit. Try again after it resets.
Pro

Use with AI assistants

Pro keys can connect NagarData to AI tools through an MCP server, so an assistant can look up Bangladesh data and cite the source. Tools: search_datasets, get_dataset, get_data.

MCP client config
{
  "mcpServers": {
    "nagardata": {
      "url": "https://mcp.nagardata.com",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
See Pro plans