How to connect ipapi to Google Sheets

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:

  1. Install the Apipheny add-on
  2. Obtain an access key
  3. Choose an ipapi endpoint
  4. Enter your ipapi request into Apipheny
  5. Run the ipapi request in your Google Sheet

Step 1.) Install and open the Apipheny add-on for Google Sheets

Apipheny is a free API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to API data sources, easily.

1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace:

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.

open apipheny

Tip: you can open a new Google Sheet by entering this URL in your browser:

Step 2.) Obtain an access key

After signing up for ipapi, your API Access Key will be displayed on the dashboard:

Ipapi dashboard
ipapi dashboard

Copy and paste the value of your API Access Key to a safe location because you’ll need it in the next steps.

Step 3.) Choose an ipapi endpoint

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:

The menu on the left contains basic information about ipapi and a list of API endpoints you can query:

Ipapi documentation page
ipapi documentation page

In this example, we will describe the Bulk IP Lookup endpoint that you can use to look up multiple IP addresses at once:,IP_ADDRESS_NO2,IP_ADDRESS_NO3?access_key=YOUR_ACCESS_KEY

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:

Bulk IP Lookup endpoint documentation
Bulk IP Lookup endpoint documentation

All API calls to ipapi should be made using the base domain. All endpoints and parameters should be appended to this base domain.

Step 4.) Enter the ipapi request into the Apipheny add-on

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:

Ipapi API request entered into Apipheny
Ipapi API request entered into Apipheny

Step 5.) Run the ipapi request in your Google Sheet

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:

Ipapi data imported into Google Sheets
ipapi data imported into Google Sheets

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:

Popular API Tutorials

API Knowledge

What is an API?

What is an API URL?

What are parameters?

What is an endpoint?

What is an API key/token?

What is basic authentication?

What are headers?

What is a GET request?

What is a POST request?

Import JSON to Google Sheets

Need website help? Hire an SEO Consultant.