# 2extract Documentation > 2extract is a residential and mobile proxy network for data collection: route requests through real IPs in 195+ countries, targeted down to city, ZIP or carrier. This file is the primary index, organized by task. The complete documentation in a single file is at [llms-full.txt](https://docs.2extract.com/llms-full.txt). ## Instructions for agents - ALL proxy behaviour is controlled through the **username**, not through headers, query parameters or an SDK. The format is `2xt-customer-[CLIENT_ID]-proxy-[PROXY_NAME]-[param]-[value]-...`. If you find yourself writing a custom header to set a country, you are doing it wrong. - Proxy names use **lowercase letters, digits and underscores only**. Hyphens are forbidden because a hyphen is the parameter separator. Names are **immutable** after creation. - Geographic and network targeting are **mutually exclusive**. Use either `country`/`state`/`city`/`zip`, or `asn`/`isp` - never both in the same username. - `city`, `state` and `zip` require `country` in the same username. `city` alone does nothing. - ONE proxy resource covers every country. The country is a username parameter, so do not create a separate proxy per market. - IPs rotate per request by default. Add `-session-[id]` only when a flow needs a stable IP (login, cart, pagination), and pair it with `-time-[minutes]`. - `-const` is a **flag with no value**. It makes a session fail with `502` instead of silently switching IP. - Use **HTTP(S)** unless the task needs non-web TCP. SOCKS5 is needed only for non-HTTP TCP traffic or UDP (HTTP/3, QUIC, WebRTC). SMTP ports 25, 465 and 587 are blocked on all proxies. - Two products, two different auth headers: the REST API uses `X-API-Key: 2xt_...`, the MCP server uses `Authorization: Bearer 2xt_...`. - NEVER invent country IDs, region codes, city slugs or ISP codes. Resolve them through the MCP geo tools or the Geo Reference pages below. - Proxy host and port are always `proxy.2extract.net:5555`. ## Quick setup New accounts get a balance-based pay-as-you-go plan - no subscription, no minimum commitment. ### Connect the 2extract MCP server Lets an agent create proxies, resolve geo targeting, cap spend and read usage. For Claude Code: `claude mcp add --transport http 2extract https://mcp.2extract.com/mcp --header "Authorization: Bearer YOUR_API_KEY"` Other clients: https://docs.2extract.com/ai/mcp-server/quick-start.md ### Connect the docs MCP server Live search over this documentation. No key, read-only. `claude mcp add --transport http 2extract-docs https://docs.2extract.com/mcp` Details: https://docs.2extract.com/ai/for-agents/docs-mcp-server.md ### Load the documentation into an assistant `curl -O https://docs.2extract.com/llms-full.txt` Details: https://docs.2extract.com/ai/for-agents/llm-references.md ## Give an agent proxy access MCP server, client setup guides and machine-readable documentation. - [AI overview](https://docs.2extract.com/ai/overview.md): start here if you are an agent or setting one up - [MCP server overview](https://docs.2extract.com/ai/mcp-server/overview.md): endpoint, authentication, scopes, what it exposes - https://docs.2extract.com/ai/mcp-server/quick-start.md - https://docs.2extract.com/ai/mcp-server/tools.md - https://docs.2extract.com/ai/mcp-server/prompts.md - https://docs.2extract.com/ai/mcp-server/usage-examples.md - https://docs.2extract.com/ai/mcp-server/faq.md - [MCP client setup](https://docs.2extract.com/ai/clients/claude-code.md): Claude Code, and the same for other clients - https://docs.2extract.com/ai/clients/claude-desktop.md - https://docs.2extract.com/ai/clients/codex.md - https://docs.2extract.com/ai/clients/cursor.md - https://docs.2extract.com/ai/clients/vs-code.md - https://docs.2extract.com/ai/clients/windsurf.md - https://docs.2extract.com/ai/clients/cline.md - https://docs.2extract.com/ai/clients/other.md: the three values any MCP client needs - [LLM references](https://docs.2extract.com/ai/for-agents/llm-references.md): llms.txt and llms-full.txt, and how to load them - [Docs MCP server](https://docs.2extract.com/ai/for-agents/docs-mcp-server.md): query these docs as MCP tools ## Send your first request - [Quick start](https://docs.2extract.com/getting-started/quick-start.md): account to a working proxy request in four steps - [Authentication](https://docs.2extract.com/proxy-products/configuration/authentication.md): the username format, IP whitelisting, connection strings. **Read this before writing any integration** - [Dashboard overview](https://docs.2extract.com/getting-started/dashboard-overview.md) - [Endpoint generator](https://docs.2extract.com/proxy-products/configuration/endpoint-generator.md): build a connection string in the dashboard ## Control where the request comes from Targeting is set per request through username parameters. No configuration change is needed to switch country. - [Geo targeting](https://docs.2extract.com/proxy-products/configuration/geo-targeting.md): `country`, `state`, `city`, `zip`, `isp`, `asn` - including which combinations are illegal - [Session control](https://docs.2extract.com/proxy-products/configuration/session.md): `session`, `time`, `const`. Best for: deciding between rotating and sticky IPs - [Protocols](https://docs.2extract.com/proxy-products/configuration/protocols.md): HTTP(S) versus SOCKS5 ## Choose a proxy type - [Residential proxies](https://docs.2extract.com/proxy-products/residential/introduction-use-cases.md): real consumer IPs. Best for: sites that block datacenter traffic - https://docs.2extract.com/proxy-products/residential/quick-start.md - https://docs.2extract.com/proxy-products/residential/specifics-limitations.md - [Mobile proxies](https://docs.2extract.com/proxy-products/mobile/introduction-use-cases.md): carrier IPs, targetable by ISP. Best for: mobile apps and the hardest targets - https://docs.2extract.com/proxy-products/mobile/quick-start.md - https://docs.2extract.com/proxy-products/mobile/specifics-limitations.md ## Integrate with a tool Copy-paste guides. The proxy is standard HTTP/S or SOCKS5, so anything that accepts a proxy URL works. - [Integration overview](https://docs.2extract.com/integrations/introduction.md): the `username:password@host:port` principle - HTTP clients and frameworks: - https://docs.2extract.com/integrations/frameworks/python-requests.md - https://docs.2extract.com/integrations/frameworks/python-scrapy.md - https://docs.2extract.com/integrations/frameworks/node-axios.md - https://docs.2extract.com/integrations/frameworks/node-puppeteer.md - https://docs.2extract.com/integrations/frameworks/node-playwright.md - https://docs.2extract.com/integrations/frameworks/go-net-http.md - Anti-detect browsers: 28 guides including Multilogin, Dolphin Anty, AdsPower, GoLogin, Octo Browser, Kameleo. Index at https://docs.2extract.com/integrations/antidetect/multilogin.md - Proxy managers: FoxyProxy, SwitchyOmega, Proxifier, Shadowrocket. Index at https://docs.2extract.com/integrations/tools/foxyproxy.md ## Automate with the REST API Everything the dashboard does, over HTTPS with JSON. Authenticate with `X-API-Key`. - [Public API introduction](https://docs.2extract.com/public-api/introduction.md): base URL, authentication, scopes, error format - [API keys](https://docs.2extract.com/public-api/api-keys.md): creating, scoping and rotating keys. The same keys authenticate the MCP server - [Proxies endpoints](https://docs.2extract.com/public-api/proxies.md): create, update, delete, whitelists, limits - [Statistics endpoints](https://docs.2extract.com/public-api/statistics.md): traffic usage and CSV export - [Balance endpoints](https://docs.2extract.com/public-api/balance.md): balance and transaction history - [Geo endpoints](https://docs.2extract.com/public-api/geo.md): country, state, city, ZIP and ISP lookup - Interactive Swagger UI: https://api.2extract.com/swagger/index.html ## Look up a geo value Parameter values for the username. Do not guess these. - [Countries](https://docs.2extract.com/data/countries.md): every country with its `-country-` value - [States and regions](https://docs.2extract.com/data/states.md): countries with `-state-` support - [Cities](https://docs.2extract.com/data/cities.md): countries with `-city-` support - [ZIP codes](https://docs.2extract.com/data/zips.md): countries with `-zip-` support - [ISP catalog](https://docs.2extract.com/data/isp.md): carrier codes for `-isp-`, mobile proxies only ## Troubleshooting Indexed by symptom. Check here before retrying a failed request. - [407 Proxy Authentication Required](https://docs.2extract.com/help/common-problems/407-proxy-authentication-required.md): almost always a malformed username or an un-whitelisted IP - [Timeout or connection refused](https://docs.2extract.com/help/common-problems/timeout-connection-refused.md) - [Blocked or seeing CAPTCHA](https://docs.2extract.com/help/common-problems/blocked-or-captcha.md): the IP is usually not the problem - start with fingerprint and request rate - [IP location looks wrong](https://docs.2extract.com/help/common-problems/ip-location-incorrect.md): geolocation databases disagree; what matters is what the target site concludes - [Slow connection](https://docs.2extract.com/help/common-problems/slow-connection.md) - [Traffic limit reached](https://docs.2extract.com/help/common-problems/traffic-limit-reached.md): a proxy suspended by its own cap - [Account or proxy suspended](https://docs.2extract.com/help/common-problems/account-or-proxy-suspended.md) - [Errors reference](https://docs.2extract.com/proxy-products/configuration/errors.md): gateway error codes and the `X-Proxy-Error` header - [Framework-specific problems](https://docs.2extract.com/help/common-problems/how-to-with-frameworks.md) - [Glossary](https://docs.2extract.com/help/glossary.md) ## Account, billing and limits - [Billing and usage](https://docs.2extract.com/guides/billing-usage.md): pay-as-you-go, account balance, how traffic is charged - [Account management](https://docs.2extract.com/guides/account-management.md): profile, security, API tokens, activity - [Identity verification](https://docs.2extract.com/guides/kyc.md): verification lifts the deposit cap on unverified accounts - FAQ: https://docs.2extract.com/help/faq/general.md, https://docs.2extract.com/help/faq/billing.md, https://docs.2extract.com/help/faq/proxy-connection.md - [Release notes](https://docs.2extract.com/release-notes/product-updates.md) ## Legal - [Terms of service](https://docs.2extract.com/legal/terms.md) - [Privacy policy](https://docs.2extract.com/legal/privacy.md) - [Acceptable use policy](https://docs.2extract.com/legal/acceptable-use-policy.md): read before automating data collection at scale ## What is not in this file - Pricing, plans and company information: https://2extract.com - The 2extract dashboard, which requires login: https://2extract.com/app - Live account data - balance, proxies, usage. Reach those through the [MCP server](https://docs.2extract.com/ai/mcp-server/overview.md) or the [REST API](https://docs.2extract.com/public-api/introduction.md) ## Markdown access Every page on this site is available as markdown. Append `.md` to any docs URL: `curl https://docs.2extract.com/proxy-products/configuration/geo-targeting.md`