Parsehub is a popular web scraping tool. In this tutorial, I’ll show you how to connect the Parsehub REST API to Google Sheets in 5 steps:

  1. Install the Apipheny add-on
  2. Obtain an API key
  3. Choose a Parsehub Endpoint
  4. Enter your Parsehub API request into Apipheny
  5. Run the Parsehub API request in your Google Sheet

Step 1.) Install and open the Apipheny Add-on in Google Sheets

To pull data from the Parsehub API to 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 opening the following link in on desktop and then clicking the Install button on the page: https://gsuite.google.com/marketplace/app/apipheny_api_tool/966163326746

Install Apipheny in the Google Workspace Marketplace
Install Apipheny in the Google Workspace Marketplace

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 Sheets.

Open Apipheny in your Google Sheet in the menu at the top
Open Apipheny in your Google Sheet in the menu at the top

Step 2.) Obtain an API key

After logging into your Parsehub account, click your username link:

Click on your username in Parsehub after logging in
Click on your username in Parsehub after logging in

In the drop-down menu, click the Account item:

Click "Account" in the menu
Click “Account” in the menu

Your API key will be displayed in the Account section. Copy and paste your API key in a safe location because you will need it in the next steps.

Parsehub API key
Parsehub API key

Step 3.) Choose a Parsehub endpoint

In this section, we’ll show you how to browse the Parsehub API documentation to find the Parsehub API URL with an endpoint that retrieves the information you need from your Parsehub account.

If you already know your URL, or you want to use the same example URL as us, just skip to Step 4.

First, open the Parsehub API documentation page: https://www.parsehub.com/docs/ref/api/v2/

The menu on the left contains several sections, out of which Methods contains the API’s endpoints:

Parsehub API documentation
Parsehub API documentation

If you click the Methods section you will find a list of endpoints for this API:

Parsehub API endpoints
Parsehub API endpoints

An example API URL and endpoint is Run a project, which will start running an instance of the specified project on the ParseHub cloud:

https://www.parsehub.com/api/v2/projects/{PROJECT_TOKEN}/run

The endpoint’s documentation contains a short description of its purpose, the endpoint’s HTTP method (eg. POST), the URI, a list of the accepted parameters, and example request as a cURL command and an associated example response:

Parsehub API endpoint documentation example
Parsehub API endpoint documentation example

Step 4.) Enter your Parsehub API request into Apipheny

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) required by your API endpoint. For this example, we are using the GET method.

API URL: In Step 3, we explained how you can find the Parsehub REST API endpoint that you need. Now copy and paste your complete Parsehub 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 List all projects endpoint, which gets the list of projects in your account. This is what the whole URL looks like:

https://www.parsehub.com/api/v2/projects?api_key=<your_api_key>
  • <your_ api_key> value is the API key that you previously obtained in Step 2
Parsehub API request entered into Apipheny
Parsehub API request entered into Apipheny

Step 5.) Run the Parsehub API request in your Google Sheet

Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the Parsehub API data to be imported into your Google Sheet. Here’s what our request looked like when completed:

Parsehub API data imported into Google Sheets using Apipheny
Parsehub API data imported into Google Sheets using Apipheny

That’s it! You’ve successfully connected your Parsehub account to Google Sheets using the Parsehub API, Google Sheets API, and the Apipheny add-on.

After making a successful request to the Parsehub API, try querying a different Parsehub API endpoint, or try using one of the more advanced features in the Apipheny add-on, such as:

  • Save and schedule your Parsehub API request
  • Make a POST request to the Parsehub API (if available)
  • Use the custom =APIPHENY() function to call the Parsehub API request inside your spreadsheet
  • Create an API request by referencing the value of a cell in your Parsehub API URL with three curly braces eg. {{{Sheet1!A1}}}

Related articles:

Related Posts