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:
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:
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:
Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) as required by your ipapi endpoint. For this example, we are using the GET method.
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:
Schedule requests for automatic updates
Reference cell values in requests
Stack multiple URLs in a single request
Run all saved requests at once
Crypto API tutorials and more:
Sponsored by Zink Virtual Tip Jar & Rewording.io Paraphrasing Tool
Accept donations on Twitch | Accept donations on Discord | Accept donations on YouTube | Accept donations on Telegram | Accept donations on Twitter | Accept donations on TikTok | Accept donations on Instagram | Accept donations on LinkedIn | Accept donations on Facebook | Accept donations on your Website