Skip to content

USE CASE / DATA & RESEARCH

Market research proxy workflows

Build comparable public-market observations by controlling geography, timing, product identity, and browser state alongside the proxy route.

In this guide

WORKFLOW SNAPSHOT

  • Compare a defined set of public competitor or catalog pages within a consistent research window.
  • Suggested starting behavior: Per-request rotation
  • Validate the real application and destination

A practical Market research workflow

Compare a defined set of public competitor or catalog pages within a consistent research window.

  • Choose the fields and sampling cadence before fetching.
  • Record locale, currency, and page context.
  • Validate a manual sample and keep a source link for each observation.

When should market observations use independent rotating routes?

Use separate assignments for independent permitted source observations where useful. Preserve a coherent session for related pages and record route changes explicitly. Independent IPs do not make the sources statistically independent or representative of the market.

Which source and sampling conditions must match before research expands?

A reachable page does not make every extraction or reuse permissible. Samples can also be biased by time, personalization, or missing inventory.

Check coverage and field completeness, then disclose the observation method when sharing findings.

Verify the Market research connection boundary

Define the source set, regional context, fields, inclusion rule and collection window. Keep an unavailable page as a recorded outcome so successful responses do not silently become the entire sample.

Save one traceable public-market observation

Fetches one research-source document and saves a fingerprint that ties its returned public content to the sample URL and observation time.

  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 competitor, category or catalog URL from your defined research sample, with geography, visitor language and sample window recorded.

    Example URL · replace placeholders with your targethttps://example.com/catalog/research-category

    Set PS_EXPECT_TEXT to the category identifier or stable heading defining this research sample. This optional check inspects the returned text without running JavaScript.

ps_market_research.pyFetches one research-source document and saves a fingerprint that ties its returned public content to the sample URL and observation time.
Before you runPython 3.10+ · python -m pip install requests · python ps_market_research.py
# Fetches one research-source document and saves a fingerprint that ties its returned public content to the sample URL and observation time.
# Use a permitted public competitor, category or catalog URL from your defined research sample, with geography, visitor language and sample window recorded.
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/catalog/research-category
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("market-research-source.html").write_bytes(body)
        print(json.dumps({
            "workflow": "market-research", "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

Confirm the expected category or source identity and check cache metadata before extracting comparable fields. A returned page is one time-qualified sample; it does not establish a representative market, reproduce browser personalization or make different product and regional contexts comparable.

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: preserve a comparable public-source sample

Define the research question, source set, required fields, and collection window. Keep each observation tied to its source and visitor context so a regional difference is not confused with a timing or product mismatch.

Check a manual sample before expanding the collection. Record missing coverage rather than treating an unavailable source as evidence that no product or offer exists.

Illustrative observation record · replace with your test data
{
  "question": "YOUR_RESEARCH_QUESTION",
  "source": "PUBLIC_SOURCE",
  "visitor_context": "RECORD_CONTEXT",
  "collected_at": "RECORD_TIMESTAMP",
  "validation": "RECORD_RESULT"
}

Market research verification checklist

For this Market research workflow, record question, source and quality alongside the actual result. Use the evidence below to decide whether another observation is comparable before increasing the workload.

CheckpointHold constant or recordExpected evidence
QuestionDefined fields and sampling windowA focused research task
SourceURL and visitor contextTraceable observation
QualityCoverage and required fieldsA reviewed usable sample

Troubleshoot Market research results and connection errors

SymptomCheck nextWhat the result tells you
Findings conflictCompare timing and item identityThe records may not be equivalent
One region lacks dataInspect access and coverageMissing sample is not absence of market activity
Unexpected duplicatesCheck record identitySample count may be inflated

Keep market-research findings tied to a consistent sample window

Collect a small pilot sample and compare normalized fields with the original pages. Review missing values, duplicates and sampling bias before expanding. Preserve raw units and source timestamps so later analysis does not mix incompatible observations.

A LITTLE CLARITY

Common questions.

Does country targeting make market research representative?

No. Representativeness depends on the sample design and the signals influencing each observation.

How should incomplete source coverage be reported?

Explicitly, with the source and collection context, rather than silently interpreting missing observations as negative facts.

Which source and sampling conditions must match before research expands?

Define the source set, regional context, fields, inclusion rule and collection window. Keep an unavailable page as a recorded outcome so successful responses do not silently become the entire sample.

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 ↗