Tutorial16 min read

Proxies for AI Agents

Short answer

Pick the provider by how your agent reaches the web: a proxy network, paid per GB, if the agent runs its own browser or HTTP client; a scraper API, paid per 1,000 successful results, if it should receive pages as data; rotating datacenter proxies for tolerant sites at volume. Then test the shortlist on 100 of your agent's own URLs: a full browser run is about 200 MB, about $0.59 at $2.95/GB. ProxyField covers the first and third routes today, with residential proxies from $2.95/GB for 1 GB down to $1.95/GB and sticky sessions up to 36 h, so the test fits in the Easy Trial: 1 GB for $2.95.

residential IPs
412M+
from, traffic never expires
$1.95/GB
Easy Trial
1 GB for $2.95
At a glance
If your agentUseYou payAt ProxyField
Runs its own browser or HTTP clienta proxy networkper GB of trafficresidential proxies: $2.95/GB for 1 GB down to $1.95/GB; Easy Trial 1 GB for $2.95
Should receive pages as data, with no browsers to runa scraper APIper 1,000 successful resultsWeb Scraping API, in development: $0.50 plain HTTP, $2.00 rendered (Contact sales)
Fetches tolerant sites and public endpoints at volumerotating datacenter proxiesper GB of trafficdatacenter proxies: $0.29/GB down to $0.22/GB
On this page 12 sections
  1. What to check in any proxy provider for an AI agent
  2. Which proxy type or API for an AI agent
  3. Test any provider on your agent's targets in 100 requests
  4. Proxies or a scraper API for an agent
  5. Why AI agents get blocked
  6. Where the proxy goes in an agent stack
  7. Rotating or sticky: one session per task
  8. How proxies and web data tools fit together
  9. Proxies for AI assistants: Perplexity, Gemini and others
  10. Pay per crawl and the rules for AI bots
  11. What an agent's traffic costs
  12. Proxies for AI Agents FAQ

Whichever provider you test, hold it to four thresholds:

  • Rotation and sessions: a new IP per request for independent lookups, and a sticky IP that lasts longer than your longest task.
  • Location: city targeting, so the agent sees the market the user asked about.
  • Protocols: HTTP, HTTPS and SOCKS5 on one gateway, for HTTP tools, browsers and MCP servers alike.
  • Entry: a small first purchase, so you can run the 100-URL test on your own targets before you buy volume.

Named providers with dated prices are in the residential proxy and web scraping API price comparisons.

What to check in any proxy provider for an AI agent

CheckWhy an agent needs itProxyField
Per-request rotationIndependent lookups (50 product pages, 20 results) spread over many IPsa new IP on every request
Sticky session lengthA task that clicks through one site must stay one visitor30 s to 36 h (ttl 30–129,600 s); 20 min if you set none
What ends a sticky IPAn agent that pauses to think can lose its IPafter 120 s with no traffic, or if the exit node drops
TargetingThe user asked about Berlin prices, not Virginiacountry, region (state), city; all 50 US states
ProtocolsHTTP clients, browsers and MCP servers differHTTP, HTTPS, SOCKS5 on gate.proxyfield.io:7000
ConcurrencyAgents open many pages at onceunlimited concurrent threads
Smallest purchaseTest an agent before you commit1 GB (Easy Trial, $2.95)
Traffic expiryAgents run in burststraffic never expires
Reliability and speedAn agent waits on every page it fetchesa 99.6% success rate and an average response of about 400 ms, according to our service data
Managed optionSome teams want rendering and retries handledWeb Scraping API, in development: Contact sales

Which proxy type or API for an AI agent

Your agent needsRouteProxyField productPriceHow to start
Its own browser on sites that distrust serversproxy networkResidential proxies$2.95/GB for 1 GB down to $1.95/GBEasy Trial: 1 GB for $2.95
Mobile versions of sites, or targets that trust carrier IPs mostproxy networkMobile proxies$3.45/GB for 1 GB down to $2.45/GBfrom 1 GB, same balance
Plain HTTP fetches of tolerant sites at volumeproxy networkRotating datacenter proxies$0.29/GB down to $0.22/GBper GB, never expires
One address for days, such as an account it managesstatic IPDedicated ISP proxies (static residential)from $2.29 per IP for 30 daysper IP, renewed in your dashboard
Pages as data, with no browsers to runscraper APIWeb Scraping API$0.50 per 1,000 plain HTTP ($0.20 from 10,000); $2.00 rendered ($1.00 from 10,000)in development: Contact sales
Search results as JSONscraper APIGoogle SERP API$1.20 per 1,000 ($0.80 from 10,000)in development: Contact sales
Answers from AI enginesscraper APIPerplexity, ChatGPT and Google AI Mode scraper APIs$1.50 per 1,000 ($1.00 from 10,000)in development: Contact sales

Residential is the usual choice for an agent that browses many different sites. Residential and mobile share one balance, so one agent can use both: residential for research, mobile for the few targets that need it. The API prices are per 1,000 successful results; the volume price applies from 10,000 results in one purchase.

Test any provider on your agent's targets in 100 requests

A provider's success rate holds only for the targets it was measured on, so test on yours: 100 URLs, a pass mark set in advance, about 200 MB of traffic for a full browser run. The gap between an easy target and a real one is large. In Proxyway's Proxy Market Research 2026 (13 providers, data collected mostly in March and April 2026), the median residential success rate was 99.28% on a test page that does not block requests, and 74.43% on popular targets (Amazon, Google and Instagram); the median response time rose from 0.93 s to 3.21 s. An agent's targets look like the second test, not the first. Proxyway, a benchmark site, publishes named results every year: Proxy Market Research 2026, Web Scraping API Report 2025 and Search APIs in 2026: Overview & Benchmarks (titles as listed on its research page). ProxyField's own figure is a 99.6% success rate, according to our service data; your agent's sites decide what you get, so run the test.

  1. Put 100 URLs your agent really visits in agent_urls.txt, spread over the sites it uses most.
  2. Set your pass mark before you run, for example 95 of 100 pages with status 200 and the content you expect.
  3. Run the script below once per provider, with the same URLs and at the same hour.
  4. Compare the pass count, the median time, and the traffic the provider's dashboard shows for the run.
Python
import statistics, time, requests

PROXY = "http://<login>-country-us:<password>@gate.proxyfield.io:7000"
urls = [u.strip() for u in open("agent_urls.txt") if u.strip()][:100]
ok, times, body_bytes = 0, [], 0
for url in urls:
    t = time.monotonic()
    try:
        r = requests.get(url, proxies={"http": PROXY, "https": PROXY}, timeout=30)
        times.append(time.monotonic() - t)
        body_bytes += len(r.content)
        if r.status_code == 200 and "<title" in r.text.lower():   # replace with your own content check
            ok += 1
    except requests.RequestException as e:
        print("failed:", url, type(e).__name__)
median = statistics.median(times) if times else 0
print(f"{ok}/{len(urls)} passed, median {median:.2f} s, {body_bytes / 1e6:.1f} MB of page bodies")

The last line prints <passed>/100 passed, median <seconds> s, <MB> MB of page bodies: compare the first number with the pass mark you set in step 2. The run fetches HTML only; at about 2 MB per full page, a browser run of the same 100 URLs is about 200 MB, about $0.59 at $2.95/GB, well inside the 1 GB Easy Trial. ProxyField's dashboard shows usage and remaining gigabytes in real time.

Proxies or a scraper API for an agent

The choice is how much of the fetching you want to own:

  • Proxies: your agent's HTTP tool or browser connects through the gateway, and you write the rendering, retries and parsing yourself. You get full control and pay per GB.
  • A scraper API: the agent sends a URL and gets the page back. The API handles IPs, retries and, if you ask for it, JavaScript rendering, and you pay per successful result.

What 1,000 pages cost each way, at about 2 MB per full page (an example size, not a measurement):

Route for 1,000 pagesWhat you pay forCost
Residential proxiesabout 2 GB of trafficabout $5.90 at $2.95/GB
Rotating datacenter proxiesabout 2 GB of trafficabout $0.58 at $0.29/GB
Web Scraping API, plain HTTP1,000 successful results$0.50 ($0.20 each 1,000 from 10,000 in one purchase)
Web Scraping API, JavaScript rendering1,000 successful results$2.00 ($1.00 each 1,000 from 10,000)

Proxies charge for bytes, so a page that loads only HTML costs a fraction of a full page; the API charges per result, so page weight does not change the bill, and blocked or timed-out requests are not billed.

ProxyField's Web Scraping API is in development. It is priced at $0.50 per 1,000 successful results over plain HTTP ($0.20 from 10,000 results in one purchase) and $2.00 with JavaScript rendering ($1.00 from 10,000), billed on successful results only. Its design is in the API documentation, and access is through Contact sales. The full comparison: scraper API vs proxies.

Why AI agents get blocked

An agent's web requests look like a scraper's to the websites it visits, and usually like an unusual one:

  • Server IPs. Agents run on cloud servers, and many sites rate-limit or challenge cloud-provider IP ranges on sight.
  • Bursts. An agent may open 20 pages in parallel to answer one question, far beyond a person's pace.
  • Shared addresses. Many agents, or many users of one agent product, leave from the same few IPs, which quickly earn a bad reputation.
  • Wrong location. An agent in a US data center sees US prices, results and availability, even when the user asked about Germany.

A proxy fixes the address and the location. It does not fix bursts or a headless browser's tells; those need pacing and a well-configured browser (see what proxies can and cannot fix).

Where the proxy goes in an agent stack

The model never touches the website; tools do. Set the proxy on each tool that reaches the web, and leave the rest alone.

Agent componentRoute through the proxy?How
HTTP fetch tool (Python requests, httpx, Node fetch)YesThe client's proxy option, or HTTP_PROXY and HTTPS_PROXY variables for clients that read them
Browser tool (Playwright, Puppeteer, Selenium, and agent libraries built on them)YesThe proxy option at browser launch
A local MCP server that fetches pagesYesIts own proxy setting, or the proxy variables in the server's environment
A scraping or SERP APINoThe API handles IPs itself
The model provider's API (the LLM calls)NoCall it directly; routing it through residential IPs only adds latency and traffic

Two minimal setups, with the gateway and a username example (an exit in New York City, United States):

Python
# HTTP tool: every call leaves from a new residential IP in New York
import requests

PROXY = "http://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000"

def fetch_page(url: str) -> str:
    r = requests.get(url, proxies={"http": PROXY, "https": PROXY}, timeout=30)
    r.raise_for_status()
    return r.text
Python
# Browser tool: one sticky IP in New York for a 10-minute task
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(proxy={
        "server": "http://gate.proxyfield.io:7000",
        "username": "<login>-country-us-city-new_york-session-task42-ttl-600",
        "password": "<password>",
    })
    page = browser.new_page()
    page.goto("https://api.ipify.org")
    print(page.inner_text("body"))
    browser.close()

The same for an agent written in Node, with Puppeteer and one sticky IP in Germany:

JavaScript
const puppeteer = require("puppeteer");

(async () => {
  const browser = await puppeteer.launch({ args: ["--proxy-server=http://gate.proxyfield.io:7000"] });
  const page = await browser.newPage();
  await page.authenticate({ username: "<login>-country-de-session-task43-ttl-600", password: "<password>" });
  await page.goto("https://api.ipify.org");
  console.log(await page.evaluate(() => document.body.innerText));
  await browser.close();
})();

For tools you did not write, such as a local MCP server in Python, set the proxy in the process environment and keep the model's API direct with NO_PROXY (Python requests and httpx read all three variables):

Shell
export HTTP_PROXY="http://<login>-country-us:<password>@gate.proxyfield.io:7000"
export HTTPS_PROXY="$HTTP_PROXY"
export NO_PROXY="api.openai.com,api.anthropic.com"

Agent frameworks: where each one takes the proxy

Agent libraries that drive their own browser have their own proxy setting. From each tool's documentation:

FrameworkWhat it isWhere the proxy goesLogin and password
Browser Use (Python, 0.13)an LLM agent that drives ChromiumBrowser(proxy=ProxySettings(server=..., username=..., password=...)), with ProxySettings from browser_use.browseryes
Crawl4AI (Python, 0.9)a crawler that returns pages as Markdown for LLMsCrawlerRunConfig(proxy_config=ProxyConfig(server=..., username=..., password=...)); the proxy argument on BrowserConfig is marked deprecatedyes
Stagehand (TypeScript, Python, Go)browser automation with natural-language actionsthe local browser's proxy launch option: server, plus an optional list of hosts that stay directno: its docs say "Authenticated local proxies are not supported yet", so use an IP allowlist in your ProxyField account and, as server, gate.proxyfield.io with the port you set up in the dashboard; with the allowlist, the product, location and session are set per port in the dashboard
Playwright MCPan MCP server that gives an agent a browser--proxy-server http://gate.proxyfield.io:7000 (or PLAYWRIGHT_MCP_PROXY_SERVER), --proxy-bypass for hosts that stay directno login flag; put Playwright's proxy launch option, which takes username and password, under browser.launchOptions in its config file
Python
# Browser Use: the agent's browser on one sticky US IP for 30 minutes
from browser_use import Agent, Browser
from browser_use.browser import ProxySettings

browser = Browser(proxy=ProxySettings(
    server="http://gate.proxyfield.io:7000",
    username="<login>-country-us-session-agent01-ttl-1800",
    password="<password>",
))
# agent = Agent(task="...", llm=..., browser=browser)
Python
# Crawl4AI: every crawl through a German residential IP
from crawl4ai import AsyncWebCrawler, CrawlerRunConfig, ProxyConfig

run_config = CrawlerRunConfig(proxy_config=ProxyConfig(
    server="http://gate.proxyfield.io:7000",
    username="<login>-country-de",
    password="<password>",
))
# async with AsyncWebCrawler() as crawler:
#     result = await crawler.arun("https://example.com", config=run_config)
{
  "browser": {
    "launchOptions": {
      "proxy": {
        "server": "http://gate.proxyfield.io:7000",
        "username": "<login>-country-us-session-mcp01-ttl-1800",
        "password": "<password>"
      }
    }
  }
}

Save the last block as config.json and start the server with npx @playwright/mcp@latest --config config.json; the agent's browser then opens https://api.ipify.org on the proxy's IP, not your server's.

Expose fetch_page (or the browser) to the agent as a tool in whichever framework you use; the framework does not need to know a proxy exists. The username takes <login>-country-<cc>-region-<region>-city-<city>-session-<id>-ttl-<seconds>, in lowercase with underscores, and every part after the login is optional. Full setup for each library: Playwright, Python, Node.js. How agents reach scraping tools through MCP: web scraping MCP servers.

Rotating or sticky: one session per task

Match the IP to the task, not to the agent:

  • Independent lookups (50 product pages, 20 search results): a new IP on every request spreads the load.
  • A task that moves through one site (search, filter, open, add to cart, sign in): one sticky IP for the whole task, so the site sees one visitor. Set a ttl longer than the task, and keep the session busy: an IP that carries no traffic for 120 s is replaced, which matters when the agent stops to call the model.
  • Several agents in parallel: give each agent, or each task, its own session ID, and never let two agents share a sticky IP on the same site. That keeps one agent's mistakes from blocking the others.
  • Retries: a sticky IP is held while its exit node is up; if the node drops, the IP may change and a broken connection is not restored. Let the agent restart the step on a new IP, and after 2 or 3 failures report the failure instead of looping.

Cap concurrency per website (a few requests at a time per domain) even though threads are unlimited on our side. Sites judge the pace, not your plan.

How proxies and web data tools fit together

A web-capable agent usually needs 4 steps, and each has a tool:

  1. Search

    Find the pages. A SERP API returns results as data. ProxyField's Google SERP API is designed to return the results page as JSON, with the AI Overview, People Also Ask and the local pack parsed. It is priced at $1.20 per 1,000 successful results, or $0.80 from 10,000.

  2. Fetch

    Download pages through a proxy, or let a scraping API do it (the section above).

  3. Browse

    For pages that need clicks, a browser through a proxy, as above.

  4. Extract

    The model turns page text into the answer or into structured data.

The scraper APIs are in development and offered through Contact sales. They are paid from the same crypto balance as proxies, with no subscription.

Proxies for AI assistants: Perplexity, Gemini and others

People search for a "Perplexity proxy" or a "proxy for Gemini" for 2 different things:

  • Seeing answers from another country. AI answers change by location, so brand and SEO teams check them from several countries. At volume, an API is simpler than a browser. The Perplexity scraper API and the AI search scraper APIs are designed to return answers as data, priced at $1.50 per 1,000 successful results ($1.00 from 10,000).
  • Running an AI browser or desktop assistant through a proxy. These apps follow the proxy settings of the browser or the operating system they run on; set the proxy there, as for any app (how to set up a proxy).

Pay per crawl and the rules for AI bots

Websites are setting rules for AI traffic. Cloudflare announced pay per crawl on July 1, 2025, in private beta. A site owner on Cloudflare can allow an AI crawler, charge it per request, or block it. A crawler that has not agreed to pay gets 402 Payment Required with a crawler-price header. A crawler that will pay sends crawler-exact-price on its retry, or crawler-max-price up front; if the site's price is at or below that maximum, the answer is 200 OK with a crawler-charged header (Cloudflare's post). More sites also list AI crawlers by name in robots.txt.

For an agent working for a user, the safe rules are simple:

  • respect robots.txt and the site's terms;
  • identify your crawler honestly where the site asks;
  • keep a human-scale pace;
  • do not use proxies to get past a block the site set on purpose.

Collect public pages only. ProxyField's acceptable use policy allows collecting public web data, monitoring and testing, and forbids access to data behind logins you are not entitled to. The legal side is in is AI scraping legal.

What an agent's traffic costs

A 50-page research task at about 2 MB a page is about 100 MB, which is about $0.30 at $2.95/GB. The 2 MB is an example size, not a measurement, so weigh your own pages.

Agent workloadTraffic (at about 2 MB per full page)Cost at the rate for that purchase
50 pages, one research taskabout 100 MBabout $0.30 at $2.95/GB; the 1 GB Easy Trial covers about 10 such tasks
1,000 pagesabout 2 GBabout $5.90 at $2.95/GB (1–9 GB); through the Web Scraping API, $0.50 plain HTTP or $2.00 rendered, with no traffic charge
100,000 pagesabout 200 GBabout $498 at $2.49/GB (100–249 GB)
500,000 pagesabout 1,000 GBabout $1,950 at $1.95/GB (1,000+ GB)

An agent that fetches HTML or JSON instead of full pages uses a fraction of that. Blocking images and media in the agent's browser makes the same GB go further. The tier rate applies to the whole purchase; prices for every volume are on pricing. Traffic never expires, so an agent that runs in bursts does not waste a monthly plan.

Proxies for AI Agents FAQ

Which proxy providers work well for AI agents that browse and scrape the web?

ProxyField works for agents that run their own browser or HTTP client: residential proxies from $2.95/GB for 1 GB down to $1.95/GB, sticky sessions from 30 s to 36 h, country targeting in 195+ countries, city targeting across 21,000+ cities, and HTTP, HTTPS and SOCKS5 on one gateway, with a 99.6% success rate according to our service data. Choose by route: a proxy network per GB if the agent runs its own browser, a scraper API per 1,000 successful results if it should receive pages as data (ProxyField's Web Scraping API is in development at $0.50 plain HTTP, Contact sales), and rotating datacenter proxies at $0.29/GB for tolerant sites. Test each shortlisted provider on 100 of your agent's own URLs with a pass mark set in advance; a full browser run is about 200 MB, about $0.59 of the 1 GB Easy Trial. Named providers with dated prices are on the residential proxy and web scraping API price comparison pages.

Which proxy provider has the best success rate for AI agents?

No single figure answers it, because success rates depend on the target: vendor-published and independent benchmarks such as Proxyway's yearly reports test fixed sites, and your agent visits others. ProxyField has a 99.6% success rate, according to our service data. Run the same 100 of your agent's URLs through each provider at the same hour, with a pass mark set before the run, and keep the provider that passes on your sites.

How do I test a proxy provider for my AI agent?

Put 100 URLs your agent really visits in a file, set a pass mark first (for example 95 pages with status 200 and the content you expect), and fetch them through each provider with the same script at the same hour. Compare the pass count, the median time and the traffic used; at about 2 MB a page the run is about 200 MB, about $0.59 at ProxyField's $2.95/GB.

Can AI agents use residential proxies?

Yes. An agent uses a residential proxy like any other client: set it on the HTTP tool or the browser the agent drives, and its requests leave from home-connection IPs instead of its cloud server. That is the usual choice for agents that browse many different sites.

Can I use mobile proxies with AI agents?

Yes, the same way as residential: the agent's fetch or browser tool points at the gateway. Use mobile IPs for mobile versions of sites or targets that trust carrier networks most, and residential for the rest; at ProxyField both share one balance.

How do I set up a proxy for my AI agent?

Add the proxy to each tool that reaches the web: the proxies option of your HTTP client, or the proxy option when the browser launches. Leave the model's own API calls direct, then test by having the agent open api.ipify.org and report the IP.

How do proxies and web data tools fit into AI agent workflows?

A SERP API finds the pages, a proxy or a scraping API fetches them, a browser behind a proxy handles pages that need clicks, and the model extracts the answer. The proxy sits only on the fetching and browsing steps.

Should every agent get its own proxy session?

Every agent task that moves through one site should get its own sticky session, so the site sees one consistent visitor and one agent's block does not spread to others. Agents doing independent lookups can share a rotating gateway, because each request gets a new IP anyway.

How many proxies does an AI agent fleet need?

With a rotating gateway you do not count proxies: you need one session per concurrent task that must keep its IP, and the rest rotate per request. Plan concurrency per website instead, and keep it to a few parallel requests per domain.

Does an agent framework need a proxy setting?

Only if the framework runs its own browser. Browser Use takes a ProxySettings object on Browser, Crawl4AI a ProxyConfig on CrawlerRunConfig, and Playwright MCP a --proxy-server flag; in other frameworks the proxy belongs to the HTTP client or browser the agent calls. Python requests and httpx also read the HTTP_PROXY and HTTPS_PROXY variables, which covers tools you did not write yourself.

Show 6 more questionsShow fewer questions

Do the LLM API calls need to go through the proxy?

No. The model provider's API does not block your server the way websites do, so send those calls directly and keep the proxy for web requests. Routing them through residential IPs only adds latency and traffic.

What is a Perplexity proxy?

The term covers 2 things: a proxy set in the browser or app you use Perplexity in, and a scraper that collects Perplexity answers from chosen countries. For answers at volume, ProxyField's Perplexity scraper API is in development, priced at $1.50 per 1,000 successful results ($1.00 from 10,000), through Contact sales.

Can I use a proxy with Google Gemini?

Gemini in a browser goes through the browser's or the system's proxy, like any website, so a proxy set there applies to it too. Where Gemini is offered and what your account allows are set by Google's terms, and using a proxy to appear in another country may breach them, so read them first.

What is Cloudflare pay per crawl?

A Cloudflare option, announced on July 1, 2025 in private beta, that lets a site allow, charge or block each AI crawler. A crawler that has not agreed to pay gets HTTP 402 Payment Required with a crawler-price header, and it can retry with crawler-exact-price to pay; a paid request gets 200 OK with a crawler-charged header.

How much do proxies for AI agents cost?

Per-GB proxies cost by traffic. At about 2 MB per full page, a 50-page task is about 100 MB, about $0.30, and 1,000 pages are about 2 GB, about $5.90 at ProxyField's $2.95/GB. Prices fall to $1.95/GB from 1,000 GB, and traffic never expires.

Easy Trial: 1 GB for $2.95.

Try for the price of 1 GB, no subscription, traffic never expires.