Track SERP Positions in Excel (Power Query and CSV)
Do not scrape Google from a spreadsheet. Let a rank tracker run the checks, then pull the results into Excel. With TrackSERPs you can export a CSV from any project report, or connect Power Query to the REST API with a read-only key and press Refresh All. Reading rankings costs no credits. Excel never runs the checks itself.
Key facts
- Web.Contents accepts a Headers record, which is how a Bearer token is sent from Power Query.Source: learn.microsoft.com
- The From Web Advanced dialog offers a fixed list of header names (Accept, Cache-Control, Range and others) that does not include Authorization, so token headers go in M code.Source: learn.microsoft.com
- Excel can refresh a connection on open, every N minutes, or on Refresh All, and Power Query caches data locally until you refresh.Source: support.microsoft.com
- A PivotTable does not update by itself when its source table changes; you refresh it, and rows added to a table are picked up on refresh.Source: support.microsoft.com
Our position: Excel is the analysis layer, not the rank checker
Plenty of "SERP position templates" for Excel work by having a macro fetch Google results pages and hunt for your domain. Those break whenever the page changes and return whatever your own IP address and location happen to see. A spreadsheet is a poor place to run searches. It is an excellent place to slice, pivot and blend results that something else has collected.
So this page does it the other way round. TrackSERPs runs the checks (top 100, Google or Bing, desktop or mobile, any supported country, region or city, on your schedule). Excel reads the results. You have three ways to get them across:
| Method | Best for | Refreshable | Setup time |
|---|---|---|---|
| CSV export from the project report | One-off analysis, a client file, a quick pivot | No, re-export each time | Seconds |
| Power Query against the REST API | A workbook you reopen every week | Yes, Refresh All | About 15 minutes |
| Importing keywords from Excel into TrackSERPs | Starting a project from an existing keyword list | Not applicable | A few minutes |
Everything below is tied to what the product does today. There is no TrackSERPs add-in for Excel and no downloadable .xlsx template, and the product has no XLSX export: its export menu offers CSV and PDF. The workbook you build from the pieces here is yours to keep and reshape.
Method 1: export a CSV and open it in Excel
Open a project report, use the Export menu and choose Export CSV. The browser downloads a file named like acmeplumbing.com-rankings-2026-11-11.csv. The export respects the filters you have applied in the report (device, tag, search text, rank band, movement and tracked URL), so filtering to one tag first gives you a smaller file.
What is in the file:
| Column | Meaning |
|---|---|
| Keyword, Device, Location | The tracked phrase, DESKTOP or MOBILE, and the check location |
| Start | The first recorded rank for the keyword |
| Rank | Current rank, or the text Not in top 100 |
| Life, 1d, 7d, 30d | Movement since the start and over one, seven and thirty days. Positive numbers are improvements |
| Search Volume | Monthly volume where it has been fetched, otherwise blank |
| Tracked URL, Ranking URL | The URL you are tracking, and the URL that actually ranked |
| Last Updated | Time of the latest check, formatted in your account's timezone |
| SERP Features | Features present on the results page, separated by semicolons |
| Engine | google or bing |
Four details save you time in Excel:
- Unranked rows contain text, not a number.
Not in top 100in the Rank column stops Excel treating the column as numeric. In a pivot, either filter those rows out or add a helper column such as=IFERROR(VALUE([@Rank]),101)so unranked sorts to the bottom. - Tracked URLs appear as sub-rows. When a keyword has tracked URLs, each one follows the keyword row with the phrase prefixed by an arrow (
↳). Filter on the Tracked URL column being blank if you only want the domain-level row per keyword. - The file is capped at 5,000 keyword rows per export. Larger projects should use the API method, which pages through everything.
- Open it through Data, not by double-clicking, when in doubt. On the Data tab, From Text/CSV shows a preview and lets you choose the delimiter before loading, which is the safer route if accented keywords or dates look off. Microsoft documents the steps on its text and CSV import page.
A CSV is a snapshot. If you build a pivot on it you will rebuild or repoint it next week. That is the argument for the next method.
Method 2: Power Query against the REST API
Power Query is the "Get & Transform" engine in desktop Excel. Microsoft's own product table lists it for Excel on Windows and on Mac. This guide covers the desktop experience only. The Web connector documentation notes that product support differs by host, so check your version before promising the workbook to a colleague on another platform.
What you need
- A TrackSERPs API key. Create it under Settings, API, Keys (owner or admin role). A key with only the
rankings:readscope is enough: it covers every read endpoint, including listing your projects. Plans that include API access in read-only mode work, because this only reads. - A project ID. Use
GET /projectsor copy it from the project's URL. The examples use the placeholdercmwc0f1yp0005rqk7w1plnab1. - Use a
ts_test_key first. Test keys read a synthetic demo project only, so you can build the whole workbook without touching real client rankings. Your own project IDs return 404 with a test key: list projects with the test key and use the demo project'siduntil you swap in ats_live_key and your real ID.
Why the header goes in M code, not in the dialog
The obvious route is Data, Get Data, From Other Sources, From Web, then the Advanced option and the HTTP request header parameters. That list is a fixed dropdown of ten standard header names (Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer). Authorization is not on it. The Web API credential type, meanwhile, puts a key in the query string, and TrackSERPs reads the key from the Authorization: Bearer header instead.
The way through is Web.Contents, which accepts a Headers record when you write the query yourself. Open a blank query and paste M into the Advanced Editor.
Open a blank query
On the Data tab choose Get Data, then From Other Sources, then Blank Query. In the Power Query editor choose Home, then Advanced Editor.
Paste the M code below
Replace the placeholder key and project ID. Leave the base URL and the
v1/...path as they are.Choose Anonymous when prompted
The first run asks how to connect to
https://api.trackserps.com. Choose Anonymous and apply it to that address. The key is sent by theHeadersoption, so no Excel credential type is needed.Close and load
Choose Close & Load. Excel creates a worksheet table. Name the query something like
Rankingsso formulas stay readable.
The M code
This pages through every keyword and device in a project (500 rows per request, following next_cursor), flattens the nested fields and adds a rank band you can pivot on.
let
ApiKey = "ts_test_YOUR_KEY_HERE",
ProjectId = "cmwc0f1yp0005rqk7w1plnab1",
GetPage = (pageCursor as nullable text) as record =>
let
Query = [limit = "500"] & (if pageCursor = null then [] else [cursor = pageCursor]),
Body = Web.Contents(
"https://api.trackserps.com",
[
RelativePath = "v1/projects/" & ProjectId & "/rankings/latest",
Query = Query,
Headers = [Authorization = "Bearer " & ApiKey, Accept = "application/json"]
]
)
in
Json.Document(Body),
Pages = List.Generate(
() => GetPage(null),
each _ <> null,
each if [next_cursor] = null then null else GetPage([next_cursor]),
each [rankings]
),
Rows = List.Combine(Pages),
AsTable = Table.FromList(Rows, Splitter.SplitByNothing(), {"r"}),
Expanded = Table.ExpandRecordColumn(
AsTable, "r",
{"phrase", "device", "date", "rank", "ranking_url", "serp_features",
"ai_overview", "change_7d", "change_30d", "checked"}
),
WithAio = Table.AddColumn(Expanded, "ai_overview_cited", each [ai_overview][cited], type nullable logical),
NoAioRecord = Table.RemoveColumns(WithAio, {"ai_overview"}),
Features = Table.TransformColumns(
NoAioRecord,
{{"serp_features", each Text.Combine(List.Transform(_, Text.From), "; "), type text}}
),
Typed = Table.TransformColumnTypes(
Features,
{{"rank", Int64.Type}, {"change_7d", Int64.Type}, {"change_30d", Int64.Type}, {"date", type date}},
"en-US"
),
Banded = Table.AddColumn(
Typed, "rank_band",
each if [rank] = null then "Unranked"
else if [rank] <= 3 then "01-03"
else if [rank] <= 10 then "04-10"
else if [rank] <= 20 then "11-20"
else "21-100",
type text
)
in
Banded
Every field name above is in the API's LatestRanking schema: phrase, device, date, rank, ranking_url, serp_features, ai_overview (an object with present, cited and cited_url), change_7d, change_30d and checked. The response is { "rankings": [...], "next_cursor": "..." }, and next_cursor is null on the last page.
Three behaviours to know about the data itself:
rankis null for unranked keywords. The column stays empty rather than showing a number. That is why the rank band code tests for null first.change_7dandchange_30dare positive when a keyword improved. A move from 8 to 4 is+4. Green for positive and red for negative is the conventional formatting.checkedis false until a run has completed for that keyword and device. Thedateis null then too. Filter these out of any average.
A ts_test_ key returns synthetic rows with test_ IDs. If your numbers look too tidy, check which key you pasted.
Several projects in one workbook
Agencies usually want every client in one table. Keep the M above but turn the first lines into a function, then call it for a list of project IDs. Put the IDs in a worksheet table named Projects with a column called project_id, load that table as a connection-only query, and add a column that invokes the function:
let
Source = Excel.CurrentWorkbook(){[Name = "Projects"]}[Content],
WithData = Table.AddColumn(Source, "data", each GetRankings([project_id])),
Expanded = Table.ExpandTableColumn(
WithData, "data",
{"phrase", "device", "rank", "change_7d", "change_30d", "rank_band"}
)
in
Expanded
Here GetRankings is the earlier query saved as a function: replace the ProjectId = "cmwc0f1yp0005rqk7w1plnab1", line with a parameter by starting the query with (ProjectId as text) => before let, and name the query GetRankings. To list the IDs rather than typing them, call GET /projects (the rankings:read scope covers it) and read projects[].id and projects[].name. The next_cursor rule is the same.
Refresh behaviour, plainly
Microsoft's refresh documentation covers the options:
- Refresh All on the Data tab re-runs every query in the workbook. The arrow beside it refreshes only the selected one.
- Refresh data when opening the file and Refresh every N minutes live in Connection Properties, on the Usage tab. Opening a workbook with refresh-on-open needs external data enabled in the Trust Center or the file in a trusted location.
- Background refresh lets you keep working while the query runs.
- Power Query caches data locally. If you see a message that the preview may be out of date, refresh.
- All of these options run inside an open copy of Excel. For unattended refresh, a scheduled script or an automation platform is the better fit; the Google Sheets approach is one example.
The other half of refresh is on our side. New rankings appear only when a check run finishes. Runs normally take 10 to 20 minutes, and projects check daily, weekly or monthly. A refresh every five minutes returns identical rows between runs. Set refresh-on-open and leave it there.
What a refresh costs
Credits: none. Reading rankings through the API is free; credits are spent when checks run. Calls are another matter. Each request counts toward your plan's per-minute limit and monthly call allowance, and the bulk history endpoint counts as five. A project with 1,200 keyword and device rows needs three requests per refresh at 500 per page. Twenty projects of that size is 60 requests per refresh. Refreshed once a day for 30 days that is 1,800 calls, a small fraction of even the smallest plan's monthly allowance. See the rate limits page for your plan's numbers and the headers that report them.
Build the useful views
Once Rankings is a table, the analysis is ordinary Excel. These are the three worth setting up first.
A visibility distribution pivot
Insert a PivotTable from the table. Put rank_band in Rows, count of phrase in Values and device in Columns. The band labels start with zero-padded numbers so they sort in order without a custom list. This is the one-glance view of how many keywords sit in the top three, on page one, on page two, or deeper.
Microsoft notes that a PivotTable works from a cached snapshot, so after a Refresh All, right-click the pivot and refresh it too, or use PivotTable Analyze, then Refresh All. A pivot you forgot to refresh is the most common reason the numbers look old.
Movement: winners and losers
Add a pivot filtered to change_7d, or simply sort the table. A compact version with illustrative numbers for a fictional plumber:
| Keyword | Device | Rank | change_7d | rank_band |
|---|---|---|---|---|
| emergency plumber austin | MOBILE | 3 | +4 | 01-03 |
| water heater repair | DESKTOP | 7 | +2 | 04-10 |
| drain cleaning cost | DESKTOP | 12 | -5 | 11-20 |
| tankless water heater install | MOBILE | 18 | 0 | 11-20 |
| pipe repair near me | MOBILE | (blank) | (blank) | Unranked |
These rows are made up to show the shape. In practice, sort by change_7d ascending to find drops, then check the ranking URL for the page that moved. Pair a drop with the SERP snapshot comparison in the app before deciding it is your fault, because many drops are a new feature pushing results down rather than a change to your page. The guide on why rankings differ between tools covers the other usual suspects.
Conditional formatting makes the table readable: a green fill for change_7d above zero and red for values of minus three or lower is enough.
Blend with the numbers the business cares about
Rankings alone do not justify a retainer. Join the Rankings table to your own data with XLOOKUP or in Power Query by merging on phrase: landing page revenue, leads per page, cost per lead, or Search Console clicks exported separately. Because ranking_url is in the table, you can group by landing page and see which pages carry both the ranking and the revenue. That blend is the real reason to put rankings in Excel instead of reading a dashboard.
Method 3: import keywords from Excel into TrackSERPs
The reverse direction is common too: you already keep a keyword list in a workbook and want to start tracking it. The importer is in the app under Import.
What it accepts, from the code:
- File types. The picker offers
.xlsx,.xlsand.csv, with a 10 MB limit. CSV files are parsed as UTF-8 text; workbook files are read as.xlsx. If you have a legacy.xls, re-save it as.xlsxor CSV first. - Header row. The importer uses the first non-empty row as headers, and every worksheet must contain a Keyword column or it stops with an error naming the sheet. Keyword is also read from columns called Keywords, Phrase, Search Term, Query or Term.
- Optional columns. URL (also Tracked URL, Landing Page, Link), Rank (also Position or Current Rank), Tags (comma or semicolon separated), Device, Location and Date. You can map columns by hand when your headers are unusual.
- One project per worksheet. A multi-tab workbook becomes one project per tab. If a sheet mixes locations or devices, the importer offers to split it into separate projects.
- Deduplication. Repeated phrases are merged case-insensitively. Their tracked URLs and tags are combined, and the best (lowest) baseline rank is kept.
- Competitor exports. Exports from AccuRanker, SerpRobot, SE Ranking, Semrush Position Tracking, Ahrefs Rank Tracker, Wincher, Mangools SERPWatcher, SerpBook and Nightwatch are recognised by their headers. If you are leaving one of those tools, see the switching comparisons for what carries over.
How rank values are read: whole numbers from 1 to 100 are kept. Zero, a dash, N/A, unranked, > 100 and Not in top 100 are all treated as no rank. Anything else, including 101 or decimals, is also ignored rather than guessed.
A clean file looks like this:
| Keyword | URL | Rank | Tags | Device |
|---|---|---|---|---|
| emergency plumber austin | https://acmeplumbing.com/emergency | 9 | money, service | mobile |
| water heater repair | https://acmeplumbing.com/water-heaters | 14 | service | desktop |
| drain cleaning cost | https://acmeplumbing.com/blog/drain-cleaning-cost | blog | desktop |
The importer creates a project, the keywords, each URL as an exact-match tracked URL, and a baseline snapshot from any rank and date you supplied, so the first real check has something to be compared with. You choose the folder, location, devices and schedule (daily, weekly, monthly or manual) before committing. Importing does not run checks or spend credits by itself; the preview shows the estimated credit impact first. Tags carry over, which matters because tags are what you will later filter on in the CSV export, the API's tag parameter and alert rules.
When not to use Excel
- You want alerts. A workbook only updates when someone opens it. For "tell me when this drops", use Slack rank alerts or email alerts, which fire when a run finishes.
- You want a client-facing report. Send the white-label PDF or a share link, not a workbook with a key inside it. The sample report shows what clients see.
- The data is large. Millions of history rows fit badly in a worksheet. Use the history endpoint with a date range, or move to a database and a BI tool.
- You want unattended cloud refresh. Excel refreshes only while it is open. Call the REST API from a scheduled script instead.
- Your team works in Google Workspace. Use the Sheets pattern. Neither a Sheets add-on nor a Looker Studio connector exists yet; the Apps Script route is the supported one.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
DataSource.Error: Web.Contents failed ... 401 | Wrong, expired or revoked key, or the Bearer prefix missing | Check the header string is Bearer followed by the key; confirm the key in Settings |
403 with a plan or scope message | Key lacks rankings:read, or the account has no API access | Create a key with the scope; check the plan includes API read access |
404 | Wrong project ID, a key restricted to other projects, or a ts_test_ key with a real project ID | Copy the ID again from the app or GET /projects using the same key |
429 | Over the per-minute limit or monthly allowance | Wait for the Retry-After period; reduce parallel project queries |
| Credential prompt keeps returning | Credentials saved against a different address | Data, Get Data, Data Source Settings; clear permissions for https://api.trackserps.com and choose Anonymous again |
| Rank column shows text or errors | Export CSV contains Not in top 100 | Add the IFERROR(VALUE()) helper or filter those rows |
| Numbers look identical after refresh | No run has finished since the last refresh | Check the project's last run time in the app; wait for the next scheduled run |
rank all null and checked false | Project is new; no run has completed | Start a check or wait for the schedule |
| Pivot shows old numbers after refresh | Pivot not refreshed separately | Right-click the pivot and choose Refresh |
Where this fits
The Power Query route and the Python and Node SDK routes read the same endpoints, so a number in Excel matches a number in a script. If you are designing a larger reporting pipeline around those calls, the rank tracking dashboard API guide goes through caching and pagination. Excel is the right tool when an analyst needs to slice data by hand. It is the wrong tool for anything that must run while nobody is looking.
To start, create an API key with a ts_test_ prefix and build the query against fake data first. When it works, swap in the live key.
Frequently asked questions
Can Excel track SERP positions on its own?
Is there a TrackSERPs Excel add-in or template file to download?
Does refreshing the workbook cost credits?
How often will the numbers in Excel change?
Why does Power Query ask me to choose Anonymous?
Can I import keywords from an Excel file into TrackSERPs?
Sources & references
- Microsoft Learn: Web.Contents (Power Query M)(checked 2026-11-11)
- Microsoft Learn: Power Query Web connector(checked 2026-11-11)
- Microsoft Support: Refresh an external data connection in Excel(checked 2026-11-11)
- Microsoft Support: Create a PivotTable to analyze worksheet data(checked 2026-11-11)
- Microsoft Support: Import or export text (.txt or .csv) files(checked 2026-11-11)
- Microsoft Learn: What is Power Query?(checked 2026-11-11)