SERP tracking: collect Google results from any country or city
Rankings depend on where the search comes from. Collect results from the countries and cities your customers use.
By DINPROXY Team · · 8 min read
On this page
A ranking is only true for the place the search came from. To scrape Google search results that match what your customers see, each query has to arrive from their country, and for local businesses from their city. DINPROXY gives you two ways to do that: the Web Unlocker, which takes a search URL and returns the rendered page, and Rotating Residential Proxies for crawlers you run yourself, with state and city targeting in the user name.
Why one keyword has many rankings
Google builds each results page for the person asking. The same query can return a different order, different features and different advertisers depending on a handful of signals:
- Country. A search for "car insurance" from Ireland and from Canada brings up different insurers and comparison sites.
- City and district. Queries with local intent, such as "dentist" or "plumber near me", show a map pack built around the searcher's location, so two parts of one city can see different businesses.
- Language. The interface language changes snippets, related searches and sometimes which version of a multilingual site ranks.
- Device. Mobile and desktop pages differ in layout, in how many results appear before the first scroll and in which features are shown.
- Search history. Signed-in users see results shaped by what they searched before. A rank tracker searches signed out, so every check starts from the same neutral point.
In practice, a rank is always a rank for a place, a language and a device. Fix those three values for every keyword before you collect anything, and store them alongside each result so that next month's numbers compare like with like.
What to extract from a results page
A results page holds far more than ten blue links. Decide which parts your reports need, because each one needs its own parsing rule and its own column in your database.
| Element | What to store | Why it matters |
|---|---|---|
| Organic results | Position, URL, domain, title, snippet | Your own ranking and your competitors' |
| Local pack | Business names, their order, the rating shown | Visibility for searches with local intent |
| Ads | Advertiser domain, top or bottom placement, headline | Who is paying to appear for your keywords |
| Featured snippet | Source URL and the quoted text | The answer shown above the first organic link |
| Other features | People also ask, video, image and news blocks | How much of the page organic links actually get |
Count positions in a way you can defend later. Many teams number organic results only, starting from 1, and record each feature separately with its place on the page. Whatever you choose, write the rule down and keep it. Save the raw HTML of every check as well: when Google changes its markup, you can re-parse months of history instead of losing it.
Which product fits each kind of check
Both products sign in with the same proxy user, so one tracker can use both.
| Task | Product | Location and session | Why |
|---|---|---|---|
| National rankings in several countries | Web Unlocker | country parameter on each request | Rendering, retries and anti-bot checks happen inside the request |
| Results page screenshots for client reports | Web Unlocker | country with response_format set to html,png | HTML and screenshot come back as one result |
| City-level local rankings | Rotating Residential Proxies | @country=, @state= and @city= in the user name | Places the search inside a specific city |
| Large keyword sets on your own crawler | Rotating Residential Proxies | Rotating, a new IP for each request | Billed per GB, and your code controls every step |
| Reading pages two and three of one query | Rotating Residential Proxies | @session= with @time= | One IP for the whole query, like a single searcher |
If you have no crawler yet, start with the Web Unlocker: you send a URL and get the finished page. Move part of the work to residential proxies when you need city-level results, or when you already run a crawler and prefer per-GB billing. Our comparison of the Web Unlocker and residential proxies goes through the trade-offs in more detail.
Set up a rank check, step by step
- Create an account, add Credits and buy Web Unlocker results or residential GB on the product page. Purchased residential traffic never expires.
- Create a proxy user under Tools → Users. Its full connection name looks like
1024~myuser. - Build the search URL. Use
qfor the query,hlfor the interface language andglfor the country, for examplehttps://www.google.com/search?q=running+shoes&hl=en&gl=gb. - Send that URL to the Web Unlocker with the matching
country, heregb. Leavejs_renderon, as it is by default, so the page arrives complete. If pages come back before the results have loaded, addwait_selectorwith the CSS selector of the results area. - For a city, fetch the same URL from your own crawler through
proxy.dinproxy.com:8800with a user name such as1024~myuser@country=gb@state=england@city=london. The Select location list in the dashboard writes these values for you, and the location and sessions guide lists every option. - Parse the page, store the rows with their market settings, and keep the HTML.
Keep the URL and the request location in agreement: gl=de goes with country set to de, and hl=fr with a French-speaking market. The page you collect then matches what a local searcher gets.
Code: fetch one results page
Each example sends one search to the Web Unlocker. The Node.js and Python versions save the HTML to a file; the cURL version saves the JSON reply, with the page in data.html. Replace 1024~myuser and YOUR_PASSWORD with your proxy user. The Idempotency-Key is built from the date, country and keyword, so a retry after a timeout returns the stored page instead of charging a second result.
// Node.js 18+. Save as serp.mjs and run: node serp.mjsimport { writeFile } from "node:fs/promises";
const keyword = "running shoes";const country = "gb";const search = new URL("https://www.google.com/search");search.search = new URLSearchParams({ q: keyword, hl: "en", gl: country }).toString();
const day = new Date().toISOString().slice(0, 10);const key = `serp-${day}-${country}-${keyword.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`.slice(0, 120);
const response = await fetch("https://app.dinproxy.com/api/unblocker/request", { method: "POST", headers: { Authorization: "Basic " + Buffer.from("1024~myuser:YOUR_PASSWORD").toString("base64"), "Content-Type": "application/json", "Idempotency-Key": key, }, body: JSON.stringify({ target_url: search.toString(), country, response_format: "html" }), signal: AbortSignal.timeout(130_000),});
const result = await response.json();if (!result.success) throw new Error(result.code || "request failed");await writeFile(`${key}.html`, result.data.html);To turn a saved page into positions, parse the organic links. This Python sketch with Beautiful Soup numbers result titles in page order and reports where your domain appears. Search pages change their markup from time to time, so test the selector against a fresh saved page whenever your counts look wrong.
# pip install beautifulsoup4from urllib.parse import urlparse
from bs4 import BeautifulSoup
def organic_results(html): soup = BeautifulSoup(html, "html.parser") rows = [] for title in soup.select("#search a h3"): link = title.find_parent("a") url = link.get("href", "") if link else "" if url.startswith("http"): rows.append({ "position": len(rows) + 1, "url": url, "domain": urlparse(url).netloc, "title": title.get_text(" ", strip=True), }) return rows
with open("serp-2026-11-20-gb-running-shoes.html", encoding="utf-8") as f: rows = organic_results(f.read())position = next((r["position"] for r in rows if r["domain"].endswith("example.com")), None)print(position or "not on this page")Keyword sets, cadence and ranking history
Organise keywords before you schedule anything. Tag each one with its intent (brand, product, informational or local), its market (country and language, plus a city for local terms) and a priority. The tags decide how often a keyword is checked and from where.
- Daily for keywords that earn money and pages you are actively changing. A weekly snapshot can hide the day a drop started.
- Weekly for the long tail, where movements are slower and the list is longer.
- Same hour every day, so two snapshots differ because the results changed rather than because you looked at a different time.
- Extra checks after a release, a site migration or a known search update.
Spread each daily batch over an hour or two rather than firing it at once. An account can run up to 100 Web Unlocker requests at the same time, and residential proxies allow 100 open connections per account. For a fixed list, the command-line tool takes a file of search URLs, one per line, and a --country option, so keep one file per market. It saves each page as a file and writes results.jsonl with every URL and its file or error.
Store history as one row per keyword, market, date and result, with columns such as checked_at, keyword, country, city, language, device, position, url and result_type. Record "not found in the pages checked" as a value, not a missing row, so a drop out of the top results shows up in charts. From those rows you can report daily positions, the share of keywords in the top three and top ten, and visibility weighted by the search volumes from your keyword research tool.
Rank tracking for agencies
Agencies track many sites for many clients, and reports have to hold up when a client asks questions.
- Create a proxy user per client or client group (up to 10 per account) to see usage separately in the dashboard.
- Request
html,pngfor the keywords a client cares most about. The screenshot is evidence of what the page looked like on the day, and it costs no more than HTML alone. - For clients with branches, track each branch's local terms from its own city through residential proxies.
- Agree the market definition, meaning country, language, city and device, with each client in writing, so everyone reads the same numbers.
What daily rank tracking costs
Two worked examples, with their assumptions stated. Buy a small amount first and run a test week before you commit to a full keyword set.
Web Unlocker, national rankings. Assume 500 keywords tracked in 3 countries, first results page only, checked every day. That is 1,500 results a day, or about 45,000 in a 30-day month. At $1 / 1k results the month costs $45.00. Failed requests are free, so pages that never arrive add nothing. Each extra page you read for a keyword is another result; a screenshot alongside the HTML is not.
Residential proxies, local rankings. Assume 100 local keywords checked daily in 5 cities, which is 500 results pages a day. Here the cost follows data volume, so measure what your crawler actually moves per page in the test run. If it averages 400 KB per page, retries included, that is 200 MB a day and 6 GB over 30 days, which costs $6.00 at $1 / GB. A crawler that loads every image and script moves more data per check than one that fetches only the HTML, so measure with the setup you will really use.
During the test week, open the saved screenshots for a few keywords and confirm the parser counted what you expected. Fixing a counting rule early is much cheaper than rebuilding a year of history.
Keep collection within the rules
Search results pages are public, and a rank tracker needs only the public, signed-out view. Keep it that way:
- Search signed out and send no account cookies.
- Collect only the keywords you report on, and pace requests evenly. Our guide on scraping without getting blocked covers sensible pacing.
- Follow the search engine's terms and the laws of the countries you and your clients work in.
- Snippets can mention people by name. Keep only the fields your reports use, and handle any personal data lawfully, as GDPR requires.
If you also track what competitors charge, the price monitoring use case uses the same products, and ad verification looks closely at the ads that sit above organic results.
Frequently asked questions
SERP tracking means collecting search results pages for a fixed set of keywords on a schedule and recording where each site ranks. Because results change with country, city, language and device, every check is made from a defined market and stored with those settings.
For national rankings, the Web Unlocker is the simplest choice: send a search URL with a country code and get the rendered page back, at $1 / 1k results with failed requests free. For city-level local rankings from your own crawler, use Rotating Residential Proxies with country, state and city in the user name, at $1 / GB.
Build the search URL with the q, hl and gl parameters, send it to the Web Unlocker API with the requests library and a matching country code, and save the HTML it returns. Then parse the organic results with a library such as Beautiful Soup and store each position with its keyword, market and date.
With the Web Unlocker, 500 keywords in 3 countries checked daily is 1,500 results a day, or about 45,000 in a 30-day month, which costs $45.00 at $1 / 1k results. Only successful requests use results, and each extra results page per keyword counts as another result.
It depends on your jurisdiction, the search engine's terms and how you use the data, so read the terms that apply and take legal advice for your situation; this answer is not legal advice. Rank trackers usually collect only public, signed-out results pages, and any personal data in snippets needs a legal basis and should be kept to what you need.