Singapore Postal Code API
Look up any Singapore postal code and get the city, region and coordinates back as JSON. Singapore calls the code a postal code, and 238823 in Singapore is a typical one.
This is the Postal Code API scoped to Singapore. Pass country=SG along with a postal_code to any endpoint call.
Coverage
We publish exactly what we hold for Singapore, so you can check before you build.
- Postal Codes available121,135
- GranularityFull code
- Codes with a region0%
- Coordinates from a true centroid0%
The remaining coordinates are derived from a gazetteer match or estimated from neighbouring codes, so we publish the split rather than implying uniform precision.
Other countries
The same endpoint covers over 100 countries. A few with dedicated pages:
United Kingdom Postcode · India PIN Code · Australia Postcode · Indonesia Kode Pos · Germany PLZ · Netherlands Postcode · Malaysia Poskod · France Code Postal · Japan Yubin Bango · South Korea Postal Code
For United States ZIP codes, use the Zip Code API.
Try it
Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/postalcode?country=SG&postal_code=238823" \
-H "X-Api-Key: YOUR_API_KEY"Frequently Asked Questions
Can I use the Postal Code API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Postal Code API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Postal Code API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Postal Code API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.Which countries does the Postal Code API cover?
The API covers over 100 countries. Pass a two-letter ISO 3166-1 country code to thecountryparameter along with apostal_code. Coverage varies by country, and we publish a per-country manifest showing the exact number of codes, the data source, and whether coverage is complete or partial, so you can check before you build. For US ZIP codes, use the Zip Code API.How do I look up a postal code?
Pass thecountryandpostal_codeparameters, for examplecountry=GB&postal_code=SW1A1AA. Formatting is flexible: spaces, hyphens and country prefixes are normalized, so1011ABand1011 ABboth resolve, as doL-4968and4968for Luxembourg. Review possible error codes if a lookup returns no match.What does the response include for each postal code?
Each object includescountry, the normalizedpostal_code,city,region, and the IANAtimezone. Paid plans additionally returnregion_code,county,county_code,latandlon. Thearea_codefield is available for Canada only; for US ZIP codes use the Zip Code API. To turn coordinates into a full address, pair this with the Geocoding API.Can I search by city or region instead of by code?
Yes. Supply thecityorregionparameter instead of a postal code to find every code in that area. These are premium-only inputs available on the paid plans listed on our pricing page.What happens for countries that do not use postal codes?
Around 68 countries and territories, including the United Arab Emirates, Hong Kong, Macau, Qatar and Panama, operate no postal code system at all. Rather than returning an empty result, the API responds withhas_postal_codes: falseand a short explanation, so your address forms can skip the field instead of failing validation.How is Canadian postal code data handled?
Canadian lookups remain the default when nocountryparameter is supplied, and theprovinceparameter is still accepted as an alias forregion, so existing integrations continue to work unchanged.