API Connector Documentation
Import SerpApi Data to Google Sheets
In this guide, we’ll walk through how to pull data from the Search Engine Results Page API (SerpApi) directly into Google Sheets, using the API Connector add-on for Sheets.
SerpApi provides access to data from nearly 30 different Google sources (Google Search, Google Maps, Google Finance, Google Flights, etc.), as well as other search engines and directories like Baidu, Bing, DuckDuckGo, Yahoo, Naver, Yelp, and more. Overall, it's a very powerful API!
Contents
- Before You Begin
- Part 1: Get Your SerpApi API Key
- Part 2: Pull SerpApi API Data into Sheets
- Part 3: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get Your SerpApi API Key
- Create an account at https://serpapi.com/users/sign_up if you haven't already
- Navigate to https://serpapi.com/dashboard
- You'll see your key listed in the "Your Private API Key" section
Part 2: Pull SerpApi API Data into Sheets
You can fetch data for any of the endpoints and parameters shown in the documentation. For this example, we'll fetch data from Google Trends. Substitute in your own API key where it says your_key
, and (optionally) your own query term in the q
parameter.
- Open up Google Sheets and click Extensions > API Connector > Open > Create request.
- In the request form enter the following:
- Application:
Custom
- Method:
GET
- Request URL:
https://serpapi.com/search.json?engine=google_trends&q=crypto&data_type=TIMESERIES&tz=0&date=today+12-m&api_key=
your_key
- Application:
- Create a new tab and click Set current to use that tab as your data destination.
- Name your request and click Run. A moment later you’ll see data populate your sheet.
Part 3: API Documentation
Official API documentation: https://serpapi.com/search-api