Is there any API out there which can give me Polygon value for a zipcode? I really thought that it would be fairly easy for me given the number of Maps APIs out there. Either Google Maps API or something else would be able to give me that data. But a plain Google search was not able to come back with any results which were satisfying.

The I realized that the Zipcodes can not be "strictly" defined as polygons. They belong to another type of geometrical element called "Boundaries".

All I want it a container inside a container inside a container

However, the smallest molecule in the equation would be a zipcode. The other containers can be Polygons OR Boundaries. I am not sure if that would make a HUGE difference. However, what I want essentially is a Geometrical representation of a zipcode boundary so that my SQL Server Db can understand it and I can query it from there

Any good suggestions on how can I enter a Zipcode and get a respective Polygon/boundary value for it?


2 Answers 2


**Disclaimer I work here*

Very simple solution to this. sign up here: boundaries-io.com

then in your code: .../rest/v1/public/boundary?zipcode=20037,20002

The results are GeoJson to easily integrate that takes GeoJson like Google Map... used GeoJSONLint to cut and paste my GeoJson Results from the API call above to display the below image...Hope this helps!

Zip Code(s) to Polygons Example GeoJSON Screenshot Using Boundaries-io.com's API.


First of all, clarification is in order for ZIP codes. They are NOT boundaries or polygons. ZIP codes are service routes that are correctly represented as points or as sides of a street in a GIS context.

If you are interested in using Mappperz links, I would supplement his recommendations with a page that talks about what ZCTAs are and how they are created (Link). As of May 17, 2015, this is the ZCTA national shapefile data for all ZCTAs that has demographic data readily available.

  • I ran into a similar situation a few years ago where I assumed zip code boundaries were the solution to my problem--little did I know that they aren't actual boundaries until I got too deep. You may have buildings or pockets within your boundary that are one zip code by themselves. Or multiple buildings within different zipcodes that are the same (campus buildings for a school, for example) these outliers caused me way more cleanup and re-calculation than it was worth. Census Traffic Zones may be something to consider.
    – MaryBeth
    Commented Nov 16, 2015 at 13:28
  • 1
    Zip codes can be translated into rough polygons and can be represented in GeoJSON. You can have "holes" represented in GeoJSON (to address one off buildings or areas that are not included in a Zip Code, if these are really necessary). As an example here is a GeoJSON of all the zip codes in Denver: raw.githubusercontent.com/codeforamerica/click_that_hood/master/…
    – SSH This
    Commented Mar 28, 2017 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.