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
Endpoints
All endpoints are read-only and return JSON.
| Method | Path | What it returns |
|---|---|---|
| GET | /datasets | List of all datasets, with sector and update date. |
| GET | /datasets/{id} | Details of one dataset: source, columns, coverage. |
| GET | /datasets/{id}/data | The rows. Filter by date, district, market or item. |
| GET | /sectors | List of sectors and how many datasets each holds. |
| GET | /usage | Your 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
| Plan | Calls | History returned |
|---|---|---|
| Free | 100 a day | Latest 30 days |
| Pro | 5,000 a day | Every year on record |
| Business | 50,000 a day, more by agreement | Every year on record |
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" }
}
}
}MCP
https://mcp.nagardata.com