« SERP API Data Scraper

SERP API Google Trends API Scraper

Download Data to Excel & CSV Files

Steve Spagnola
Written by Steve Spagnola
Last updated April 10, 2024

If you’re looking for an official Google Trends API to scrape data from, one does not exist unfortunately. However, there are still a few unofficial options to reliably scrape data from Google Trends into CSV files:

Google Trends Timeline Data

Check out the video below for a full tutorial or read on to learn more.

C6cwnkFfhO8 ▶️

In order to scrape data from Google Trends, we suggest using a third party, such as one of the most reliable being SerpAPI’s Google Trends API that we can query to download data from Google Trends.

Google Trends

1. Get a Serp API Key

You can sign up for a free SerpAPI account and you’ll get 100 free searches per month to test the service out. Once you have an account, navigate to your SerpAPI Key and copy the value so you can use it with our service:

Serp API Key

2. Run Queries

You can then use the green box on this page to run an initial timeline search for Google Trends. Enter in any word you want to track the trends for, then provide your Serp API key and we’ll query Serp API on your behalf for Google Trends and extract out the timeline data.

Query Serp API

3. Download Data

By default, you’ll get back the past 1 year of trend data for your search term on a weekly basis. If you want to examine some of the advanced options, you can change the timeline to all to scrape all of the trending data since 2004 from Google Trends and download the data on a monthly basis instead:

Google Trends Timeline Data

Regional Data

Serp API allows you to change the search type with a few interesting options. If you’re interested in the breakdown of relative interest for a search term across different regions (e.g. countries), you can set the Search Type parameter to GEO_MAP_0 and get a breakdown by region for the time range specified in your query:

Regional Popularity

Another great feature that Google Trends offers is the ability to see related queries for your provided queries. You can get these back from Serp API’s Google Trends API by setting the search type parameter to RELATED_QUERIES and the API will return the related queries for your search term.

Related Queries