Postal Codes Dataset for India, IN

399
Updated:
Files:1
Size:11.9 MB
Rows:157,087
Formats:csv

Postal Codes Dataset for India, IN including name of the city, town, or place, various administrative divisions and alternative city names.

Part of a Data Solution

  • Postal Codes Solution

    Every worldwide postal-code dataset in one bundle — the ultimate global reference for precise postal codes.

    Explore →

Premium

You're viewing a free sample

Get the complete dataset — all rows and files — delivered instantly after checkout, with lifetime access to the latest version.

  • Secure checkout via Stripe
  • Instant download after payment
  • Lifetime access to the latest version
  • Government Open Data License - India license
20% off
$49.90$39.92
one-time payment

API Access

Access dataset files directly from scripts, code, or AI agents.

Browse dataset files
Dataset Files

Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.

/logistics/postal-codes-in/
https://datahub.io/logistics/postal-codes-in/_r/-/.licensing-notes.md
https://datahub.io/logistics/postal-codes-in/_r/-/.migration-notes.md
https://datahub.io/logistics/postal-codes-in/_r/-/ATTRIBUTION.txt
https://datahub.io/logistics/postal-codes-in/_r/-/README.md
https://datahub.io/logistics/postal-codes-in/_r/-/datapackage.yaml
Key Files

Start with these files — they give you everything you need to understand and access the dataset.

datapackage.yaml— metadata & schema
https://datahub.io/logistics/postal-codes-in/_r/-/datapackage.yaml
README.md— documentation
https://datahub.io/logistics/postal-codes-in/_r/-/README.md
Typical Usage
  1. 1. Fetch datapackage.yaml to inspect schema and resources
  2. 2. Download data resources listed in datapackage.yaml
  3. 3. Read README.md for full context

Data Files

postal-codes-in-sample


About this dataset

India (IN): migration notes

Internal record of the P5 migration from the old scripts to the producer: the discrepancies found, their causes, and who decided what. This is a dated record, so the numbers are as of the migration and not kept current. It is not shipped in the zip.

  • Issue: pc-28e.7.27 (closed 2026-10-03)
  • Commit: 4cbaa2b (worktree commit c84b6ad), landed in batch 4
  • Parity verdict: format-only (CRLF → LF), passing under the standing rule
  • Producer: custom, refresh disabled

Sources

InputURLNotes
All India Pincode Directory (Department of Posts, GODL-India)https://raw.githubusercontent.com/dropdevrahul/pincodes-india/main/pincode.csvGitHub republication of the data.gov.in file; the same copy the old build_postal_codes_product.py used
  • data.gov.in itself was unreachable on 2026-10-03: the catalogue page returned 503 and api.data.gov.in refused the connection. The old builder never fetched from data.gov.in either.
  • datapackage.yaml sources still names the data.gov.in catalogue page (the original publisher); ATTRIBUTION.txt already credits the GitHub copy as the access point.

Parity against the live zip (2026-10-03)

Rows: 157,087 live and 157,087 fresh, none only on one side, 0 changed cells. Once CR is stripped, the fresh in.csv is byte-identical to live (checked with cmp). Duplicate-key count is 14 in both.

Decisions

DecisionByBasis
Accept the CRLF → LF changeStanding rule (row_order/CRLF-only, user, 2026-10-02)Recorded in the batch 4 sign-off in docs/parity/p5.md
Fetch from the GitHub copy, not data.gov.inAgent, accepted by the orchestrator as "not a new source"Same file the old builder used; data.gov.in returned 503. The agent asked the lead to confirm; no user answer is recorded
Replace the licence_status.decision README sentence with "GODL-India permits commercial redistribution with attribution."AgentSupported by .licensing-notes.md; the orchestrator noted it goes a little beyond just dropping the sentence
Drop the exact source-row-count assertAgentWould break on any upstream update
Drop build_postal_codes_product.py and publish_r2.pyAgentFolded into the producer or replaced by build.py

Transforms carried over (unchanged)

  • StateName → ISO 3166-2:IN via the 36-entry name crosswalk, which also gives the title-case admin_name1. District title-cased into admin_name2.
  • Coordinates stripped; a trailing minus moves to the front; trailing " N" / " E" dropped. Both sides blanked when either is "NA", empty or unparseable, or the pair is the (1.0, 1.0) placeholder.
  • Exact duplicate rows dropped; per (Pincode, OfficeName, District) the first row with a usable coordinate is kept.
  • Sorted by (admin_code1, postal_code, place_name), source order on ties. admin_code2, admin_name3, admin_code3, accuracy and alternative_city_name empty.
  • The old asserts are ProducerErrors: source header, every state mapped, 6-digit PIN, no literal "nan", unique primary key, all 36 states/UTs including Ladakh.

Open questions

  • Resolved (user, 2026-10-05, pc-28e.7.59): the GitHub copy (dropdevrahul/pincodes-india) is accepted long term as the fetch route, and is now listed in sources next to data.gov.in.
  • ATTRIBUTION.txt ("157,087 rows", "Ladakh (112 rows)", "9,260 of 157,087") and .licensing-notes.md still contain counts. Left alone; they belong to the pc-hfz sweep.

Provenance

Reconstructed 2026-10-05 from the agent transcript d33e1b7e-5027-498a-a97f-ba914ee2524e/subagents/agent-a1c477009b4815dbb.jsonl, the orchestrator session d33e1b7e-…, the commit message, the bd close reason and the batch 4 sign-off in docs/parity/p5.md.