Part of a Data Solution
- Explore →
Postal Codes Solution
Every worldwide postal-code dataset in one bundle — the ultimate global reference for precise postal codes.
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
API Access
Access dataset files directly from scripts, code, or AI agents.
Browse dataset files
API Access
Access dataset files directly from scripts, code, or AI agents.
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.
Start with these files — they give you everything you need to understand and access the dataset.
- 1. Fetch datapackage.yaml to inspect schema and resources
- 2. Download data resources listed in datapackage.yaml
- 3. Read README.md for full context
Data Files
postal-codes-in-sample
| Field | Type | Description | Constraints | Title |
|---|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 -- always IN | Country Code | |
| postal_code | string | Indian PIN code (6 digits) | { "pattern": "^\\d{6}$" } | Postal Code |
| place_name | string | Post office name (source: All India Pincode Directory) | Place Name | |
| admin_name1 | string | State/Union Territory -- 36/36 covered, includes Ladakh | Administrative Name 1 | |
| admin_code1 | string | ISO 3166-2:IN code | Administrative Code 1 | |
| admin_name2 | string | District -- 732 distinct values | Administrative Name 2 | |
| admin_code2 | string | Not populated -- no official district code in this source | Administrative Code 2 | |
| admin_name3 | string | Not populated -- no third admin tier in this source | Administrative Name 3 | |
| admin_code3 | string | Not populated | Administrative Code 3 | |
| latitude | number | Source-provided latitude; blanked where the source held a placeholder value (see ATTRIBUTION.txt) | Latitude | |
| longitude | number | Source-provided longitude; blanked where the source held a placeholder value (see ATTRIBUTION.txt) | Longitude | |
| accuracy | string | Not populated -- source coordinate precision could not be independently verified per row | Accuracy | |
| alternative_city_name | string | Not populated in this release | Alternative City Name |
Download
Download sample CSVAbout
- Last updated
- 3 October 2026
- Total rows
- 100
- Format
- CSV
- File size
- 8.94 kB
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 commitc84b6ad), landed in batch 4 - Parity verdict:
format-only(CRLF → LF), passing under the standing rule - Producer:
custom, refresh disabled
Sources
| Input | URL | Notes |
|---|---|---|
| All India Pincode Directory (Department of Posts, GODL-India) | https://raw.githubusercontent.com/dropdevrahul/pincodes-india/main/pincode.csv | GitHub 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.yamlsourcesstill names the data.gov.in catalogue page (the original publisher);ATTRIBUTION.txtalready 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
| Decision | By | Basis |
|---|---|---|
| Accept the CRLF → LF change | Standing 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.in | Agent, 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." | Agent | Supported by .licensing-notes.md; the orchestrator noted it goes a little beyond just dropping the sentence |
| Drop the exact source-row-count assert | Agent | Would break on any upstream update |
Drop build_postal_codes_product.py and publish_r2.py | Agent | Folded 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 intoadmin_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,accuracyandalternative_city_nameempty. - 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
sourcesnext to data.gov.in. ATTRIBUTION.txt("157,087 rows", "Ladakh (112 rows)", "9,260 of 157,087") and.licensing-notes.mdstill 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.