How to Export Traffic Analytics data to Google Sheets using API Question
To acquire the Traffic Analytics API, please contact our sales team, as it is separate from a standard SEMrush subscription and cannot be purchased online.
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 in the cell below and change
If copied correctly, you will see this “Missing mandatory domains param” message until you enter a domain.
Enter a new domain in the first column and it will populate. 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 your desired 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.
- What is the difference between Traffic Analytics and Domain Analytics?
- Why is there no data in Traffic Analytics for the website I entered?
- What is the difference between SEMrush Traffic Analytics and Google Analytics?
- How to Create a Custom Traffic Analytics PDF Report
- What’s the difference? Position Tracking Landing Pages vs. Traffic Analytics Top Pages