ZIP and Postal Codes Data logo

ZIP and Postal Codes Data

By:hefesto technologies
Category:Data

Description

A worldwide postal code database in four ready-to-load formats. The main table has more than 1.8 million rows covering over 120 countries: every row gives the country, the postal or ZIP code, the place it belongs to, up to three levels of administrative division (state or region, county or district, municipality) with their codes, and latitude and longitude. The United States is complete with more than 41,000 ZIP codes, each with city, state, county and county FIPS code, and large countries such as Germany, France, Spain, India, Japan, Mexico and Australia are covered in full. Because the worldwide source carries only the first part of British and Dutch codes, a second table adds the full postcodes: about 1.8 million UK postcodes with local authority and coordinates, and about 470,000 Dutch postcodes. A countries table lists every country with its name, the pattern and regular expression of its postal codes, the number of codes and a plain statement of how complete they are, so you know before you build which countries have partial codes (Canada, Ireland, Malta, Chile, China, Argentina and Brazil). For the United States a fourth table joins on ZIP code and adds Census demographics for more than 33,000 ZIP code areas: population, median age, households, median household income, income per person, poverty and unemployment rates, education, housing units, home ownership, median home value and rent, broadband, and the make-up of the population. Postal codes are stored as text so leading zeros survive. You get CSV, JSON, a ready-made SQLite database indexed on country and code, and a standard SQL file for PostgreSQL or MySQL; download everything in one zip or only the format you need. The file is rebuilt every month. The postal codes come from GeoNames under the Creative Commons Attribution 4.0 licence, which allows commercial use as long as GeoNames is credited; the UK postcodes contain Royal Mail data; the demographics are public domain Census Bureau data. Coordinates are estimates suited to maps, distance searches and store locators. Full Canadian postal codes are not included. Useful for address forms and validation, store and dealer locators, shipping zones, sales territories, market sizing by ZIP code and enriching customer data.

Available Languages

English

Data Size

≈215MB (all formats, zip)

Formats

CSV, JSON, SQLite, SQL

Capturing frequency

Monthly

Legal Terms / Usage Permission

View Legal Terms

Data Attributes

Postal_codes

NameTypeExample
country_codeStringUS
postal_codeString90210
place_nameStringBeverly Hills
regionStringCalifornia
region_codeStringCA
districtStringLos Angeles
district_codeString037
communityStringempty in the US
community_codeStringempty in the US
latitudeNumber34.0901
longitudeNumber-118.4065
accuracyInteger4

Full_postal_codes

NameTypeExample
country_codeStringGB
postal_codeStringSW1A 1AA
place_nameStringLondon
regionStringEngland
region_codeStringENG
districtStringGreater London
district_codeStringGLA
communityStringCity of Westminster
community_codeStringE09000033
latitudeNumber51.501
longitudeNumber-0.1416
accuracyInteger6

Countries

NameTypeExample
country_codeStringNL
country_nameStringThe Netherlands
continentStringEU
postal_code_formatString#### @@
postal_code_regexStringa regular expression for the format
rowsInteger4334
postal_codesInteger4086
full_rowsInteger468809
coverageStringfirst four digits; full postcodes are in full_postal_codes

Us_zip_demographics

NameTypeExample
zipString90210
populationInteger19652
median_ageNumber51.2
male_pctNumber51.1
female_pctNumber48.9
under_18_pctNumber18.0
over_65_pctNumber28.3
householdsInteger8025
avg_household_sizeNumber2.45
median_household_incomeInteger190382
per_capita_incomeInteger144533
poverty_rateNumber8.4
unemployment_rateNumber4.2
labor_force_participationNumber54.2
bachelors_or_higher_pctNumber68.4
hs_or_higher_pctNumber96.8
housing_unitsInteger9714
occupied_unitsInteger8025
vacant_unitsInteger1689
owner_occupied_pctNumber71.6
median_home_valueInteger2000000
median_gross_rentInteger3045
median_year_builtInteger1967
broadband_pctNumber94.9
foreign_born_pctNumber35.7
hispanic_pctNumber5.8
white_pctNumber82.3
black_pctNumber2.0
native_american_pctNumber0.2
asian_pctNumber6.6
pacific_islander_pctNumber0.0
other_race_pctNumber1.3
two_or_more_races_pctNumber7.5

Files

NameTypeExample
csv/CSVone file per table, comma separated, UTF-8, header row
json/JSONone file per table, an array of objects, empty values left out
sqlite/postal_codes.sqliteSQLite4 tables, indexed on country and code
sql/postal_codes.sqlSQLthe same 4 tables as standard SQL