All articles4 min read
Proxy selection

Proxy country targeting: verify the exit and page context

Test location requirements before committing to a regional collection plan.

An analyst checks a paper world map beside a laptop.

Proxy country targeting needs two checks: whether the route produced the intended exit and whether the collected page represents the intended market. An IP-location result answers part of that question. A currency symbol or translated heading answers another part. Keep the evidence separate before using a localized observation.

Write down the market requirement

Name the country the job is intended to observe, the language it requests and any relevant account or page settings. Decide whether country-level routing is sufficient. A requirement for a particular city needs its own verified service contract and test; a country setting cannot establish that precision.

Record the source of each setting. A location entered into a search form, a remembered preference and an exit inferred from a network address are different inputs. Your dataset should make those inputs understandable to someone who did not run the collector.

Use the assigned connection settings

Configure the route from the current account documentation. Keep the gateway, port, authentication and country option together in private runtime configuration. Do not copy another service's username suffix or invent a selector because it looks familiar.

Check whether the chosen client reads proxy settings from its environment or uses an explicit argument. A successful response from an unrelated direct connection can look convincing if the intended proxy configuration was never used. Establish the route before interpreting the page.

Keep expected and observed country fields

Save the expected country with the job. Record the reported exit country and the location-data source separately. Keep the observation time, since network allocation and location databases can change.

If a location source supplies no usable country, retain an unknown outcome. Replacing it with the requested country makes the test pass without evidence. If sources disagree, preserve the disagreement for review instead of selecting whichever answer matches the plan.

This Python helper compares two-letter fields under an illustrative source contract. It normalizes case but is not a full country-code registry validator or a geolocation service.

def compare_country(expected, reported):
    def normalized(value):
        if not isinstance(value, str):
            return None
        value = value.strip().upper()
        return value if len(value) == 2 and value.isascii() and value.isalpha() else None
    wanted = normalized(expected)
    if wanted is None:
        raise ValueError("invalid expected country")
    actual = normalized(reported)
    return "unknown" if actual is None else "match" if actual == wanted else "mismatch"

Use a known valid expected code from the account's supported values. For example, “gb” and “GB” match under this normalization, while a missing report stays unknown. Those are fixture inputs, not evidence that a particular network route is available.

Validate the page context too

An exit-country match does not prove that the target selected the intended market. Inspect the page's relevant location, language, currency and offer context. Cookies, explicit parameters or saved preferences can affect what the application returns.

Use a representative permitted page and document the expected evidence. Avoid inferring country solely from one symbol: several markets can use the same currency or language. Keep a mismatch visible even when the response otherwise contains useful data.

Compare observations under controlled conditions

Keep query or product identity stable when comparing markets. Record which settings you change between runs. If you also change client state or the requested variant, you lose a clean explanation for the observed difference.

Include a valid report, a mismatched report and a missing report in your tests. Check that the exported dataset preserves all three. Review a small sample of accepted page observations by hand before making a wider collection decision.

Buy against the requirement you tested

Ask what targeting the selected plan documents and what your pilot actually established. One matching exit does not measure a whole pool or guarantee future accuracy. Record the test's scope alongside its outcome.

Review the current residential proxy configuration and use the proxy exit checker as one part of the evidence. Set up a limited account test before treating regional observations as production data.

Contact us

Tell us what you want to collect.

See our Privacy Notice for how we handle your message.

Your message is sent to hello@crawlhub.ai. Please do not include passwords or API keys.