How to import Yelp data into Google Sheets using the Yelp API

Yelp is a data base of user reviews for local businesses. In this tutorial, I’ll show you how to connect the Yelp API to Google Sheets in 5 steps:

  1. Install the Apipheny Add-on
  2. Create a Yelp API App
  3. Choose your Yelp Endpoint URL
  4. Enter Yelp API Request into Apipheny
  5. Run the Yelp API Request in your Google Sheet

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

To pull data from the Yelp API to Google Sheets easily and without writing any code, 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 (including the Yelp API), save API requests, schedule API requests, and more. Click here if you want to learn more about Apipheny.

1. Install Apipheny by clicking the Install button on this page.

Install the Apipheny add-on in the G Suite Marketplace
Install the Apipheny add-on in the G Suite Marketplace

2. After you’ve installed Apipheny, open a Google Sheet and then click on the Add-Ons 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 the Apipheny add-on in your Google Sheet
Open the Apipheny add-on in your Google Sheet

Step 2.) Create a Yelp App

Your next step is to make sure you’re logged in to your Yelp account, then go to https://www.yelp.com/developers/v3/manage_app and in the Create App section, complete the App Name, Industry, Contact Email and Description fields:

Create a new Yelp API App
Create a new Yelp API App

After filling out the fields, click the Create New App button:

Create Yelp App
Create Yelp App

Your app has been created and your client id and API Key will be displayed:

Yelp API App Dashboard
Yelp API App Dashboard

Copy your Client ID and API Key somewhere safe because you will need them in the next steps.

Step 3.) Choose a Yelp API Endpoint

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

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

First, open the Yelp API documentation page: https://www.yelp.com/developers/documentation/v3/

The main page contains a structured view of the available endpoints for the Yelp API:

Yelp API Documentation
Yelp API Documentation

An example endpoint is the Transaction Search endpoint, that returns a list of businesses which support food delivery transactions:

https://api.yelp.com/v3/transactions/{transaction_type}/search

The documentation for this endpoint contains a short description of the endpoint’s purpose, the HTTP method used (GET), the request URL, a table describing the accepted parameters and the expected response body:

Yelp API - Transaction Search Endpoint
Yelp API – Transaction Search Endpoint

Step 4.) Enter your Yelp API URL Into Apipheny

After choosing your Yelp API endpoint, 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 Yelp API endpoint that you need. Now copy the complete URL into the Apipheny add-on, where it says API URL Path (JSON / CSV), followed by any GET parameters required for your query.

For this example, we are using the Business Search endpoint that returns up to 1000 businesses based on the provided search criteria. The corresponding URL for this endpoint is:

https://api.yelp.com/v3/businesses/search?categories=fishing&location=NYC

With this endpoint, you can modify the categories and location parameters according to your preference.

In the Headers section of the Apipheny add-on, add one row with the following key and value:

Header:
Key:
Authorization
Value:
Bearer <your_API_key>

For this header, <your_API_key> value is the token you generated previously, in Step 2. There should be a space between Bearer and <your_API_key>. Do not include the carrots “<>” around your API key.

Yelp API URL and Headers entered into the Apipheny add-on

Step 5.) Run the Yelp API Request in your Google Sheet

Finally, click the Run button at the bottom of the Apipheny add-on and then wait for the Yelp API data to be imported into your Google Sheet:

Yelp API data imported into Google Sheets using the Apipheny add-on
Yelp API data imported into Google Sheets using the Apipheny add-on

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

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

If you want to integrate the Yelp API data with Google Data Studio, just follow the same steps above and then connect your Google Sheet to your Google Data Studio report.

Import API to Google Sheets – Apipheny Demo

Related articles:

Related Posts

Leave a Comment