Way back in July last year we put together a Google Trends connector for Data Studio, to help meet the reporting needs of some of our clients. It’s pretty straightforward in the scheme of things, but in practice it allows us to pull Google’s search trend data (like the below) directly into our reports.
Since the original tweets we put out, we’ve been using it internally, but have had a fair bit of interest in us opening it up for wider use. As such, in the spirit of providing resources to the community, today we’re opening it up for free.
How it works
For those interested, the setup of the connector is pretty simple and has two components working in the background;
- gtrends.app API
Unfortunately, Google has no official API for Trends data. To work around this, we’ve built a small API which – when given a phrase and region pair – goes off and fetches the data from the Google Trends UI, then returns it as JSON.
- Data Studio Connector
The Data Studio connector itself is a Google Script which allows you to configure the data source, sends calls to the gtrends.app API as needed, and then shuffles the data into a format that Data Studio can use.
Setting it up – Step 1: Register for an API Key
To help prevent any abuse of the API, we require you to register an API key. All that’s required for this is a valid email address, which will allow us to get in touch if your use of the service is causing any problems at all.
You can register for a key using the form below – it’ll be sent via email straight away.
Setting it up – Step 2: Add the Connector
Once you’ve received your API key, you’ll need to work through the following steps to add Google Trends data to your Data Studio reports.
- Create a data source
Create a data source by clicking this link.
Add one data source per keyword/region pair you wish to import data for.
- Configure the data source
Configure the data source with your API key, plus a phrase and region.
- Use the data!
Now your data source is ready, you can start using the data.
As always, there are a few caveats and disclaimers;
- gtrends.app is a free service – we offer no SLA or uptime guarantees.
- We reserve the right to block abusive API accounts, without notice.
- This isn’t an official Google service.
- If you do use the service for any research/tools, please do cite us.
If you’re having technical troubles or are interested in direct API access, drop me a message on Twitter @Simon_JThompson and I’ll do my best to help.
Otherwise, Happy Reporting!