In this tutorial we will show you how to get post codes or zip codes data into your Google Sheets using an API. The tutorial shows the process to connect to an API that has data on UK postcodes, but you can follow the same process to connect to a US zip code API such as this one or this one.
Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.
1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install
2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.
In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.
Tip: you can open a new Google Sheet by entering this URL in your browser:
In this section, we’ll show you how to browse the Postcodes.io API documentation to find the endpoint that retrieves the information you need from your account. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 3.
First, open the Postcodes.io API documentation page: http://postcodes.io/docs
This page contains general information about the Postcodes.io API and a list of Methods (Endpoints):
If you scroll down you will find the endpoints:
An example endpoint is Postcode Validation, which validates a given postcode. The URL for this endpoint is:
If you use this URL, don’t forget to replace POSTCODE with a real postcode value.
Each endpoint’s documentation contains a description of the response it returns, its HTTP method and URI, as well as additional details about its operations (the parameters it takes, the rules it applies, etc.).
All endpoints can be accessed from the following base domain: https://api.postcodes.io
Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the “Import” tab. With the Import tab open, enter these details into the add-on:
API URL: In Step 2, we explained how you can find the Postcodes.io API endpoint that you need. Now copy and paste your complete Postcodes.io API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).
For this example, we are using the Lookup a postcode endpoint, which retrieves details about a specific postcode. This is what the whole URL looks like:
If you use this URL, you should replace POSTCODE with a real value of a postcode located in UK.
Headers aren’t required. This API does not require any authentication. You can leave the Headers section blank in Apipheny.
Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the Postcodes.io API data to be imported into your Google Sheet. Here’s what our request looked like when completed:
After making a successful request to the Postcodes.io API, try querying a different Postcodes.io API endpoint, or try using one of the more advanced features in the Apipheny add-on.
Make a GET request
Make a POST request
PUT, PATCH, & DELETE Requests
Save requests for later
Schedule requests for automatic updates
Reference cell values in requests
=APIPHENY custom function
Stack multiple URLs in a single request
Run all saved requests at once
Modify your request settings
Import & export saved API settings
Crypto API tutorials and more:
Alpha Vantage API
Constant Contact API
Facebook Graph API
Facebook Ads API
Google SERP API
Linkedin Ads API
Product Hunt API
Reddit Ads API
Riot Games API