ipapi is an API that provides web analytics with IP address lookup and location data. We can use ipapi to find external IP address programmatically, and to lookup location information like city, country, latitude, longitude, timezone, and ASN associated with an IP address. In this tutorial, we’ll show you how to connect ipapi to Google Sheets in 5 steps:
To pull data from ipapi into Google Sheets, first install and open the Apipheny Google Sheets add-on.
Apipheny is a no-code API integrator for Google Sheets that you can use to make unlimited API requests, connect to unlimited APIs, save API requests, schedule API requests, and more.
1. Install Apipheny by clicking here on desktop and then clicking the Install button on the next page
2. After you’ve installed Apipheny, open a Google Sheet and then click on the Add-Ons or Extensions option in the top menu. In the add-ons menu, you should see Apipheny.
Click Apipheny > Import API to open the Apipheny sidebar in your Google Sheet:
After signing up for ipapi, your API Access Key will be displayed on the dashboard:
Copy and paste the value of your API Access Key to a safe location because you’ll need it in the next steps.
In this section, we’ll show you how to browse the ipapi documentation to find an API URL and endpoint that retrieves the specific information you need from ipapi. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 4.
First, open the ipapi documentation page: https://ipapi.com/documentation
The menu on the left contains basic information about ipapi and a list of API endpoints you can query:
In this example, we will describe the Bulk IP Lookup endpoint that you can use to look up multiple IP addresses at once:
If you use this endpoint, don’t forget to replace IP_ADDRESS_NO1, IP_ADDRESS_NO2, IP_ADDRESS_NO3 with real IP addresses and YOUR_ACCESS_KEY with the access key you previously obtained in Step 2.
The documentation for this endpoint contains a description of its functionality, an example request, the accepted path parameters, and an example API response:
All API calls to ipapi should be made using the http://api.ipapi.com/api/ base domain. All endpoints and parameters should be appended to this base domain.
Okay, we’re in the home stretch. 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 3, we explained how you can find the ipapi endpoint that you need. Now copy the complete API URL into the Apipheny add-on, where it says API URL Path, followed by any GET parameters required for your query.
For this example, we are using the Standard Lookup for an IP address that gets the data behind an IP address. The corresponding URL for this endpoint is:
If you use this URL, don’t forget to replace IP_ADDRESS with a real IP address and ACCESS_KEY with your previously obtained API access key.
Headers aren’t required, so you can leave this section blank in Apipheny.
Here’s what our request looks like in Apipheny:
The last step is to click the Run button at the bottom of the Apipheny add-on and then your ipapi data will be imported into your Google Sheet, like so:
After making a successful request to ipapi, try querying a different ipapi endpoint, or try using one of the more advanced features in the Apipheny add-on, such as: