Skip to main content
Developer Guides

Published Dec 4, 2026

How to Choose a Proxy Setup for AI Agents Browsing the Public Web

Choose residential or mobile proxies, sessions, protocols, controls, and tests for reliable AI-agent access to authorized public-web data.

How to Choose a Proxy Setup for AI Agents Browsing the Public Web

The right proxy setup for an AI agent depends on the web task, not on the model name. Start with the request that actually opens the website: identify its required location, whether it needs a browser, whether several pages must share one identity, and how you will validate the result. Then choose a residential or mobile route, a rotating or sticky session, and a protocol supported by that HTTP client or browser.

For most global public-web research, monitoring, and data-collection agents, a residential proxy is the practical starting point. Use a mobile proxy when the workflow specifically needs a real US mobile-network context, carrier or city targeting, mobile SERPs, mobile ad verification, or a higher-trust mobile route. Do not add either one when a first-party API, licensed dataset, direct connection, or ordinary HTTP request already returns the required result reliably.

A production setup should also separate the model from the network tool, keep credentials out of prompts, preserve one sticky identity through a stateful task, rotate only at safe boundaries, and measure locally valid results rather than counting HTTP 200 responses.

Need proxy infrastructure for this workflow? Compare residential and mobile proxy options.

Quick Decision Table

RequirementRecommended starting pointWhy
Global public-web research across countriesResidential Per GBBroad country, state, city, and ISP targeting with pool-based access
Localized price, availability, SEO, or market monitoringResidential Per GB with explicit locationThe route can represent the market being measured
US mobile SERPs, ads, app-web experiences, or carrier-specific checksMobile Per GBReal US mobile routes with state, city, and mobile ISP targeting
A known, controlled set of US mobile exitsMobile Per ProxyDedicated SIM-based exits and direct rotation controls
Independent one-page observationsRotating or fresh session per work unitEach observation can start with a new route identity
Multi-page research, login continuity, cart state, or a browser taskSticky session per work unitIP, cookies, and target-side state stay aligned during the task
Static HTML or JSONHTTP client firstLower cost, latency, and bandwidth than a full browser
JavaScript rendering or browser interactionPlaywright, Browser Use, or another browser toolThe browser can execute the page and preserve browser state
Model-provider requestsUsually a separate direct or gateway connectionA website proxy does not automatically proxy model API traffic

This is a starting matrix, not a guarantee that one route will work for every destination. Test the real task against representative, authorized pages before scaling it.

1. Define the Agent's Web Task Before Choosing a Proxy

“Our agent browses the web” is not a testable requirement. Turn it into a work-unit definition that an engineer can execute and validate.

Record these fields first:

FieldExample decision
Approved destinationsA documented allowlist of public product and help pages
Required geographyUnited States at country level; no city requirement
Network contextResidential unless a mobile-only experience is being measured
Page typeJavaScript-rendered product page
State boundaryOne product observation across a location check and product page
Output contractProduct, numeric price, currency, source URL, observed country, evidence
Success ruleRequired fields pass local schema and geography validation
Failure ruleTimeout, target rejection, wrong geography, ambiguous extraction, or invalid schema
Resource limitsMaximum steps, duration, browser cost, proxy data, and retries
Compliance ownerPerson or team that approved the destination and collection purpose

The work-unit boundary controls the session policy. A one-page fact lookup can use a fresh session. A research task that visits five related pages should normally keep one session through all five so the result represents one coherent visitor context. A scheduled price check should finish, validate, and save one observation before its route is released.

Do not let the model invent this boundary at runtime. The application should supply approved destinations, a maximum scope, and a deterministic completion rule.

2. Decide Whether the Agent Needs a Proxy at All

A proxy is useful when the network route is part of the requirement. Examples include location-specific pages, mobile-network views, independent worker identities, source-IP allowlisting, or destinations that apply rate limits by IP. It is not a default requirement for every agent.

Use the simplest lawful data path that produces the required evidence:

  1. Use a first-party API when it exposes the needed data and terms permit the use.
  2. Use a licensed dataset when provenance, reuse rights, or historical coverage matter more than live browsing.
  3. Use a direct HTTP request when the public page responds correctly without a special network route.
  4. Add a residential or mobile proxy when geography, IP type, route diversity, or session identity is a measured requirement.
  5. Add a browser only when the required evidence depends on JavaScript, cookies, rendered UI, or browser interaction.

This sequence matters for cost. A browser agent may load scripts, fonts, images, analytics, and other subresources that a focused HTTP client never requests. Those bytes affect proxy usage, runtime, and the number of simultaneous workers the system can support.

For the broader distinction between website proxies, LLM gateways, and agent tools, read What Is an AI Proxy?. For raw proxies versus managed extraction services, see Raw Proxies vs Scraping APIs.

3. Choose Residential or Mobile Based on the Required Identity

Residential and mobile proxies are not interchangeable labels for “better access.” They represent different network contexts and buying models.

Choose Residential Proxies for Global, Pool-Based Data Collection

Proxidize Residential Proxies are the default fit when an agent needs broad IP diversity or location coverage across multiple markets. The current product supports 195+ countries, country/state/city/ISP targeting, HTTP/HTTPS/SOCKS5, and rotating or sticky sessions.

Residential is usually the first test for:

  • Public-web research across countries.
  • Local price and availability monitoring.
  • SEO and SERP observations by market.
  • RAG or dataset refresh jobs that need geographic diversity.
  • Market research and brand-protection checks.
  • Parallel stateless jobs that draw from a broad pool.

Paid Residential Per GB data currently does not expire, according to the current limits and specifications. Recheck the current pricing and product terms before publication or procurement because commercial details can change.

Choose Mobile Proxies for a Real US Mobile-Network Context

Proxidize Mobile Proxies use real US 4G/5G carrier routes. They make sense when mobile identity is itself part of the test, rather than as a reflexive upgrade for every difficult page.

Start with mobile for:

  • US mobile SERP monitoring.
  • Mobile ad verification by city or carrier.
  • Testing mobile-first website behavior.
  • Approved account workflows that need a stable mobile route.
  • Protected US targets where representative testing shows a mobile route materially improves valid-result rate.

Mobile Per GB is pool-based and suits variable workloads. Mobile Per Proxy provides dedicated SIM-based exits for workflows that need a known set of routes and direct rotation controls. Current Mobile Per GB packages expire one month after purchase and do not roll over, so include unused data in cost planning. Verify the current terms on the limits page before making a purchase decision.

Do Not Decide by “Trust” Alone

The route that looks most trusted in theory may not produce the lowest cost per valid result for a specific task. A mobile browser can consume more expensive bandwidth without improving a simple public-page extraction. A residential pool may be a better operational fit for a global job even if mobile succeeds on one US page.

Compare the two on the same approved task, geography, browser version, model, output schema, retry policy, and time window. Change one route variable at a time.

4. Match Rotation to the Agent's State Boundary

Rotation should follow the work unit, not a fixed slogan such as “rotate every request.”

Use a Fresh Route for Independent Work

A rotating or random route is appropriate when each request is independent and no target-side state needs to survive. Examples include unrelated public-page checks, separate keywords, or isolated evaluation cases.

On Proxidize Per GB products, Randomize IP draws a new IP for each request. There is no rotate button or rotation URL for a pool-based access point. The route behavior comes from the access-point setting and username.

Be careful with browser agents: one navigation can create many network requests. Per-request rotation can cause a single rendered page to combine resources fetched through different exits. If the destination expects one client identity throughout a page load, a short sticky session is safer even when the next job should use a fresh identity.

Use Sticky Sessions for Coherent Multi-Step Tasks

A sticky session keeps one route identity for a related sequence of requests. Bind one session to one work unit, browser context, or worker lease.

Good sticky-session boundaries include:

  • Location check plus one product observation.
  • Several pages used to answer one research question.
  • One localized checkout or availability flow that the organization is authorized to test.
  • One browser profile running one approved account workflow.

Current Proxidize documentation says Residential Per GB sessions typically hold for about 1–3 hours and Mobile Per GB sessions for about 1–4 hours, depending on the ISP. These are typical durations, not guarantees. The upstream ISP can change an IP earlier, so validate continuity when it matters and design the job to recover at a checkpoint.

The Per GB connection guide documents the session key: a sticky username contains -s-<session>, and changing the alphanumeric session value requests another route. Keep session names and full usernames out of model prompts and public logs.

For a deeper state model, read Proxy Sessions for AI Agents.

5. Put the Proxy on the Tool That Opens the Website

An LLM does not normally make the network connection itself. The agent framework chooses a tool; the HTTP client, crawler, local browser, or cloud browser inside that tool opens the website.

bash

Configure the proxy only on the website-facing client. Do not assume that this also routes model-provider calls, databases, object storage, MCP control-plane calls, or telemetry.

Start With HTTP for Static Pages and APIs

HTTPX can use a Proxidize endpoint without placing credentials in source code:

python

Add a hostname allowlist and revalidate every redirect before using this pattern in an agent tool. Reject loopback, private-network, link-local, and credential-bearing URLs so model-supplied input cannot turn the fetcher into an internal-network request primitive.

Use a Browser When the Evidence Requires One

Playwright accepts proxy settings at browser launch. Keep one browser context aligned with one sticky route and one work unit:

python

The current Playwright proxy documentation describes the supported server, username, and password fields. For complete Proxidize examples, use the Playwright integration.

Use Cloud Browsers Only With Explicit Cost and Network Controls

Remote browser-agent products can simplify browser hosting, but the proxy still belongs in that product's browser settings. Browser Use Cloud V4 currently supports browserSettings.customProxy for eligible projects. Its custom proxy documentation should be checked before implementation because SDK fields and eligibility can change.

The public Browser Use and Proxidize reference implementation keeps the host, port, username, and password separate; disables browser recording; applies a structured output schema; sets a per-run cost cap; and validates the returned geography, source URL, product, price, and currency locally.

6. Choose Authentication and Protocol Deliberately

Proxidize Per GB access points support username/password credentials or source-IP allowlisting. A named access point is usually easier for cloud workers whose source IPs can change. An IP-allowlisted access point avoids credentials in the client but requires a stable public source IP.

Create a separate access point per project, environment, or client when you need clear usage separation. Changing an access point's targeting or session settings changes its generated username, so copy the current credential again after modifying settings. The access-point guide explains the current behavior.

For Per GB products, the current standard connection details are:

ProtocolHost and portUse when
HTTP proxy`pg.proxi.es:20000`The client supports authenticated HTTP proxying and the client-to-proxy hop does not require TLS
HTTPS proxy`pg.proxi.es:20000`You want the client-to-proxy connection encrypted; use the DNS hostname and keep certificate checks enabled
SOCKS5`pg.proxi.es:20002`The tool supports SOCKS5 and needs proxy-side DNS behavior or a SOCKS transport

Destination traffic is currently limited to ports 80 and 443. Residential Per GB usernames must end in -type-residential; Mobile Per GB usernames do not. Copy the generated value from the dashboard instead of manually guessing location, ISP, or carrier identifiers.

Test the route outside the agent before debugging prompts or model behavior. The dashboard provides a ready-to-run cURL command. A successful IP check proves basic connectivity, not that the target task, geography, extraction, or session policy is correct.

7. Treat Web Pages as Untrusted Input

An agent can read text that tells it to ignore its task, reveal credentials, visit another domain, download a file, or take an external action. A proxy changes the network route; it does not make retrieved content safe.

Enforce these controls in application code:

  • Allowlist approved schemes, hosts, and destination ports.
  • Revalidate redirects instead of following them blindly.
  • Block private, loopback, link-local, and metadata-service addresses.
  • Keep proxy credentials, API keys, cookies, and rotation URLs out of prompts.
  • Give the browser only the permissions needed for the task.
  • Disable recordings and screenshots unless they are required and protected.
  • Set maximum pages, steps, duration, bytes, browser cost, and retries.
  • Treat page instructions as data, not authority.
  • Require structured output and validate it outside the model.
  • Put purchases, messages, account changes, and publication behind human approval.

The agent should return evidence, not merely “success.” For a price observation, require the source URL, product identifier, numeric price, currency, requested geography, observed geography, timestamp, and a short visible-text description. Reject an answer whose source leaves the approved hostname or whose geography does not match the route.

8. Test the Setup Before Scaling It

Do not choose a route based on one successful screenshot. Run a small, balanced pilot with the real task and a local validator.

A useful first pilot is 40 runs:

RouteRuns
US Mobile, sticky10
US Mobile, rotating/fresh session10
US Residential, sticky10
US Residential, rotating/fresh session10
Total40

Interleave the four routes in randomized blocks rather than running all mobile tests in the morning and all residential tests later. Keep the model, prompt, browser version, target, geography, output schema, timeout, and retry policy fixed. Use one attempt per trial during the first comparison so automatic retries do not hide first-attempt failures.

Track at least:

  • Locally valid result rate.
  • Requested-versus-observed geography match rate.
  • First-attempt completion rate.
  • p50 and p95 end-to-end duration.
  • Browser or agent cost per trial.
  • Proxy bytes per trial when available.
  • Cost per locally valid result.
  • Failure counts by stage: connection, target, browser, agent, schema, geography, and extraction.

The primary economic metric is:

bash

An HTTP 200, completed cloud run, or model answer is not automatically a valid result. Count it only after deterministic checks pass.

What the Existing Smoke Test Does and Does Not Prove

The current Browser Use integration was smoke-tested with one US mobile route and one US residential route against an authorized practice page. Both final observations passed local validation. Their Browser Use costs were $0.004306 and $0.004252 respectively. One earlier residential output was rejected by the local schema and cost $0.004246.

Those three executions demonstrate that the integration and rejection path work. They do not establish a meaningful mobile-versus-residential success-rate, latency, bandwidth, or target-access difference. A comparison article should not turn an n=2 valid sample into a universal performance claim.

For a reusable measurement model, see How to Calculate Proxy Cost per Successful Request.

9. Scale by Work Units, Not by Open Tabs

Once the pilot meets its acceptance threshold, increase concurrency gradually. Each worker should own one agent run, one browser or HTTP client, one proxy session, and one result lifecycle.

bash

Use a semaphore or queue limit to cap active work. Monitor browser memory, CPU, proxy bandwidth, target response patterns, and thread-limit errors. Completing KYB can raise Proxidize concurrency limits, but a higher infrastructure limit is not permission to send traffic faster than a destination can reasonably handle.

Keep retries bounded and destination-aware. A wrong geography may justify a fresh session at the next safe boundary. A 429 Too Many Requests should normally trigger a lower request rate, not an aggressive rotation loop. An ambiguous timeout requires reconciliation before retrying because the remote browser may still be running and accruing cost.

For the isolation pattern, read How to Run Multiple Browser Use Agents With Residential Proxies.

Common Proxy-Setup Mistakes for AI Agents

Proxying the Model Instead of the Web Tool

Putting a proxy on the model-provider client does not automatically change the route used by Playwright, HTTPX, or a cloud browser. Trace each outbound connection separately.

Rotating During a Stateful Task

Changing the exit while cookies, cart state, a login, or a localized browsing session remain active can create contradictory evidence. Rotate between completed work units unless the task was explicitly designed for per-request variation.

Sending Credentials Through the Prompt

The model does not need the proxy password. Configure credentials in the network client through protected environment variables or a secret manager. Pass only non-secret tool results back to the model.

Treating an Exit-IP Check as a Target Test

An IP endpoint can confirm the route and geography. It cannot prove that the real page renders, that the agent extracts the correct field, or that the target accepts the route consistently.

Comparing Unequal Workloads

Do not compare a residential HTTP request with a mobile browser run and call the result a proxy benchmark. Hold the client, task, content, timeout, model, and validator constant.

Optimizing for Completion Instead of Validity

An agent can complete with the wrong country, source, product, currency, or answer. Local validation should decide whether the result is usable.

Assuming Mobile Is Always Better

Mobile routes are valuable when mobile identity matters or evidence shows an advantage for the target. They can be unnecessary for static global research where residential routes produce the same valid result more economically.

Production Checklist

Before increasing volume, confirm that:

  • The destination and collection purpose are approved.
  • A first-party API or direct connection was considered first.
  • Residential versus mobile was chosen for a documented reason.
  • Location targeting is only as narrow as the task requires.
  • One sticky session maps to one coherent stateful work unit.
  • Rotating routes are used only where request independence is real.
  • Proxy credentials never enter prompts, source code, fixtures, or logs.
  • Redirects and private-network destinations are blocked in code.
  • Browser steps, duration, cost, data, and retries have hard limits.
  • Output is validated against a fixed schema and source policy.
  • Failures are classified rather than discarded.
  • The pilot compares cost per valid result, not list price alone.
  • Production concurrency grows gradually from measured evidence.
  • Human approval protects purchases, publication, messages, and account changes.
  • Data collection follows applicable laws, contracts, privacy obligations, website terms, and the Proxidize Acceptable Use Policy.

Build the Smallest Setup That Can Be Measured

Choose the proxy after defining the work unit, geography, state boundary, and validation rule. Start with HTTP and residential access for ordinary global public-web tasks. Add a browser when rendering is necessary, and choose mobile when the required observation genuinely depends on a US mobile-network identity.

Then test the complete path. Measure locally valid results, latency, cost, data, and failure stage under a fixed protocol. The winning setup is not the route with the strongest marketing label; it is the one that produces the required evidence reliably, lawfully, and at an acceptable cost per valid result.

Explore Proxidize Residential Proxies, compare Mobile Proxy options, or review current pricing before building the pilot.

Frequently asked questions

Not always. An AI agent needs a web proxy only when its website-facing tool requires a different route, location, IP type, route identity, or pool of exits. Use a first-party API, licensed dataset, or direct request when it already meets the task requirements.

Residential proxies are the practical default for global public-web research, monitoring, and data collection. Mobile proxies are a better starting point when the task specifically requires a real US mobile-network context, carrier targeting, mobile SERPs, mobile ad verification, or a stable dedicated mobile exit. Representative testing should decide the final choice.

Use a sticky session for a coherent browser task that spans a page load, several related pages, cookies, login state, or a localized flow. Use a fresh session between independent jobs. Per-request rotation can be appropriate for stateless HTTP observations but may split one browser page across different route identities.

Configure it on the HTTP client, crawler, local browser, or cloud browser that opens the destination website. A proxy on that tool does not automatically route the model API, database, storage, or every other process dependency.

An HTTPS proxy encrypts the connection from the agent's tool to the proxy and is the preferred choice when the client supports authenticated HTTPS proxies. With Proxidize Per GB, use the DNS hostname pg.proxi.es, keep certificate validation enabled, and use the current dashboard-generated credentials.

Start with a balanced 40-run pilot across the route and session combinations you are considering, such as 10 runs each for mobile sticky, mobile rotating, residential sticky, and residential rotating. Treat it as a pilot rather than a universal benchmark, then expand the sample and target mix if the decision remains uncertain.

Count a run only when the returned evidence passes deterministic local checks for source, geography, schema, and task-specific fields. A completed browser session, HTTP 200 response, or fluent model answer is not sufficient by itself.

No. A proxy changes the network route; it does not grant permission, override access controls, or decide whether collecting and using data is lawful. The team operating the agent remains responsible for applicable law, privacy requirements, contracts, website terms, and internal approval.