TrackSERPs
Log in

TrackSERPs Postman Collection: Import, Configure and Test the API

Quick answer

The TrackSERPs Postman collection is a Postman v2.1 file generated from the OpenAPI spec. It holds all 39 API requests in 10 folders, with baseUrl, apiKey and one variable per path parameter, and Bearer auth inherited by every request. Import it, paste a ts_test_ key, set the ID variables, and you can read demo rankings without spending credits. Requests that start paid checks are named (spends credits).

Key facts

  • Postman's Import tab accepts collection JSON files, OpenAPI files or links, and cURL commands.Source: learning.postman.com
  • When a variable name exists in several Postman scopes, the narrowest scope wins, so an environment value overrides a collection value.Source: learning.postman.com
  • Postman test scripts are JavaScript in a Post-response script, written with pm.test and pm.expect, and run after each response.Source: learning.postman.com
  • Postman adds a Bearer token to the Authorization header, and the token field can hold a variable reference instead of the raw key.Source: learning.postman.com

What the collection is, and what it is not

The TrackSERPs Postman collection is a single JSON file in Postman's v2.1 format. It is generated from packages/api-spec/openapi.yaml, the same OpenAPI 3.1 spec that the TypeScript SDK types come from. Each request has the right path, any query parameters, a sample body where the endpoint takes one, and the example responses from the spec.

Our position: use the collection to learn the API and to debug a single call, and use code for anything repeatable. Postman is the fastest way to see what GET /projects/{project_id}/rankings/latest returns for your account. It is a poor place to run a nightly job.

Two facts to know before you start:

  • Path IDs are collection variables. Every request uses {{project_id}}, {{keyword_id}} and so on in its path. Nothing works until you set the ones a request needs. The variables section below lists them.
  • It ships no tests and no environment file. It has collection variables and inherited auth, nothing more. The section on tests gives you a script to paste in.

Where the file lives and how to get it

Download the file from trackserps.postman_collection.json (/trackserps.postman_collection.json). It is also in the TrackSERPs repository at integrations/postman/trackserps.postman_collection.json, next to a small generate.cjs script and a README. Postman can also import the OpenAPI spec directly from openapi.yaml (/openapi.yaml). If you would rather not import anything, you have two routes that need no file from us:

  1. Open the API quickstart, copy a cURL example, and paste it into Postman's Import tab. Postman's import supports cURL commands, so each paste becomes one request.
  2. Build a collection by hand from the API reference. It takes about ten minutes for the six or seven requests most people use.

Import the collection

  1. Open the Import tab

    In Postman, click Use resources or import, then choose the Import tab. Drag trackserps.postman_collection.json into the window, or select it. Postman's import also takes pasted text or a URL, and the collection is v2.1, which Postman supports. Only v1 collection files are rejected.

  2. Confirm the collection appears

    A collection named TrackSERPs API appears in the left sidebar with ten folders: Account, Discovery, Keywords, Rankings, Search Volume, Runs, Lookups, Competitors, Share Links and Webhooks.

  3. Set the apiKey variable

    Click the collection, open the Variables tab, and replace the placeholder apiKey value with a ts_test_ key. Enter it as the local value, which Postman uses when sending and does not sync to its cloud unless you choose to share it. Save.

  4. Send GET Get account profile

    Open Account, then Get account profile, and press Send. A 200 response with an account object means the URL, the variable and the auth header all work. With a test key the response carries the header X-TrackSERPs-Test-Mode: true.

Create the key in Settings, API Keys in the app. The secret is shown once. API access depends on the plan: the Starter plan has read access and one key, and write access starts on Growth. The rate limits page has the full table.

Variables, environments and the two keys

The collection defines two settings variables and one variable for each path parameter:

VariableDefault in the fileMeaning
baseUrlhttps://api.trackserps.com/v1Prefix for every request. Include /v1.
apiKeyts_live_your_api_key_herePlaceholder. Replace it with your own key.

Both appear as {{baseUrl}} and {{apiKey}} inside requests. The placeholder starts with ts_live_, which is a reason to overwrite it before sending anything.

The path variables ship empty. Fill in the ones a request needs, on the collection's Variables tab or in an environment:

VariableUsed in pathsWhere to get a value
project_id/projects/{{project_id}}/...id from List projects or Create project
keyword_id.../keywords/{{keyword_id}}/...id from List project keywords
run_id.../runs/{{run_id}}run_id from Trigger manual check run, or id from Get latest check run
lookup_id/lookups/{{lookup_id}}id from Create one-off rank lookups
competitor_id.../competitors/{{competitor_id}}id from List project competitors
webhook_id/webhooks/{{webhook_id}}/...id from List webhook endpoints or Create webhook endpoint

An unset variable stays literal in the URL, so the API answers 404.

Postman resolves a variable from the narrowest scope that defines it: local, then data, then environment, then collection, then global. That rule gives you a safe layout:

  1. Leave a ts_test_ key in the collection variable. Anyone who opens the collection can send requests without risk.
  2. Create an environment called something like TrackSERPs live, with an apiKey variable holding the ts_live_ key.
  3. Select that environment only when you mean to. While it is selected, its apiKey overrides the collection value. Switch it off and you are back on the test key.

Postman keeps a variable's local value on your machine and syncs it to its cloud only if you share it. For sensitive values its docs point to Postman Vault. The environment editor also has a Secure control for a variable; treat it as an extra, not as your only protection.

If you want a local development server, set baseUrl to your own URL. We do not document a public local-development URL, so use whatever your own deployment serves.

How authentication works in the collection

The collection root sets Bearer Token auth with the token {{apiKey}}. Requests inherit it, so no request carries its own Authorization header. Postman then sends Authorization: Bearer <your key>, which is the header the API spec defines.

If a request ever returns 401, open its Authorization tab and check that the type reads Inherit auth from parent. Someone may have overridden it on that request.

Two rules from the API worth knowing here:

  • A key in the query string is rejected with 400 key_in_query. Do not paste ?api_key= into a URL.
  • A key has scopes. rankings:read is on every key. Writes need projects:write, keywords:write, runs:write or shares:write, and webhook endpoints need webhooks:write even to list them. A key can also be tied to specific projects or an IP allowlist. The authentication docs explain each.

The folders, one by one

All 39 requests, grouped as they appear in the sidebar.

FolderRequestsWhat to know
AccountGet account profile; Get account credit and API usageStart here. Usage shows credits and API call quota.
DiscoveryList projects; Create project; Get project details; Update project; Search locationsList projects returns projects and next_cursor. Create needs projects:write and does not start a run. Search locations takes q and country, and gives you the location_code numbers other endpoints use.
KeywordsList project keywords; Upsert keywords; Archive keywordUpsert takes up to 500 keywords per request. Archive is a DELETE.
RankingsLatest rankings for the project; latest for one keyword; keyword history; bulk history; SERP snapshot; SERP compareReads, so free. Bulk history can cover up to 400 days and counts as 5 requests against your rate limit and monthly quota. SERP compare needs from and to dates.
Search VolumeVolume for one keyword; latest volume for all project keywordsReads, so free.
RunsTrigger manual check run (spends credits); Get latest run; Get run by IDThe trigger request starts billable work. See below.
LookupsList lookups; Create one-off rank lookups (spends credits); Get lookup by IDCreate holds 1 credit per item. Lists and gets are free.
CompetitorsList, add, remove by query, remove by ID; Get daily Share of Voice seriesFree. Adding a competitor backfills from stored SERPs at no credit cost.
Share LinksGet share link settings; Update share linkThe update needs the shares:write scope.
WebhooksList, create, get, update and delete endpoints; rotate secret; send test event; list deliveriesCreate needs a public HTTPS URL. See the webhook section.

Every POST request carries an Idempotency-Key header set to {{$guid}}, a Postman dynamic variable that fills in a fresh UUID on each send. That means a plain resend creates a new operation, not a replay. To test replay safety on purpose, paste one fixed UUID into the header and send twice. The second response is the original one. The idempotency docs cover the details.

Cursor pagination is the same everywhere: take next_cursor from a response and put it in the cursor query parameter of the next request. The collection leaves cursor empty and disabled by default.

Requests that cost credits, and how to avoid surprises

Credits are held when a check starts, not when you read results. Two requests are named (spends credits) and carry a description saying so: Trigger manual check run and Create one-off rank lookups. Two others change your data and are worth care:

Trigger manual check run (spends credits). The request has no body, and its dry_run query parameter ships switched off (with the value false), so pressing Send means "run every active keyword in the project, now". With a live key that holds one credit per keyword per device. Tick the dry_run parameter on the Params tab and set it to true first. The response is a 200 with would_hold, balance_after, allowed and reason, and nothing starts. Once the numbers look right, switch to false.

To check only some keywords, add a JSON body:

{
  "keyword_ids": ["cmwc0f2ab0007rqk7x9kd3m2p", "cmwc0f2cd0009rqk7y2me4n3q"],
  "fresh": false
}

fresh: true skips today's shared SERP cache and always fetches a new results page. That takes the normal 10 to 20 minutes. Without it, if the same phrase, location, language and device was already fetched today, the check finishes straight away from the cache, and it still costs 1 credit. A real run returns 202 with a run_id, status: queued and credits_held.

Two limits apply to runs: one manual run per project every 10 minutes (429 run_too_soon, with a Retry-After header), and ten run requests per key per hour.

Upsert keywords. The sample body adds a keyword called rank tracker api with desktop and mobile devices, tags and a tracked URL. With a live key, that really adds the keyword to the project you point at, and later scheduled runs will spend credits on it. Edit the body before sending. The response includes an estimate of monthly credits before and after.

Update share link. This publishes or changes a public read-only report link. Check the body before sending against a client project.

Test keys avoid all of this: requests are fully validated, return realistic data with test_ IDs, and nothing is saved.

A first ten minutes, end to end

This sequence works with a test key and shows the shape of the API.

  1. List projects

    Send Discovery, List projects. In the response, note a project id from the projects array.

  2. Replace the path variable

    Set the collection variable project_id to that ID. Open Get project details and send it. You get the domain, location, devices, schedule and keyword count.

  3. Pull the latest rankings

    In Rankings, Get latest rankings across project, send the same way, since it reuses project_id. Each item in rankings has phrase, device, date, rank, rank_absolute and ranking_url. A rank of null means the domain was not in the top 100. The difference between rank and absolute rank is worth knowing before you build anything on these fields.

  4. Dry-run a check

    In Runs, Trigger manual check run (spends credits), enable the dry_run parameter, set it to true, send, and read would_hold. This is the cheapest way to learn what a full project run costs.

  5. Check usage

    Send Account, Get account credit and API usage to see where the balance and call quota stand.

If you are unsure which location_code to use, send Discovery, Search locations with q=Austin and read the codes from the response. A project needs a numeric location_code; for the United States as a whole it is 2840.

Add tests with a post-response script

Postman test scripts are JavaScript. You write them with pm.test and pm.expect, in the Scripts tab under Post-response. A script on the collection runs after every request in it, so one script covers all 39. Paste this at the collection level:

pm.test("No server error", () => {
  pm.expect(pm.response.code).to.be.below(500);
});

if (pm.response.code < 400) {
  pm.test("Response has a request id", () => {
    pm.response.to.have.header("X-Request-Id");
  });
}

const key = pm.variables.get("apiKey") || "";
if (key.startsWith("ts_test_") && pm.response.code < 400) {
  pm.test("Test mode header is set", () => {
    pm.expect(pm.response.headers.get("X-TrackSERPs-Test-Mode")).to.eql("true");
  });
}

if (pm.response.code === 429) {
  console.warn("Rate limited. Retry after", pm.response.headers.get("Retry-After"), "seconds");
}

The test-mode assertion is a useful guard: if you think you are on a test key and the header is missing, you are not.

To chain requests, add this to List projects and it fills the project_id variable that other requests use:

const body = pm.response.json();
if (body.projects && body.projects.length > 0) {
  pm.collectionVariables.set("project_id", body.projects[0].id);
}

Then use Run collection to run the read-only folders in sequence. Skip Runs, Keywords and Webhooks unless you are on a test key.

Adding the endpoints the collection does not have

The collection covers the whole spec, including the endpoints most people ask about. A few notes on those:

One-off lookups need no project: they check where a domain ranks for a phrase, and are deleted after 30 days. Create one-off rank lookups (spends credits) is POST {{baseUrl}}/lookups with an Idempotency-Key header and this body:

{
  "items": [
    {
      "phrase": "emergency plumber",
      "domain": "acmeplumbing.com",
      "location_code": 2840,
      "device": "desktop"
    }
  ],
  "fresh": false
}

It needs the runs:write scope and costs 1 credit per item, held up front. The response is 202 with data, a list of lookup objects. If the same search was already fetched today, the item comes back completed with a result. Otherwise it is queued and takes 10 to 20 minutes. Copy the lookup id into lookup_id and send Get lookup by ID, or better, subscribe a webhook to lookup.completed. The lookups docs list every field.

Create project is POST {{baseUrl}}/projects with name, domain, either folder_name or folder_id (exactly one), location_code, and optional devices, schedule and keywords. It needs projects:write and returns 201. Creating a project does not start a run.

Competitors and share of voice live under /projects/{{project_id}}/competitors and /projects/{{project_id}}/share-of-voice. See the competitors docs.

If the spec gains endpoints, regenerate. From a checkout of the repository, run node generate.cjs inside integrations/postman. The script reads every operation in openapi.yaml, groups them into folders by tag, converts {project_id} style paths to {{project_id}} variables, defines those variables on the collection, marks credit-spending requests, and writes the JSON. Re-import the result. Regeneration also resets the apiKey placeholder and the variable values, so set them again.

One limitation of the generator: it takes request body examples from the spec's example fields. Where a body has no example, it writes {}, and you need to fill it in from the reference.

Testing webhooks from Postman

Postman cannot receive a webhook, because a webhook is a request sent to a server you run. What Postman can do is manage the endpoint and prove the connection:

  1. Send Webhooks, Create webhook endpoint with a public HTTPS url and a list of events. The valid event types are run.completed, run.failed, rankings.updated, credits.low, credits.exhausted, alert.triggered and lookup.completed. Private, loopback and link-local addresses are refused, so localhost will not work. Use a tunnel or a staging host.
  2. Copy the secret from the 201 response. It is shown once.
  3. Send Send test event. The response says whether delivery succeeded, with status_code and duration_ms. Your server receives a ping.
  4. Send List webhook deliveries to read the delivery log, which is kept for 30 days.

Verify the TrackSERPs-Signature header on your server with the HMAC scheme in the webhook docs, or with verifyWebhook from the SDK. The webhook integration page has the wider picture. Webhook endpoints are a plan allowance: none on Starter, then 2, 5 and 20 on Growth, Pro and Agency.

Troubleshooting

SymptomLikely causeFix
401 on every requestPlaceholder key still set, key revoked or expired, or auth overridden on the requestSet apiKey as a current value. Check the Authorization tab says inherit.
{{apiKey}} appears literally in the sent headerThe variable is empty in the active scope, or the wrong environment is selectedOpen the variable viewer. Select the right environment or clear it.
403 on a write requestKey lacks the scope, key is limited to certain projects, IP not on the allowlist, or the plan is read-onlyCheck scopes and IP list on the key, and the plan table.
404 on a project that existsthe project_id variable is empty, or the key is restricted to other projects (the API returns 404, not 403, to avoid revealing IDs)Use a real ID the key can see.
402 insufficient_creditsNot enough credits to hold for the run or lookupRun a dry run to see would_hold, then add credits.
429 run_too_soonA manual run started in the last 10 minutes for that projectWait for the Retry-After value.
429 quota or rate messagePer-minute limit or monthly call quota reachedRead X-RateLimit-Remaining and Retry-After.
Bulk history is slow and drains quotaIt counts as 5 requests per callNarrow start and end, or use the updated_after filter.
Webhook create failsURL is not public HTTPSUse a tunnel or staging host with a valid certificate.

When Postman is the wrong tool

Postman is good for exploration, for reproducing a bug report, and for showing a teammate what a response looks like. It is the wrong tool in four cases:

  • Repeated jobs. Use the Node SDK or the Python guide. The SDK retries on 429 and 5xx, adds idempotency keys, and iterates cursors for you.
  • Slack or spreadsheet pipelines. An n8n workflow handles scheduling and credentials without code.
  • Letting an AI assistant query rankings. Use the MCP server, which exposes tools for rankings, history and lookups.
  • Waiting 15 minutes for a check. A queued check is not a request/response call. Postman will show queued, and you will keep pressing Send. Use a webhook.

For the endpoint reference that the collection is built from, see the REST API overview. API access and limits differ by plan, so check pricing and plan allowances before you plan heavy use.

Frequently asked questions

Where do I download the TrackSERPs Postman collection?
Download it from the TrackSERPs website at /trackserps.postman_collection.json (also linked from the API reference). The same file is in the repository under integrations/postman. The OpenAPI 3.1 spec is at /openapi.yaml and /openapi.json, and Postman can import either.
Does the collection include every API endpoint?
Yes. It has one request for each of the 39 operations in the OpenAPI spec, including lookups, project creation and update, competitors, share of voice and SERP snapshots. If the spec gains endpoints later, regenerate the collection with the generate script in the repository.
Will sending requests in Postman spend credits?
Reads are free. Credits are spent when a check runs: a run request, or a lookup. With a ts_test_ key nothing is saved and no credits are spent. With a live key, the run request's dry_run parameter is switched off, so pressing Send starts a real run. Enable it and set it to true first.
How do I keep my live API key out of a shared workspace?
Keep the live key in a Postman environment as a local value, and leave a ts_test_ key in the collection variable. Postman does not sync local values to its cloud unless you choose to share them. Mark the variable secure.
Can Postman receive TrackSERPs webhooks?
No. A webhook is a request to a public HTTPS URL that you run. You can register that URL and send a test ping from Postman, then inspect the delivery log through the API, but the receiving server must exist elsewhere.
Why do I get 403 on webhook or write requests?
Write requests need a key with the matching scope and a plan with write access. Webhook endpoints are also a plan allowance, and the Starter plan includes none. Check the key's scopes in settings and the plan table in the API docs.
How is the collection kept in step with the API?
It is generated, not hand-edited. The generate script reads packages/api-spec/openapi.yaml and writes the JSON, so a rerun after any spec change refreshes it. Re-import the result into Postman afterwards.

Sources & references

  1. Postman Docs: Import data into Postman(checked 2026-11-11)
  2. Postman Docs: Variables(checked 2026-11-11)
  3. Postman Docs: Environment variables(checked 2026-11-11)
  4. Postman Docs: Authorization types(checked 2026-11-11)
  5. Postman Docs: Test scripts(checked 2026-11-11)