Il tuo browser non è aggiornato. Il sito potrebbe non essere visualizzato correttamente. Ti invitiamo ad aggiornare il tuo browser.

Semrush Toolkits
Competitive Research Toolkit
Traffic Analytics
How to Export Traffic Analytics data to Google Sheets using API

How to Export Traffic Analytics data to Google Sheets using API


This article will show you how to export Traffic Analytics data to Google Sheets using the Traffic Analytics API.

You can acquire the Traffic Analytics API from your ‘Subscription info’ page. 

Once the Traffic Analytics API is added to your account, you will have the ability to pull our raw Traffic Analytics data directly into Google Sheets, among other applications. Simply follow these steps:

First, make a copy of this Google Sheet template.

Now, add your API key into cell B4.


Once your API key is entered, you can enter any domain into cells A6 or A7 and the sheet will populate the data throughout the row.


If you want to pull information on more than 2 domains, you’ll need to copy the code in cell B6 and B7, paste it below and change the cell number in the bar.

copy-api-codeIf copied correctly, you will see this “Missing mandatory domains param” message until you enter a domain.

missing-paramsEnter a new domain in the first column and it will populate the data. Label the columns based on the order they are listed in cell B3 so you know what each number is referencing like so:


To change the date to a historical data point, write the desired year and month in column B1.

To change the country, enter the country code in B2. If this cell is blank, it will present global data.

To customize the data you want to pull, edit the preset columns listed in B3.

Information for country code and export column options can be found in the Traffic Analytics API documentation.