Skip to content

Proxies for AI agents

Give your agent an exit country, and keep a multi-step task on one exit IP. netdash is a standard HTTP proxy that you set in the browser or HTTP client your agent already uses.

An agent's client sends each task through one gateway, which uses an exit IP in the country the task set. Illustrative routes, not live traffic. Exits are available in most countries; the countries shown are examples.
  • Sticky sessions with a TTL in minutes
  • No per-account concurrency limit
  • No SDK needed

Where your agent’s requests come from

An agent usually runs on a server or a hosted runtime in one cloud region, so every page and API it calls answers for that region. When the answer depends on the visitor’s country, such as language, currency, availability or search results, the agent collects the wrong market without noticing.

Multi-step tasks have a second problem. Some sites tie session state, such as a consent choice, a language selection or a paginated search, to the client’s IP address. If the exit IP changes between steps, the task can lose that state halfway through.

  • Exit country per task: with -cc-DE, the agent’s requests leave through an exit IP in Germany
  • One exit IP per run: a sticky session holds for the TTL you set while that IP stays available
  • Set once in the client: the proxy lives in the browser or HTTP client configuration, not in the prompt
  • Parallel runs stay separate: one session ID per run, with no per-account concurrency limit

How a proxied agent request travels

The agent decides what to fetch. Its browser or HTTP client makes the request and sends it to a netdash gateway: -us for the Americas or -eu for Europe. The gateway forwards it through an exit IP in the country you chose and returns the website’s response unchanged.

The proxy belongs to the client’s configuration, not to the prompt. The model calls a tool such as fetch_page(url), and the tool’s code adds the proxy and the credentials, so the model never sees the password. netdash provides connectivity only: it doesn’t host agents, run models or operate browsers for you.

Keep the model’s own API calls off the proxy. Set the proxy on the browser or the tool’s client rather than exporting HTTPS_PROXY for the whole agent process: HTTP clients such as httpx read that variable by default, so the calls to your model provider would also go through netdash and use GB.

  • Agent: your code and your model, in your environment or with a provider you choose
  • Client: Playwright, Puppeteer, httpx or any other client with an HTTP proxy setting
  • Gateway: scale-us.netdash.io:2000 checks the credentials and applies the country and session
  • Website: the public pages and APIs the agent is allowed to use

Four ways to connect an agent

Pick the path that matches how your agent reaches the web. Each guide shows the exact configuration, with sources.

From task to proxied request

  1. Step 1: Store the credentials

    Put NETDASH_USERNAME and NETDASH_PASSWORD in the agent runtime’s secret store. You find them in the dashboard under Residential (or Mobile) → Generate.

    Quickstart
  2. Step 2: Pick the exit country per task

    Map each task to a market and a country code, such as -cc-US, -cc-DE or -cc-GB, and to the matching gateway.

    Country targeting
  3. Step 3: Derive one session per run

    Hash the run ID to 8 letters and digits and add -session-{id}-ttl-30. Parallel runs get different IDs, so each run keeps its own session.

    Sessions and TTLs
  4. Step 4: Set the proxy in the client, not the prompt

    The tool function or the browser launch adds the proxy and the credentials. The model only passes URLs.

  5. Step 5: Confirm the exit

    Fetch https://api.ipify.org?format=json at the start of a run and log the IP with the country code and session ID.

  6. Step 6: Stop at the limits

    End the run when its budget is spent or a site starts limiting it, and hand the task to a person.

Give every agent run its own session

One session ID per run, derived from the run ID, and a TTL longer than the task. Pair exits in the Americas with the -us gateway and exits in Europe with -eu; the targeting docs explain the codes and gateways.

Plan and endpoint

Scale: scale-us.netdash.io:2000 (Americas) or scale-eu.netdash.io:2000 (Europe)

The examples use the Scale plan. Every residential plan uses the same syntax; you switch plans by changing the host and port.

Exit country

From the task: -cc-US, -cc-DE, -cc-GB

The agent sees the market it is researching. Use any ISO 3166-1 alpha-2 code; to confirm availability for a specific country, contact support.

Session mode

Sticky for multi-step browsing; rotating for one-shot HTTP lookups

Reusing a session ID keeps the same exit IP for the TTL while that IP stays available.

Session ID

The first 8 hex characters of a hash of the run ID

Letters and digits only, no hyphens. One ID per run; parallel runs never share one.

TTL

30 for typical tasks; 720 (12 h) for long research sessions

Pick a TTL longer than the task. Dashboard presets: 15 min, 30 min, 12 h and 7 days.

Concurrency

One run per session ID, as many runs as you need

There is no per-account concurrency limit.

Credentials

NETDASH_USERNAME and NETDASH_PASSWORD in the agent runtime’s secret store

One account-wide pair for every residential and mobile plan. Keep it out of prompts, tool arguments and logs.

Example

USERNAME-cc-US-session-a1b2c3d4-ttl-30 on scale-us.netdash.io:2000

Build the connection for one run

Choose the plan, gateway, exit country and TTL. The session ID stands in for the one your code derives from the run ID.

Your route

Through the AshburnFrankfurt gateway to an exit IP in Via Ashburn (-us)United StatesCanadaMexicoBrazilArgentinaChileVia Frankfurt (-eu)United KingdomGermanyFranceSouth AfricaIndiaJapan, rotatingsticky for 15 minsticky for 30 minsticky for 12 hsticky for 7 days, on the ScaleMobile plan.

Proxy URL

http://USERNAME-cc-US-session-a1b2c3d4-ttl-30:PASSWORD@scale-us.netdash.io:2000

Replace USERNAME and PASSWORD with the credentials from your dashboard.

Scale, Americas gateway, exit IP in United States, sticky for 30 min.

curl --max-time 30 -x "http://USERNAME-cc-US-session-a1b2c3d4-ttl-30:PASSWORD@scale-us.netdash.io:2000" \
  "https://api.ipify.org?format=json"
import requests

proxy = "http://USERNAME-cc-US-session-a1b2c3d4-ttl-30:PASSWORD@scale-us.netdash.io:2000"
proxies = {"http": proxy, "https": proxy}  # set both, or HTTPS requests bypass the proxy

response = requests.get("https://api.ipify.org?format=json", proxies=proxies, timeout=30)
response.raise_for_status()
print(response.text)
import { ProxyAgent, fetch } from "undici";

const dispatcher = new ProxyAgent({
  uri: "http://scale-us.netdash.io:2000",
  token: "Basic " + Buffer.from("USERNAME-cc-US-session-a1b2c3d4-ttl-30:PASSWORD").toString("base64"),
});

const res = await fetch("https://api.ipify.org?format=json", { dispatcher, signal: AbortSignal.timeout(30_000) });
console.log(await res.text());
import { chromium } from "playwright";

const browser = await chromium.launch({
  proxy: {
    server: "http://scale-us.netdash.io:2000",
    username: "USERNAME-cc-US-session-a1b2c3d4-ttl-30",
    password: "PASSWORD",
  },
});
const page = await browser.newPage();
await page.goto("https://api.ipify.org?format=json");
console.log(await page.textContent("body"));
await browser.close();
{"ip":"203.0.113.10"}

Your output shows a different address in the country you chose.

Illustrative routes, not live traffic. Exits are available in most countries; the countries shown are examples. For exits in Oceania, ask support which gateway to use.All locations

A tool function with a per-run proxy

The Python tool reads the credentials from environment variables, URL-encodes them and derives the session ID from the run ID. Every step of a run reuses that session, so it keeps one exit IP for the TTL while that IP stays available, and parallel runs each get their own session ID.

The Playwright tab does the same for a browser: the server, username and password go into separate fields. If your agent uses a framework or a hosted browser, the framework guides and the cloud browser guide show where these values go.

  • httpx 0.28 and later take proxy=; the older proxies= argument was removed
  • A 30-second timeout, so one slow page can’t stall the agent
  • A 407 on an HTTPS URL raises httpx.ProxyError: check the username syntax and password
  • Connection details for every client are in the proxy string format docs
import hashlib
import os
from urllib.parse import quote

import httpx

GATEWAY = {"US": "us", "DE": "eu", "GB": "eu"}  # Americas or Europe gateway


def proxy_for(run_id: str, country: str = "US", ttl: int = 30) -> str:
    """Proxy URL for one agent run: same session ID, same exit IP for the TTL."""
    sid = hashlib.sha256(run_id.encode()).hexdigest()[:8]  # letters and digits only
    user = quote(f"{os.environ['NETDASH_USERNAME']}-cc-{country}-session-{sid}-ttl-{ttl}", safe="")
    password = quote(os.environ["NETDASH_PASSWORD"], safe="")
    return f"http://{user}:{password}@scale-{GATEWAY[country]}.netdash.io:2000"


def fetch_page(url: str, run_id: str, country: str = "US") -> str:
    """Tool the agent calls. The model passes a URL; credentials stay in the environment."""
    with httpx.Client(proxy=proxy_for(run_id, country), timeout=30) as client:
        try:
            response = client.get(url, follow_redirects=True)
        except httpx.ProxyError as exc:  # e.g. 407: check the username syntax and password
            raise RuntimeError("netdash refused the proxy connection") from exc
        response.raise_for_status()
        return response.text


if __name__ == "__main__":
    print(fetch_page("https://api.ipify.org?format=json", run_id="run-2026-10-09-001"))
Python
import { createHash } from "node:crypto";
import { chromium } from "playwright";

const GATEWAY = { US: "us", DE: "eu", GB: "eu" }; // Americas or Europe gateway

// One browser per agent run, kept on one exit IP by a sticky session.
export function browserForRun(runId, country = "US") {
  const sid = createHash("sha256").update(runId).digest("hex").slice(0, 8);
  return chromium.launch({
    proxy: {
      server: `http://scale-${GATEWAY[country]}.netdash.io:2000`,
      username: `${process.env.NETDASH_USERNAME}-cc-${country}-session-${sid}-ttl-30`,
      password: process.env.NETDASH_PASSWORD,
    },
  });
}

const browser = await browserForRun("run-2026-10-09-001");
const page = await browser.newPage();
await page.goto("https://api.ipify.org?format=json", { timeout: 30_000 });
console.log(await page.textContent("body"));
await browser.close();
Playwright

Which proxies AI agents should use

Residential proxies suit most agents that browse public sites. Mobile and static ISP IPs cover narrower jobs.

  • Residential proxies

    Self-serve

    The default for agents that browse public sites. Pick the exit country per task: rotating for independent lookups, sticky for multi-step tasks. The examples on this page use the Scale plan.

    From $1.20/GB, graduated per order

  • Mobile proxies

    Self-serve

    For tasks about what a site returns to visitors on mobile exit IPs. Same credentials and syntax as residential; carrier and network generation can’t be selected.

    From $3.50/GB, graduated per order

  • ISP proxies

    Through sales

    For a long-running agent that needs one static IP for days, for example against a service you operate that admits known IPs.

    $1.60 per IP per 30 days

Guardrails to build into the agent

A proxy gives an agent reach, so the agent needs limits of its own. If it collects training data, read AI training data scraping for robots.txt, terms, copyright and personal data.

  • A list of allowed domains

    Give the agent the sites it may visit and refuse everything else. It keeps the agent on task and its traffic predictable.

  • Hand off when a site pushes back

    When a page shows a CAPTCHA, a login wall or a rate limit, the agent stops and hands the task to a person, or skips the site.

  • A budget per run

    Cap requests and GB per run, and pause the run when it reaches the cap. Purchased GB never expire, but a runaway loop still uses them.

  • No logins or personal data without authorization

    The agent signs in to accounts or collects personal data only when you are authorized to and have a lawful basis.

  • Log the exit country and session ID

    Store the country code and session ID with each run’s results, so you can reproduce what the agent saw.

What netdash doesn’t do for an agent

Your agent and its client do the work: the browser renders pages, and the agent decides what to do next. netdash carries the traffic and leaves it unchanged, so a challenge reaches the agent exactly as the site sent it. The same limits apply to every product; see the full comparison.

No CAPTCHA solving, JavaScript rendering, retries or unblocking

netdash forwards your traffic unchanged, so a challenge reaches your client exactly as the website sent it.

Targeting below country level

You choose the exit country; you can't select a city, region, ZIP code, ASN or carrier.

Authentication by IP address

Every request uses your username and password.

A public account API or SDK

None is needed: it's a standard HTTP proxy, and usage lives in the dashboard.

Published uptime figures or an SLA

We don't publish uptime figures or offer an SLA.

Responsible use for agents

Your agent acts on your behalf, so its traffic is your traffic. Keep it to public pages and the rules of the sites it visits, give it a request budget, and have it stop when a site shows a CAPTCHA, a login wall or a rate limit. netdash forwards requests and doesn’t solve challenges. Collecting training data raises its own questions about robots.txt, terms, copyright and personal data: see AI training data scraping and how we expect netdash to be used.

Guides for agent builders

Questions about agents and proxies

No. netdash forwards traffic and doesn’t modify it, so challenges reach the agent’s browser unchanged. Build the agent to stop and hand the task to a person, or to skip the site.

Add -session-{id}-ttl-{minutes} to the username. Reusing the same session ID keeps the same exit IP for the TTL while that IP stays available. The dashboard offers sticky lifetimes from 15 minutes up to 7 days. See rotating and sticky sessions.

No. One username and password covers every residential and mobile plan on your account. Separate runs with session IDs, and keep the credentials in environment variables or a secret manager, never in prompts.

No. netdash is a standard HTTP proxy. Set it in the browser or HTTP client your agent uses; the guides for Claude Code and agent frameworks show where.

There’s no per-account concurrency limit. Each run uses GB from the plan’s balance, and purchased GB never expire; see pricing. Keep each site’s request rate reasonable.

Connect your first agent

Create an account, then give one agent run an exit country and its own session ID. The Claude Code guide walks a coding agent through the setup.

Privacy choices

We use cookies and similar technologies that this site needs to work and to remember your choice. We also use Google Analytics to understand which pages and features people use: in the EEA, the UK and Switzerland only with your consent. Live chat loads only if you open it. You can change your choice at any time under “Privacy choices” in the footer. Privacy Policy

Privacy choices

Choose what netdash.io may use. You can change this at any time under “Privacy choices” in the footer.

Necessary (always on)

Keeps the site working and secure, and remembers your privacy choices (nd_consent, 12 months).

In the EEA, the UK and Switzerland it stays off until you switch it on; elsewhere it is on unless you switch it off here. Google Analytics 4 measures page views, clicks on links and buttons, use of the price calculator, connection builder and code examples, scroll depth, file downloads, and page-performance metrics. It sets the cookies _ga and _ga_96MPNM6GHH, which last up to 12 months. Google processes this data, which may involve transfer to the United States. We do not send your name, email address or account details to Google Analytics. With this switched on we also remember a referral code or campaign you arrived with (nd_attr, 30 days), so a partner can be credited if you sign up.

Support chat (loads only when you open it)

Our live chat is provided by LiveChat. It loads only when you open the chat window. LiveChat then sets its own cookies and processes the messages you send and technical data about your browser.