# Indian PIN/ZIP codes (`bite-sized-insights/indian-pincode-postalcode-zip-code-to-city-state`) Actor

Get location data including place, state, district, and coordinates from Indian PIN codes (postal codes / zip codes).

- **URL**: https://apify.com/bite-sized-insights/indian-pincode-postalcode-zip-code-to-city-state.md
- **Developed by:** [bite-sized-insights](https://apify.com/bite-sized-insights) (community)
- **Categories:** Agents, Integrations, Developer tools
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 row returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

***Get location data including place, state, district, and coordinates from Indian PIN codes (postal codes / zip codes).***

Simply provide a list of PIN codes and get back structured location data for each one.

No login required. No cookies needed. Pay-per-event pricing.

### Why Choose This Actor?

**"Enrich your data with Indian location information in seconds"**

Our India PIN Code / Postal Code / Zip Code Search provides:

- **Very Fast Responses**: Parallel processing for large batches
- **Cost-Effective**: Pay only for the rows you get back: `$1.50 / 1k rows` (one PIN code can return several places)
- **Complete Data**: Get place, state, district, sub-district, and coordinates

### Quick Start

1. Open the actor on Apify and go to the **Input** tab.
2. Paste the example input below (or edit the prefilled list).
3. Click **Start** and wait for the run to finish.
4. Open the **Output** (dataset) tab to view or export the results as JSON, CSV or Excel.

```json
{
  "pincodes": ["110001"]
}
```

Example output item:

```json
{
  "pincode": "110001",
  "place": "Connaught Place",
  "state": "Delhi",
  "state_code": "07",
  "district": "Central Delhi",
  "district_code": "095",
  "subdistrict": "New Delhi",
  "lat": "28.6431",
  "lng": "77.2197",
  "accuracy": "4",
  "error": null
}
```

### Usage Examples

#### Resolve a Single PIN Code

```json
{
  "pincodes": ["110001"]
}
```

#### Resolve Multiple PIN Codes

```json
{
  "pincodes": ["110001", "400001", "700001"]
}
```

Returns one row per place (a single PIN code can return many rows, so 3 codes yield 3 or more rows). Example row:

```json
{
  "pincode": "110001",
  "place": "Connaught Place",
  "state": "Delhi",
  "state_code": "07",
  "district": "Central Delhi",
  "district_code": "095",
  "subdistrict": "New Delhi",
  "lat": "28.6431",
  "lng": "77.2197",
  "accuracy": "4",
  "error": null
}
```

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `pincodes` | array | Yes | - | List of Indian PIN codes (postal codes / zip codes) to resolve (6 digits each). 1-1000 per run; duplicates are ignored, invalid or too many codes fail the run |

### Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `pincode` | string | 6-digit Indian PIN code |
| `place` | string | Place/locality name |
| `state` | string | State/Union Territory name |
| `state_code` | string | 2-digit state code |
| `district` | string | District name |
| `district_code` | string | 3-digit district code |
| `subdistrict` | string | Sub-district/Taluk name |
| `lat` | string | Latitude coordinate |
| `lng` | string | Longitude coordinate |
| `accuracy` | string | Location accuracy (1-4, higher is better) |
| `error` | null/string | Error message if lookup failed |

### Free plan

Free-plan users get 5 runs in total. Each free run processes only the first 10 codes in your input (the rest is ignored without an error) and returns at most 10 results.

### Pricing

| Cost | Description |
|------|-------------|
| $0.0001 / start | Charged per actor run |
| $1.50 / 1,000 rows | Charged per row (place) returned; one PIN code can return multiple rows |

### API Integration

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("bite-sized-insights/indian-pincode-postalcode-zip-code-to-city-state").call(
    run_input={
        "pincodes": ["110001", "400001", "700001", "600001"]
    }
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['pincode']}: {item['place']}, {item['district']}, {item['state']}")
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('bite-sized-insights/indian-pincode-postalcode-zip-code-to-city-state').call({
    pincodes: ['110001', '400001', '700001']
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(item => {
    console.log(`${item.pincode}: ${item.place}, ${item.district}, ${item.state}`);
});
```

### Use Cases

- **Data Enrichment**: Add location data to customer records using PIN codes or postal codes
- **Address Validation**: Verify Indian PIN codes (zip codes) exist and get full address details
- **Geographic Analysis**: Map PIN codes to states and districts with coordinates
- **E-commerce & Logistics**: Determine delivery regions and serviceable areas from PIN codes
- **Event Location Enrichment**: Add PIN code data to Indian trade shows and conferences

### Going global?

Looking for postal code data in other countries? Check out our other actors:

- [US ZIP Code Search](https://apify.com/bite-sized-insights/us-zip-codes) - US ZIP codes (5-digit)
- [Norway Postal Code Search](https://apify.com/bite-sized-insights/norwegian-postalcode-to-city-name) - Norwegian postal codes (4-digit)
- [France Postal Code Search](https://apify.com/bite-sized-insights/france-zip-codes) - French postal codes (5-digit)

### Notes

- PIN codes (postal codes / zip codes) must be provided as strings (e.g., "110001")
- Indian PIN codes are 6 digits (100000-999999)
- Multiple places may share the same PIN code - all matching places are returned
- Invalid or non-existent PIN codes will not appear in results
- Results are returned in no particular order
- Large requests are automatically split into batches and processed in parallel

***

**Need help?** Open an issue on the actor's repository or contact support through Apify Console.

# Actor input Schema

## `pincodes` (type: `array`):

List of Indian PIN codes (6 digits each, 1-1000 per run).

## Actor input object example

```json
{
  "pincodes": [
    "110001",
    "400001",
    "700001",
    "560001",
    "600001",
    "500001"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

Indian PIN code location data including place, state, district, and coordinates

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "pincodes": [
        "110001",
        "400001",
        "700001",
        "560001",
        "600001",
        "500001"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bite-sized-insights/indian-pincode-postalcode-zip-code-to-city-state").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "pincodes": [
        "110001",
        "400001",
        "700001",
        "560001",
        "600001",
        "500001",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("bite-sized-insights/indian-pincode-postalcode-zip-code-to-city-state").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "pincodes": [
    "110001",
    "400001",
    "700001",
    "560001",
    "600001",
    "500001"
  ]
}' |
apify call bite-sized-insights/indian-pincode-postalcode-zip-code-to-city-state --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bite-sized-insights/indian-pincode-postalcode-zip-code-to-city-state"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/RyB3tbuHgLzKgCddG/builds/JZXxCQfx0AdVvJptt/openapi.json
