A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

A CSV File and SQL Dump for all the zip codes in Philippines

I spent a few hours yesterday gathering all the zip codes for the Philippines. This is public data, so I am sharing it with everyone. If you use it, I’d appreciate it if you credit me (It is not required but it would be great if you can send some traffic to my site — I have been planning to get a Linode but I can’t afford one yet :P).

Here is a preview of the CSV file:

"9","PH","Abra","2808","San Quintin"
"10","PH","Abra","2809","San Isidro"
"462","PH","Cebu","6000","Cebu City"
"468","PH","Cebu","6004","Danao City"
"471","PH","Cebu","6015","Lapu-Lapu City (Opon)"
"473","PH","Cebu","6016","Mactan Airport"

The MySQL Table is like this:

  `country` CHAR(2) NOT NULL,
  `major_area` VARCHAR(300) NOT NULL,
  `zip_code` VARCHAR(25) NOT NULL,
  `city` VARCHAR(300) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `major_area` (`major_area`),
  KEY `zip_code` (`zip_code`),
  KEY `city` (`city`)

Updated: March 13, 2010 (2,270 zip codes)

Download the files below:

Fixed download link: http://blog.ekini.net/wp-content/uploads/2013/01/ph_zipcodes.zip (Updated 2013-01-08)

Disclaimer: The file has not been updated since 2010.

Corrections, suggestions, etc. just leave a comment below.


This entry was posted in General and tagged , , . Bookmark the permalink.

4 Responses to A CSV File and SQL Dump for all the zip codes in Philippines

  1. Sam says:

    The links are broken. can you pls share it with me pls.

  2. Wenbert Del Rosario says:

    @Sam, I have updated the download link. Thanks!

  3. mrs y says:

    you are a God-send! thank you so much for sharing!

  4. Me says:

    Great. That helps me a lot. Thanks

Leave a Reply to mrs y Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>