Vad är detta?
Ditt postnummer är nu mina koordinater. Detta API använder sig av koordinater från Yahoo Maps, så de är inte nödvändigtvis 100% korrekta. Inte heller innehåller databasen kompletta postnummerserier, men har trots allt 14866 16079 svenska postnummer. Med koordinater.What's this?
Your zip code is now my coordinates. This API uses coordinates from Yahoo Maps, and might not be 100% correct.
The database of zip codes does not contain a full list of Swedish zip codes, but does contain 14866 16079 of them, mapped to coordinates.
Use as you wish, the alternative will cost you money. And you're a dirty cheap bastard. Punk.
Let me know what you think or if you find any bugs! Drop me a line: cash @ domain
Stats: 489 058 requests from 11 724 IPs as of 2012-05-20 02:13:42
API URL: http://yourmoneyisnowmymoney.com/api/zipcodes/
| Parameters | |||
|---|---|---|---|
| Name | Type | Description | Default value |
| zipcode | required | Minumum 3 characters. Assumes wildcard if less than 5. Zip code all returns all zip codes in the database. Please use this feature responsibly... |
N/A |
| response | optional | Response type. Available values are:
|
json |
| charset | optional | Character encoding. Available values are:
|
utf8 |
| Response structure |
|---|
| Example response for zip code 39126 |
[status_code] => 100
[status_message] => OK, awesome!
[response_charset] => utf8
[results] => Array
(
[0] => Array
(
[zipcode] => 39126
[address] => Kalmar, Kalmar Län, Sverige
[lat] => 56.658800
[lng] => 16.368060
)
)
|
| Response codes | |
|---|---|
| status_code | status_message |
| 100 | OK, awesome! |
| 900 | No results. |
| 901 | Really? No zip code supplied? Great implementation of this zip code triggered API, dude. |
| 902 | Zip code must be at least 3 characters. |
| 903 | SQL error - I fucked up. Awkward. |
| 904 | Absolutely nothing submitted. Send me a swedish zip code using GET, please. E.g. ?zipcode=39126 |
| Example queries | |
|---|---|
| Query | Description |
| ?zipcode=39126 | Simple search for zip code 39126 |
| ?zipcode=391 | Wildcard search for zip codes starting with 391 |
| ?zipcode=391&response=php | Wildcard search for zip codes starting with 391, return serialized PHP array |
| ?zipcode=39126&response=php&charset=latin1 | Simple search for zip code 39126, return serialized PHP array in charset ISO-8859-1 |
| ?zipcode=all&response=csv&charset=latin1 | List all zip codes, return tab separated CSV in charset ISO-8859-1 |