How to look up an MP by postal code?
February 11, 2007 2:01 PM   Subscribe

Where can I get an API that allows lookup of (Canadian) Member of Parliament via postal code?

I already know of webpages such as Find your Member of Parliament using your Postal Code and Find your electoral district, but I'd like to offer my own web service with similar features. Any API or methodology would be appreciated.

Anything at the provincial level would also be appreciated.
posted by furtive to Computers & Internet (2 answers total)
 
Best answer: The data you want is available from Statistics Canada in the Postal Codes by Federal Riding File. Looks like the purchase price is $500 but updates once you have one issue are cheaper. If you're an educational institution then the data is free.

There won't be an available web API for it, because no-one licensing it would be permitted to provide such an API. All you can do is own your own copy of the data.
posted by mendel at 3:36 PM on February 11, 2007


If you had no scruples, you could code a site-scraper to feed user input into one of the already-existing systems, scrape the results and present them to your own end user. That's a very bad idea from a maintainability standpoint, however, because as soon as they change their site design, you'll have to recode. Which is annoying.

If you can get the data file mendel linked to, you could create your own system in an evening. Not much of an API needed, really. SELECT lizard FROM database where POSTCODE = user_input.
posted by Civil_Disobedient at 4:49 PM on February 11, 2007


« Older lend a hand...for money?   |   How can I make myself more marketable as a... Newer »
This thread is closed to new comments.