TrackSERPs
Log in

Track SERP Positions in Excel (Power Query and CSV)

Quick answer

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:

MethodBest forRefreshableSetup time
CSV export from the project reportOne-off analysis, a client file, a quick pivotNo, re-export each timeSeconds
Power Query against the REST APIA workbook you reopen every weekYes, Refresh AllAbout 15 minutes
Importing keywords from Excel into TrackSERPsStarting a project from an existing keyword listNot applicableA 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:

ColumnMeaning
Keyword, Device, LocationThe tracked phrase, DESKTOP or MOBILE, and the check location
StartThe first recorded rank for the keyword
RankCurrent rank, or the text Not in top 100
Life, 1d, 7d, 30dMovement since the start and over one, seven and thirty days. Positive numbers are improvements
Search VolumeMonthly volume where it has been fetched, otherwise blank
Tracked URL, Ranking URLThe URL you are tracking, and the URL that actually ranked
Last UpdatedTime of the latest check, formatted in your account's timezone
SERP FeaturesFeatures present on the results page, separated by semicolons
Enginegoogle or bing

Four details save you time in Excel:

  1. Unranked rows contain text, not a number. Not in top 100 in 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.
  2. 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.
  3. The file is capped at 5,000 keyword rows per export. Larger projects should use the API method, which pages through everything.
  4. 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:read scope 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 /projects or copy it from the project's URL. The examples use the placeholder cmwc0f1yp0005rqk7w1plnab1.
  • 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's id until you swap in a ts_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.

  1. 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.

  2. Paste the M code below

    Replace the placeholder key and project ID. Leave the base URL and the v1/... path as they are.

  3. 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 the Headers option, so no Excel credential type is needed.

  4. Close and load

    Choose Close & Load. Excel creates a worksheet table. Name the query something like Rankings so 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:

  • rank is 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_7d and change_30d are positive when a keyword improved. A move from 8 to 4 is +4. Green for positive and red for negative is the conventional formatting.
  • checked is false until a run has completed for that keyword and device. The date is 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:

KeywordDeviceRankchange_7drank_band
emergency plumber austinMOBILE3+401-03
water heater repairDESKTOP7+204-10
drain cleaning costDESKTOP12-511-20
tankless water heater installMOBILE18011-20
pipe repair near meMOBILE(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, .xls and .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 .xlsx or 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:

KeywordURLRankTagsDevice
emergency plumber austinhttps://acmeplumbing.com/emergency9money, servicemobile
water heater repairhttps://acmeplumbing.com/water-heaters14servicedesktop
drain cleaning costhttps://acmeplumbing.com/blog/drain-cleaning-costblogdesktop

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

SymptomLikely causeFix
DataSource.Error: Web.Contents failed ... 401Wrong, expired or revoked key, or the Bearer prefix missingCheck the header string is Bearer followed by the key; confirm the key in Settings
403 with a plan or scope messageKey lacks rankings:read, or the account has no API accessCreate a key with the scope; check the plan includes API read access
404Wrong project ID, a key restricted to other projects, or a ts_test_ key with a real project IDCopy the ID again from the app or GET /projects using the same key
429Over the per-minute limit or monthly allowanceWait for the Retry-After period; reduce parallel project queries
Credential prompt keeps returningCredentials saved against a different addressData, Get Data, Data Source Settings; clear permissions for https://api.trackserps.com and choose Anonymous again
Rank column shows text or errorsExport CSV contains Not in top 100Add the IFERROR(VALUE()) helper or filter those rows
Numbers look identical after refreshNo run has finished since the last refreshCheck the project's last run time in the app; wait for the next scheduled run
rank all null and checked falseProject is new; no run has completedStart a check or wait for the schedule
Pivot shows old numbers after refreshPivot not refreshed separatelyRight-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?
No. Excel has no way to check Google rankings. A macro that fetches results pages yourself is fragile and shows only what your own connection sees. The reliable pattern is a rank tracker that runs the checks and Excel as the analysis layer: import a CSV, or let Power Query read the tracker's API.
Is there a TrackSERPs Excel add-in or template file to download?
No. There is no add-in and no downloadable template. What exists is the CSV export in the project report, the REST API that Power Query can read, and the M code on this page that you paste into the Advanced Editor. The workbook you build from them is yours.
Does refreshing the workbook cost credits?
No. Reading rankings through the API is free of credits. Each request does count toward your plan's per-minute rate limit and monthly call allowance, and the bulk history endpoint counts as five requests. Credits are spent only when a check runs, not when you read the results.
How often will the numbers in Excel change?
Only when a check run finishes. Runs normally take 10 to 20 minutes, and a project runs on its own schedule (daily, weekly or monthly). Refreshing Excel every few minutes between runs returns the same data.
Why does Power Query ask me to choose Anonymous?
Power Query's built-in credential types do not include a custom Authorization header. The key travels in the Headers option in the M code, so you pick Anonymous for the https://api.trackserps.com address. That also means the key is stored in the query itself, so treat the workbook as sensitive.
Can I import keywords from an Excel file into TrackSERPs?
Yes. The importer reads .xlsx and .csv files up to 10 MB, finds the header row, and needs a Keyword column. URL, rank, tags, device, location and date columns are optional. Each worksheet can become its own project, and the importer shows a preview before anything is saved.

Sources & references

  1. Microsoft Learn: Web.Contents (Power Query M)(checked 2026-11-11)
  2. Microsoft Learn: Power Query Web connector(checked 2026-11-11)
  3. Microsoft Support: Refresh an external data connection in Excel(checked 2026-11-11)
  4. Microsoft Support: Create a PivotTable to analyze worksheet data(checked 2026-11-11)
  5. Microsoft Support: Import or export text (.txt or .csv) files(checked 2026-11-11)
  6. Microsoft Learn: What is Power Query?(checked 2026-11-11)