Skip to content

USE CASE / DATA & RESEARCH

Search engines proxy workflows

Observe permitted public search-result presentation with explicit query, language, region, and timing controls. Compare observations without treating ranking variation as a proxy defect.

In this guide

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.

  1. 01
    Generate your endpoint

    Choose HTTP / HTTPS and Every request for independent observations in Configure proxies.

  2. 02
    Set your proxy URL

    Set PS_PROXY_URL to http://USERNAME:PASSWORD@HOST:PORT using your generated endpoint. For IP authentication, whitelist your machine and use http://HOST:PORT. Percent-encode special characters in credentials; these are proxy credentials, separate from your account password or API key.

  3. 03
    Choose the destination

    Set PS_TARGET_URL before 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.

    Example URL · replace placeholders with your targethttps://example.com/search?q=proxy+testing&lang=en

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

ps_search_engines.pyFetch one independent query document for page-type classification before extracting ordinary results, ads or local modules.
Before you runPython 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.
Understand the result

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.

Illustrative observation record · replace with your test data
{
  "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.

CheckpointHold constant or recordExpected evidence
QueryExact text and languageA reproducible research input
Result pageExpected page type and regional contextChallenge and result pages distinguished
Entry classificationAd, local module, or ordinary resultPositions compared within the correct class

Troubleshoot Search engines results and connection errors

SymptomCheck nextWhat the result tells you
No results parsedConfirm document typeAn access screen is not an empty result set
Positions changeCompare time and visitor contextNot every change is caused by the route
Local module differsRecord regional signalsCountry 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.

PUT THE KNOWLEDGE TO WORK

Your workflow.
Your next connection.

Try the controls, choose your IP behavior, and start with one clear connection check.

Explore the configurator ↗