Overview
These instructions describe how to get started with the Zip Code Api. The examples in this article use Postman. You can get postman here
- Pre-Requisites for Zip Code API
- Making a request for a single Zip Code
- Evaluating single zip code response
- Making a request for Zip Codes in California
- Evaluating search response
Pre-Requisites for Zip Code API
Before you start using this API, you have to complete the following:
- Register to Metadapi.com
- Subscribe to the Zip Code API using any available tier (if you are just trying this API the “free” tier is available).
- Get your API Key
- Make sure you have Postman installed.
Making a request for a single zip code
To get started, let’s get the Zip Code of the famous US city Beverly Hills 90210. We are interested in all of the details of that zip code.
The Zip Code api host is https://global.metadapi.com/zipc/v1/zipcodes/{zipCode} and the API Key must be included as part of the header. Let’s get the call started in Postman.
First create a new GET request
Enter the request url to get a zip code
https://global.metadapi.com/zipc/v1/zipcodes/90210
Enter the API Key header where the key name is Ocp-Apim-Subscription-Key and the Value is you API key. (get your API key).