This use case shows you how to set up a query that replicates the data seen in the SEMrush Projects' Keyword Ranking report, that is part of the Position Tracking data.
Here is an example report we want to replicate from the Rankings tab in the SEMrush Projects UI:
The connector to use will be SEMrush Projects - this is supported currently in Google Sheets, Data Studio, and the Supermetrics API. It is an "early access" connector, which means it is still being worked on and may have some bugs/issues.
The setup in this use case will be done in Google Sheets, but the same fields and configuration can be used in the other platforms to build the report.
IMPORTANT - Each query run with SEMrush Projects will use API units from your account, even if the query results were not what you wanted. Be careful about what you run and start with small test, with 5 or 10 rows maximum to preserve API units. See also SEMrush API Units.
- Click on the SEMrush Projects connector and log in with your API key (which can be obtained here).
- Under Select projects, pick the project you wish to obtain keyword ranking data for.
This should match this part of the SEMrush UI:
- Under Report configuration, you will select the settings for the report type. In this case you, want the "Organic positions report" option.
This aligns to this setting for the Positing Tracking report:
Note - If you want to track "Google Ads" based data (aka Paid), then you can use the "AdWords positions report" instead.
- For the Tracked URL field, you will add the domain or URL you want to get keywords for, either your Tracked URL or a competitors. Note that this MUST use what they call a 'mask' to work properly.
IMPORTANT - If you give the wrong mask/no mask, you may get no keyword position results back, so this is critical to set up correctly!
Examples of proper masks, based on the URL type:
URL Type Mask example rootdomain *.ebay.com/* subdomain www.ebay.com/* subfolder ebay.com/motors/* URL (default) https://www.ebay.com/motors/
Note - URLs that end in a trailing slash (/) and those without are considered two different URLs. So "mysite.com/*" and "mysite.com*" are not the same and may return different results.
For this example then, we want to get the keywords for the root domain of Supermetrics, so the mask would be:
- Other settings:
- Max keywords is the number of keyword values to pull, make sure this is set high enough to get all keywords in the project. Supermetrics has 11, so we set to 20 to ensure all were retrieved. (WARNING - more keywords means more API units are used, so start low to test and increase when the query is final).
- Local pack filter aligns with the "Rank count" option in the UI. Default to "Include local pack rankings" should be used, unless you have changed the setting in the UI.
- Position Filter is an optional setting and aligns with the "Top positions & changes" filter in the UI:
- Display tags is an optional setting, and can be used to filter results based on any tags you have set. For example, we could filter for excel and get this keyword.
You can add multiple tags, separated by the pipe (|) character.
- Under Select Dates, you can pick the range you want to monitor for the changes.
WARNING - Longer ranges means more API units are used! Start short at first and then extend as you confirm your tests.
This should align with this element in the SEMrush UI:
- Under Select metrics, you want the following that align with the report:
- Position at beginning
- Position at end
- Position difference
- Absolute visibility
- Under Split by, Split to rows you want the following dimensions that align with the report:
- Avg searches per month
- Avg Price
Note that # of rows to fetch in this case does nothing, you set the rows based on the Max keywords setting under the "Report configuration" above.
- Click Get data to Table to pull the data (if using Data Studio, the table will update automatically).
Here's the results in our example:
Here's then how those items align to the report to check (note that "Absolute visibility" doesn't appear to be featured in the UI, so there's link to it):
- There are other dimensions that may be useful, such as "Date" or "Keyword position" but each one added will split the data further.
For example, if we added both, there will now be multiple entries for each keyword, showing the data for each day in the range as well as the past from starting position to ending position: