WORKFLOW SNAPSHOT
- Build a small reproducible set of search observations for a defined locale.
- Suggested starting behavior: Per-request rotation
- Validate the real application and destination
A practical Search engines workflow
Build a small reproducible set of search observations for a defined locale.
- Record exact query text, language, and page type.
- Use an approved API where it meets the research need.
- Separate ads, local modules, and ordinary results in the parser.
When can search observations use independent rotating assignments?
Rotate between independent permitted query observations where useful, while keeping any multi-step browser journey coherent. IP location is only one input; search settings, language, device context and visitor state can also change the result.
Which query and locale inputs must match before scaling search checks?
Results can vary by account, time, location signals, and experiments. A country exit alone does not reproduce every search setting.
Store the query context and validate the returned document before extracting positions. Respect rate guidance and access responses.
Verify the Search engines connection boundary
Record the exact query, engine, language, requested region, device context and observation time. Distinguish the intended results page from a consent, verification or rate-limit response.
Save one controlled search-result observation
Fetch one independent query document for page-type classification before extracting ordinary results, ads or local modules.
- 01Generate your endpoint
Choose HTTP / HTTPS and Every request for independent observations in Configure proxies.
- 02Set your proxy URL
Set
PS_PROXY_URLtohttp://USERNAME:PASSWORD@HOST:PORTusing your generated endpoint. For IP authentication, whitelist your machine and usehttp://HOST:PORT. Percent-encode special characters in credentials; these are proxy credentials, separate from your account password or API key. - 03Choose the destination
Set
Example URL · replace placeholders with your targetPS_TARGET_URLbefore running the code. Use a permitted public search-results URL containing the exact encoded query and documented language or regional settings for your observation; keep those inputs fixed across exits.https://example.com/search?q=proxy+testing&lang=enSet PS_EXPECT_TEXT to a query-specific text substring that a known result document contains; a match alone is not a ranking assertion. This optional check inspects the returned text without running JavaScript.
Python 3.10+ · python -m pip install requests · python ps_search_engines.py# Fetch one independent query document for page-type classification before extracting ordinary results, ads or local modules.
# Set PS_TARGET_URL to a permitted public search-results URL containing the exact encoded query and documented language or regional settings for your observation; keep those inputs fixed across exits.
import hashlib
import json
import os
import time
from pathlib import Path
from urllib.parse import urlsplit
import requests
class InspectSession(requests.Session):
# Leave redirect bodies streamed instead of preparing the next request.
def resolve_redirects(self, *args, **kwargs):
return iter(())
proxy = os.environ["PS_PROXY_URL"] # HTTP endpoint from ProxySight
target = os.environ["PS_TARGET_URL"] # https://example.com/search?q=proxy+testing&lang=en
if urlsplit(proxy).scheme != "http":
raise ValueError("Use your generated HTTP proxy endpoint for this example.")
if urlsplit(target).scheme not in ("http", "https"):
raise ValueError("PS_TARGET_URL must be an HTTP or HTTPS URL.")
with InspectSession() as client:
client.trust_env = False # No ambient proxy, NO_PROXY or netrc overrides
started = time.monotonic()
with client.get(
target,
proxies={"http": proxy, "https": proxy},
headers={"Accept-Language": "en-US,en;q=0.9"},
timeout=(10, 20), allow_redirects=False, stream=True,
) as response:
body = bytearray()
for chunk in response.iter_content(16384):
body.extend(chunk)
if len(body) > 1048576:
raise RuntimeError("Response exceeds this example's 1 MiB limit.")
Path("search-query-observation.html").write_bytes(body)
print(json.dumps({
"workflow": "search-engines", "status": response.status_code,
"elapsed_ms": round((time.monotonic() - started) * 1000),
"bytes": len(body), "sha256": hashlib.sha256(body).hexdigest(),
"headers": {name: response.headers.get(name) for name in ['Content-Type', 'Content-Language', 'Location']},
}, indent=2))
expected = os.getenv("PS_EXPECT_TEXT", "")
if expected:
text = body.decode(response.encoding or "utf-8", errors="replace")
print("Expected text:", "found" if expected in text else "absent")
# A 200 status alone does not prove the intended page was returned.
# Inspect redirects, login prompts, 403 and 429 before another request.
Inspect the saved body for the query and intended result-page structure rather than counting a consent or challenge page as zero results; status, byte count and hash help compare snapshots, but this GET does not render result modules or make rank comparable across different visitor contexts.
Response bodies are limited to 1 MiB for a small diagnostic. TLS verification stays enabled; redirects are left for you to inspect. Connection guide
Example: build a small controlled result-page sample
Choose exact queries and a defined observation window. Record language, regional context, account state, and the type of page returned. Store ads, local modules, and ordinary result entries as separate classes when the research needs to distinguish them.
A rank is meaningful only within its query and page context. Do not merge observations from different sort orders, result types, or visitor states into one unexplained position field.
{
"query": "YOUR_QUERY",
"language": "RECORD_LANGUAGE",
"region_context": "RECORD_CONTEXT",
"page_type": "RECORD_TYPE",
"observed_at": "RECORD_TIMESTAMP"
}Search engines verification checklist
For this Search engines workflow, record query, result page and entry classification alongside the actual result. Use the evidence below to decide whether another observation is comparable before increasing the workload.
| Checkpoint | Hold constant or record | Expected evidence |
|---|---|---|
| Query | Exact text and language | A reproducible research input |
| Result page | Expected page type and regional context | Challenge and result pages distinguished |
| Entry classification | Ad, local module, or ordinary result | Positions compared within the correct class |
Troubleshoot Search engines results and connection errors
| Symptom | Check next | What the result tells you |
|---|---|---|
| No results parsed | Confirm document type | An access screen is not an empty result set |
| Positions change | Compare time and visitor context | Not every change is caused by the route |
| Local module differs | Record regional signals | Country alone may not explain local context |
Keep search-result observations tied to a defined query matrix
Start with a small fixed query matrix and capture the raw visible result before normalizing it. Compare like-for-like contexts and record unavailable observations explicitly. Do not interpret a missing or changed rank without checking the page and query conditions that produced it.
A LITTLE CLARITY
Common questions.
Does an exit country fully determine search results?
No. Several application and personalization signals can affect a result page.
How should different search modules be stored?
Keep their types explicit so an ad, local result, and ordinary result are not treated as equivalent positions.
Which query and locale inputs must match before scaling search checks?
Record the exact query, engine, language, requested region, device context and observation time. Distinguish the intended results page from a consent, verification or rate-limit response.