# Open Data Pakistan API

> Open Data Pakistan API on Apizie: 4 endpoints (Search datasets, Dataset, Publishers, Table rows) returned as clean JSON through one API key. 4 endpoints are live now. Call it over REST at https://zieapi.vercel.app/v1/open-data:open-data-pakistan/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `open-data:open-data-pakistan`
- Category: Open Data
- Status: live
- Source: https://opendata.com.pk
- Page: https://zieapi.vercel.app/api/open-data/open-data-pakistan
- OpenAPI: https://zieapi.vercel.app/api/open-data/open-data-pakistan/openapi.json

Open data portal (Pakistan): search datasets, read their metadata and resources, list publishers and query tabular rows through the portal's CKAN API.

## Endpoints

### Search datasets
`GET https://zieapi.vercel.app/v1/open-data:open-data-pakistan/search`

| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | no | Search words (Solr syntax allowed) |
| limit | integer | no | Number of results |
| offset | integer | no |  |
| organization | string | no | Organization name (slug) to filter by |
| sort | string | no |  |

### Dataset
`GET https://zieapi.vercel.app/v1/open-data:open-data-pakistan/dataset`

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Dataset name or id from the search results |

### Publishers
`GET https://zieapi.vercel.app/v1/open-data:open-data-pakistan/organizations`

| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | no | Number of results |
| offset | integer | no |  |

### Table rows
`GET https://zieapi.vercel.app/v1/open-data:open-data-pakistan/rows`

| Parameter | Type | Required | Description |
|---|---|---|---|
| resourceId | string | yes | Resource id from a dataset |
| query | string | no | Full-text filter |
| limit | integer | no | Number of results |
| offset | integer | no |  |

## Example
```
curl "https://zieapi.vercel.app/v1/open-data:open-data-pakistan/search" \
  -H "x-api-key: $APIZIE_KEY"
```

## FAQ

### How do I call the Open Data Pakistan API?
Create a free Apizie key, then send GET https://zieapi.vercel.app/v1/open-data:open-data-pakistan/search with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Open Data Pakistan API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card.

### Can AI agents use the Open Data Pakistan API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key open-data:open-data-pakistan.

### What is the status of the Open Data Pakistan API?
Live: works with just an Apizie key
