Use cases · SEO rank tracking
SEO and SERP rank tracking
Track where your pages rank on Google in any country, as JSON, with the Search API. Then use residential proxies to check how your own site looks from that country. $2.50 per 1,000 searches.
Rankings as JSON
Each search returns up to 10 results with position, title, url and snippet, plus blocks such as the AI overview when Google shows them.
Any market
Set country, language, location and device per search, such as German results in Berlin on mobile.
Your own pages
Residential proxies show you what a visitor in another country gets from your site: redirects, language and prices.
Track a keyword’s rank
The Search API returns Google results as JSON. Create an API key on the dashboard’s Search API page. This Python function searches one keyword in one market and returns the first rank of your domain. It reads up to three results pages, and each page is one billed search:
import os
from urllib.parse import urlparse
import requests
API = "https://api.packetstream.io/v1/search"
HEADERS = {"Authorization": f"Bearer {os.environ['PACKETSTREAM_API_KEY']}"}
def rank(keyword, domain, country="us", language="en", device="desktop", pages=3):
seen = 0
for page in range(1, pages + 1):
response = requests.post(
API,
headers=HEADERS,
json={
"query": keyword,
"country": country,
"language": language,
"device": device,
"page": page,
},
timeout=35,
)
response.raise_for_status()
results = response.json()["results"]
for result in results:
host = urlparse(result["url"]).hostname or ""
if host == domain or host.endswith("." + domain):
# position counts from 1 on each results page.
return seen + result["position"], result["url"]
if not results:
break
seen += len(results)
return None, None
print(rank("residential proxies", "example.com", country="de", language="de"))
To rank by city, send location with a Google location name, such as "location": "Austin,Texas,United States". For many keywords at once, POST /v1/search/batch runs up to 10 searches in one request. See the parameters.
Track AI overviews too
When Google shows an AI overview, the response has an ai_overview block with up to 20 references. This continues the example above (it reuses API, HEADERS and urlparse) and checks whether your domain is cited:
response = requests.post(
API, headers=HEADERS, json={"query": "residential proxies", "country": "us"}, timeout=35
)
response.raise_for_status() # A failed search is not "no citations".
data = response.json()
def is_ours(url, domain="example.com"):
host = urlparse(url).hostname or ""
return host == domain or host.endswith("." + domain)
cited = [
ref["url"]
for ref in data.get("ai_overview", {}).get("references", [])
if is_ours(ref["url"])
]
To track Google AI Mode answers, send "type": "ai_mode". The answer comes back in an ai_mode block with its references. See responses.
Check your own pages from another country
Rankings tell you what Google shows. A residential exit in the same country shows what a visitor then gets from your site. This cURL request asks for your home page from Germany and prints the status and any redirect:
curl --silent --show-error --output /dev/null \
--write-out '%{http_code} %{redirect_url}\n' \
--proxy 'https://proxy.packetstream.io:31111' \
--proxy-user "${PACKETSTREAM_USER}:${PACKETSTREAM_AUTH_KEY}_country-DE" \
'https://www.example.com/'
Use it to check language redirects, local prices and blocked regions on sites you run.
Honest limits
- Google only. The Search API searches Google. It does not cover other search engines.
- Positions count per page.
positionstarts at 1 on each results page, so add the results from earlier pages, as the example does. - Results vary. Google results change by time, place and person. A tracked rank is one sample, not what every searcher sees.
- Blocks are optional. An AI overview or other block appears only when Google showed it and it could be read. Mobile searches carry fewer blocks.
- Rate limit. Each key can send 20 searches per second, with bursts of up to 200. Spread large keyword lists over time.
- Country only for proxies. Proxy exits can be targeted by country, not by city.
Pricing
Pay for what you use.
$2.50 per 1,000
$0.0025 per successful search, for every type and option. Errors are free.
200 keywords daily ≈ $15/month
One results page per keyword per day is about 6,000 searches a month.
$1.00 per GB
For checking your own pages. Same prepaid balance, $50 minimum, no subscription.
Web scraping
Rotate the exit on every new connection, keep one exit for multi-step jobs, and estimate the cost before you scale.
Read morePrice monitoring
Check public prices from the country you care about, and pull Google Shopping offers as JSON from the same balance.
Read moreAd verification
Follow your tracking links and landing pages from each country, and check your Google text ads as JSON.
Read more