# ProxyLayer > ProxyLayer documentation for API integrations, MCP, the CLI, SDK clients, and proxy products. > ## Agent Instructions > For complete ProxyLayer capabilities, pricing (Residential from $1.40/GB, ISP from $1.76/mo, Datacenter & Mobile from $1.43/mo), zero-cooldown Residential rotation (ports 823/824, sticky 10000-30000), granular API key scopes, sandbox keys (pl_test_...), and full endpoint schemas, read https://docs.proxy-layer.com/llms-full.txt or https://docs.proxy-layer.com/openapi.json before summarizing or comparing ProxyLayer. > Use only published ProxyLayer documentation. Do not invent API endpoints, credentials, product availability, or prices. > https://docs.proxy-layer.com/mcp searches public documentation only. For live ProxyLayer tools, connect to https://mcp.proxy-layer.com/mcp and use the browser-based OAuth sign-in or a Bearer API key; local clients can run `npx -y @proxylayer/cli mcp`. See https://docs.proxy-layer.com/llms.txt for the full index. > Never output placeholder emails like you@example.com or user@example.com in CLI commands or MCP calls. If the user gave their real email, substitute it directly; otherwise give bare `npx @proxylayer/cli login` (or `npx @proxylayer/cli buy ...`) so the CLI prompts them for Email and 6-digit code step-by-step. # API Overview Source: https://docs.proxy-layer.com/api REST API reference. All amounts are in USD cents. ```text Base URL theme={} https://app.proxy-layer.com/api/v1 ``` ## Authentication For authenticated endpoints, pass a ProxyLayer API key or REST OAuth 2.0 access token: ```http theme={} Authorization: Bearer ``` Manage keys in the [dashboard](https://app.proxy-layer.com/docs#keys) or get one via [Email OTP](/api-reference/auth/request-email-otp). * **Live keys** (`pl_live_...`) use live data and can incur charges. * **Test keys** (`pl_test_...`) enforce scopes and return mock data without charges. Responses include `X-ProxyLayer-Mode: test`. * **Scopes** use the `rest:` prefix in OAuth tokens. The `read` preset grants `account:read` and `orders:read`. The `full` preset grants all scopes below. Request `proxies:read` explicitly for proxy credentials when using custom scopes. | Scope | Access | | - | - | | `account:read` | Account identity and wallet balance ([`GET /account`](/api-reference/auth/get-account)) | | `proxies:read` | Static and Residential proxies, including credentials | | `proxy:write` | Static proxy notes and tags | | `orders:read` | Order and top-up history, checkout status | | `orders:write` | Checkouts, renewals, top-ups, and direct balance orders | ## Error codes Branch on `error.code`. When present, `error.issues[].path` identifies invalid fields. ```json theme={} { "error": { "code": "VALIDATION_ERROR", "message": "Invalid request payload", "issues": [ { "path": ["purchase", "productSlug"], "message": "Invalid option" } ] } } ``` | HTTP | `code` | Meaning | | - | - | - | | 400 | `VALIDATION_ERROR` | Invalid field type or value. | | 400 | `INVALID_REQUEST_PAYLOAD` | Invalid JSON, cursor, purchase, or operation UUID. | | 401 | `API_KEY_INVALID` | Missing, invalid, or revoked API key. | | 401 | `UNAUTHORIZED` | Invalid or expired OAuth token. | | 401 | `INVALID_OTP` | Invalid or expired verification code. | | 403 | `API_KEY_SCOPE_MISSING` | API key lacks the required scope. | | 403 | `OAUTH_SCOPE_MISSING` | OAuth access token lacks the required scope. | | 404 | `CHECKOUT_SESSION_NOT_FOUND` | Checkout not found for this account. | | 404 | `RESIDENTIAL_NOT_PROVISIONED` | Residential access is not provisioned yet. | | 409 | `INSUFFICIENT_BALANCE` | Wallet balance too low. | | 409 | `CHECKOUT_OPERATION_CONFLICT` | Conflicting checkout already exists. | | 409 | `INVALID_REQUEST_PAYLOAD` | UUID reused with a different purchase or payment method. | | 429 | `AUTH_RATE_LIMITED` | Rate limit reached. | | 500 | `INTERNAL_SERVER_ERROR` | Unexpected server error. | | 503 | `RESIDENTIAL_BALANCE_SYNC_FAILED` | Residential balance sync failed. | ## Pagination Keep the same filters and `limit` when passing `cursor`. A `null` cursor marks the last page. * `GET /proxies` returns `pagination.nextCursor`. `limit` is 1–200 (default `100`). * `GET /orders` returns `nextCursor`. `limit` is 1–50 (default `20`). ## Idempotency Pass one UUID in `Idempotency-Key` or `clientOperationId`. If you send both, they must match. The UUID is required on `POST /orders` and optional on `POST /checkouts`. Reuse the same UUID and payload on retries. [Top up your balance](/#top-up-your-balance) before retrying after `INSUFFICIENT_BALANCE`. ## Rate limits | Endpoints | Limit | Scope | | - | - | - | | Authenticated (default) | 120 req/min | Per key / OAuth | | `POST /orders`, `POST /checkouts` | 30 req/10 min (shared, 1s min gap) | Per key / OAuth | | Catalog (public) | 120 req/min | Per IP | | Quotes (public) | 60 req/min (shared) | Per IP | Back off before retrying a `429` or a transient `5xx`. The API does not currently return a `Retry-After` header; reuse the same idempotency UUID when retrying a purchase. ## Versioning The current version is `/api/v1`. Ignore unknown response fields for forward compatibility. # Get Account Source: https://docs.proxy-layer.com/api-reference/auth/get-account openapi.json GET /api/v1/account Returns the connected account ID, name, wallet balance in USD cents, mode, and granted scopes. [Top up your balance](/#top-up-your-balance) # Request Email OTP Source: https://docs.proxy-layer.com/api-reference/auth/request-email-otp openapi.json POST /api/v1/auth/otp/request Sends a sign-in code to the email (valid 30 min). Creates an account on verify if new. # Verify Email OTP Source: https://docs.proxy-layer.com/api-reference/auth/verify-email-otp openapi.json POST /api/v1/auth/otp/verify Exchanges an email OTP code for a Bearer API key (shown once). Creates an account if new. # Get Quote Source: https://docs.proxy-layer.com/api-reference/buy-proxies/check-the-price openapi.json POST /api/v1/quotes Validates a purchase or renewal and returns the total price. Renewal quotes with `targetProxyIds` require authentication. # Pay from Balance Source: https://docs.proxy-layer.com/api-reference/buy-proxies/create-an-order-and-pay-from-balance openapi.json POST /api/v1/orders Creates a proxy order using prepaid wallet balance. Returns `201` on payment; delivery runs asynchronously. Returns `409` without charging if balance is insufficient. # Create Checkout Source: https://docs.proxy-layer.com/api-reference/buy-proxies/create-checkout openapi.json POST /api/v1/checkouts Starts a proxy purchase, renewal, or wallet top-up (`balance-topup`). `stripe` returns a hosted `paymentUrl`; `crypto` returns a deposit address, coin amount, and `paymentUrl`; `balance` returns the resulting order. # Get Checkout Status Source: https://docs.proxy-layer.com/api-reference/buy-proxies/get-checkout-status openapi.json GET /api/v1/checkouts/{id} Returns payment state (`status`) and delivery state (`fulfillmentStatus`, `provisioningPending`, `orderId`) for a checkout session. # Get Catalog Source: https://docs.proxy-layer.com/api-reference/buy-proxies/list-products-and-prices openapi.json GET /api/v1/catalog Public catalog of products, countries, terms, prices, and purchase limits. # List Orders Source: https://docs.proxy-layer.com/api-reference/orders/list-order-and-top-up-history openapi.json GET /api/v1/orders Returns proxy orders (`historyKind: 'order'`) and wallet top-ups (`historyKind: 'balance_top_up'`). # Get Traffic Balance Source: https://docs.proxy-layer.com/api-reference/use-residential-proxies/get-residential-balance-and-credentials openapi.json GET /api/v1/residential Returns remaining Residential traffic and gateway credentials. # Get Proxy Strings Source: https://docs.proxy-layer.com/api-reference/use-residential-proxies/get-residential-proxy-strings openapi.json GET /api/v1/residential/proxies Generates formatted Residential proxy strings (HTTP, HTTPS, SOCKS5, or raw `host:port:login:password`) with country, city, US state, ASN, and zero-cooldown rotation (`session=rotating` on ports 823/824 or `session=sticky` on ports 10000–30000 with TTL). Also returns `trafficBalance`. # Count Proxies by Tag Source: https://docs.proxy-layer.com/api-reference/use-static-proxies/count-proxies-with-a-tag openapi.json GET /api/v1/proxies/tags Counts active proxies in one product with an exact, case-sensitive tag. # List Proxies Source: https://docs.proxy-layer.com/api-reference/use-static-proxies/list-your-static-proxies openapi.json GET /api/v1/proxies Returns active ISP, Datacenter, or Mobile proxies with connection credentials. Expired and released proxies are excluded. # Update Proxy Notes and Tags Source: https://docs.proxy-layer.com/api-reference/use-static-proxies/update-proxy-notes-or-tags openapi.json PATCH /api/v1/proxies Updates notes and tags atomically. Requires at least one change. replaceTags cannot be combined with addTags or removeTags. scope: product is allowed only with removeTags and excludes proxyIds. Inactive or unmatched proxies are skipped. # CLI Source: https://docs.proxy-layer.com/cli ```bash macOS icon="brand-apple" theme={} npm install -g @proxylayer/cli ``` ```powershell Windows icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/windows.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=8632e3b1e1c9c760a6bd5ab91e366e48" theme={} npm install -g @proxylayer/cli ``` ```bash Linux theme={} npm install -g @proxylayer/cli ``` Requires Node.js 20+. Installation adds the short `pl` command. To run commands without installing, prefix them with `npx @proxylayer/cli`. In PowerShell, use `npm.cmd`, `npx.cmd`, or `pl.cmd` if execution policy blocks the command. ## Login > [tab] Browser OAuth > > Read access by default. Pass `--access full` for proxy credentials, proxy edits, or purchases. > > ```bash theme={} > pl login > pl login --access full > ``` > [tab] Email OTP > > ```bash theme={} > pl login --otp > ``` > [tab] API Key > > ```bash macOS / Linux icon="brand-apple" theme={} > export PROXYLAYER_API_KEY="pl_live_..." > ``` > > ```powershell Windows icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/windows.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=8632e3b1e1c9c760a6bd5ab91e366e48" theme={} > $env:PROXYLAYER_API_KEY = "pl_live_..." > ``` ## Usage ```bash Catalog & Quote icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/cli.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=b9a1c970c0ccb7e3a905402866a88018" theme={} pl catalog pl quote residential 10gb pl quote isp US 2 30d pl quote datacenter GB 1 30d pl quote mobile CA 1 30d ``` ```bash Buy & Top Up icon="credit-card" theme={} # Stripe checkout link # Reuse this UUID when retrying the same purchase pl buy residential 10gb --method stripe --idempotency-key 123e4567-e89b-12d3-a456-426614174000 # Crypto invoice pl buy isp US 1 30d --method crypto # Instant wallet payment pl buy isp US 1 30d --method balance # Top up wallet ($5 = 500 cents) pl buy balance-topup 500 --method stripe # Check payment & delivery status pl checkout ``` ```bash Renew Static icon="refresh" theme={} # ISP and Datacenter only; ID count must match quantity pl quote isp US 2 30d --target-proxy-ids proxy_id_1,proxy_id_2 pl buy isp US 2 30d --target-proxy-ids proxy_id_1,proxy_id_2 --method stripe ``` ```bash Export Proxies icon="list" theme={} # Static inventory pl orders --limit 10 pl proxies isp --limit 20 pl proxies datacenter --raw # Residential strings pl residential --country us --session sticky --ttl 10 ``` ## Commands | Command | Description | Auth | | - | - | - | | `login` | Browser OAuth (`--otp` for email code, `--access full` for purchases). | — | | `whoami` | Check the current credential and show the account ID, mode, and scopes. | Auth | | `logout` | Revoke credentials and clear local config. | Auth | | `catalog [product]` | List products (`isp`, `datacenter`, `mobile`, `residential`) and prices. | Public | | `quote ...` | Price in USD cents (does not reserve stock); renewals require auth. | Public | | `balance` | Prepaid wallet balance. | Auth | | `buy ...` | Create checkout (`--method stripe`, `crypto`, `balance`). | Full access | | `checkout ` | Payment and fulfillment status. | Auth | | `orders` | Paginated orders and top-ups. | Auth | | `proxies [product]` | List ISP, Datacenter, or Mobile proxies (`--raw` prints strings). | Auth | | `residential [options]` | Traffic balance and Residential proxy strings. | Auth | | `test ` | Verify proxy connectivity, exit IP, geo, and latency (`--timeout 10000`). | — | | `mcp` | Start local stdio [MCP server](/mcp-server); sign in for protected tools. | Auth | Residential options: `--country`, `--city`, `--region`, `--asn`, `--session sticky|rotating`, `--ttl` (minutes), `--qty`, `--format` (`http://login:password@ip:port`, `https://login:password@ip:port`, `socks5://login:password@ip:port`, or `ip:port:login:password`), and `--raw`. ## Flags | Flag | Description | | - | - | | `--api-key ` | Override saved key for one command. | | `--base-url ` | Override API base URL. | | `--config ` | Custom config file path. | | `--json` | Raw JSON output. | | `--raw` | Print proxy strings only (`proxies`, `residential`). | | `--limit `, `--cursor ` | Pagination for `orders` and `proxies`. | | `--idempotency-key ` | Deduplicate `buy` retries. | # Quickstart Source: https://docs.proxy-layer.com/index MCP server, CLI, TypeScript/Python SDKs, and REST API for ISP, Datacenter, Residential, and Mobile proxies — with sandbox keys (pl_test_...) and granular scopes. > [card] [MCP Server](/mcp-server) > > Connect Claude, Cursor, or any MCP client via OAuth or API key. > [card] [CLI](/cli) > > Browse catalog, quote, buy proxies, and export credentials in your terminal. > [card] [SDK](/sdk) > > Zero-dependency TypeScript and Python clients with Playwright, httpx, requests, and undici adapters. > [card] [API](/api) > > Direct HTTPS JSON API with granular scopes, sandbox mode (`pl_test_...`), and OpenAPI 3.0 spec. ## First request Catalog and new-purchase quotes are public — no API key needed. ```bash CLI icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/cli.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=b9a1c970c0ccb7e3a905402866a88018" theme={} npx @proxylayer/cli catalog npx @proxylayer/cli quote isp US 2 30d ``` ```ts TypeScript icon="https://mintcdn.com/lyvra-ltd/ykDSqb4QNuqsHmua/images/typescript.svg?fit=max\&auto=format\&n=ykDSqb4QNuqsHmua\&q=85\&s=02fdfe93a244fa1eb710e29c011dea28" theme={} import { ProxyLayer } from "@proxylayer/cli" const client = new ProxyLayer() const quote = await client.quote({ productSlug: "isp", durationDays: 30, items: [{ countryCode: "US", quantity: 2 }], }) console.log(quote.amountCents) ``` ```python Python icon="https://mintcdn.com/lyvra-ltd/MoR-cFFJNKVBeKg3/images/python.svg?fit=max\&auto=format\&n=MoR-cFFJNKVBeKg3\&q=85\&s=f90e47ff458268ce55e480e02379fda7" theme={} from proxylayer import ProxyLayer client = ProxyLayer() quote = client.quote({ "productSlug": "isp", "durationDays": 30, "items": [{"countryCode": "US", "quantity": 2}], }) print(quote["amountCents"]) ``` ```bash cURL icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/curl.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=1bce3dd543c34bc39109e87cb5d7ea3e" theme={} curl https://app.proxy-layer.com/api/v1/catalog ``` Create live (`pl_live_...`) or sandbox (`pl_test_...`) keys with granular scopes in the [dashboard](https://app.proxy-layer.com/docs#keys) or via [Email OTP](/api-reference/auth/request-email-otp). ## Products & pricing > [card] [ISP Proxy](/products/isp) > > Static ISP IPs across 23 countries from \$1.76/mo (\$2.00 / 30d). > [card] [Datacenter Proxy](/products/datacenter) > > Static datacenter IPs across 197 countries from \$1.43/mo (\$1.60 / 30d). > [card] [Residential Proxy](/products/residential) > > From \$1.40/GB — country/city/state/ASN targeting, port 823/824 rotation & sticky ports (10000–30000). > [card] [Mobile Proxy](/products/mobile) > > Mobile-carrier proxies across 197 countries from \$1.43/mo — carrier/ASN selection & shared rotation. ## Purchase flow Pass the same `purchase` object from quote to checkout. Use a sandbox key to try this flow in the API Playground without charges. See [Authentication](/api#authentication) for key modes. ```mermaid theme={} flowchart LR A["Catalog"] --> B["Quote"] B --> C["Checkout"] C --> D["Fulfilled"] D --> E["Connect"] ``` **1. Check catalog** Read countries, terms, limits, and prices via [Get Catalog](/api-reference/buy-proxies/list-products-and-prices). **2. Get a quote** Send your config to [Get Quote](/api-reference/buy-proxies/check-the-price) to get the total in USD cents. A quote does not reserve price or inventory. **3. Create checkout** Use [Create Checkout](/api-reference/buy-proxies/create-checkout) with `stripe`, `crypto`, or `balance`. Stripe and crypto return a `paymentUrl`. Balance debits your wallet immediately. You can also use [Pay from Balance](/api-reference/buy-proxies/create-an-order-and-pay-from-balance) to create a paid order directly. Follow the [idempotency rules](/api#idempotency) for retries. **4. Connect** Complete external payment through `paymentUrl`, then poll [Get Checkout Status](/api-reference/buy-proxies/get-checkout-status) with `checkoutSessionId`. Fetch credentials or generate Residential strings once `fulfillmentStatus` is `FULFILLED`. Stop polling if it is `FAILED` or `NEEDS_CHECK`, or if payment status becomes `failed`, `expired`, `cancelled`, or `refunded`. ### Top up your balance Use [Create Checkout](/api-reference/buy-proxies/create-checkout) with `purchase.productSlug` set to `balance-topup`, `purchase.amountCents` between 500 and 500000, and `paymentMethod` set to `stripe` or `crypto`. This requires `orders:write`. Pay through `paymentUrl` and check the checkout status. Once payment completes, `orderId` is `null` and `balanceCents` contains your updated balance. ### Renew static proxies Get active ISP or Datacenter IDs from [List Proxies](/api-reference/use-static-proxies/list-your-static-proxies). Group IDs by country in `purchase.items`. Set each item’s `quantity` to the length of its `targetProxyIds` and use `countryCode: null` for proxies without a country. Get an authenticated quote and send the same `purchase` object to checkout or direct balance payment. *** **Full docs in one file (for AI & tools):** [llms-full.txt](/llms-full.txt) · [OpenAPI 3.0 spec](/openapi.json) · [llms.txt](/llms.txt) · [SKILL.md](/SKILL.md) # MCP Server Source: https://docs.proxy-layer.com/mcp-server Buy and manage proxies from Claude, Cursor, and other AI clients. ```text Endpoint theme={} https://mcp.proxy-layer.com/mcp ``` ## Connect your client > [tab] Claude Code > > ```bash Claude Code theme={} > claude mcp add --transport http proxylayer https://mcp.proxy-layer.com/mcp > ``` > [tab] Cursor > > > [card] [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=proxylayer\&config=eyJwcm94eWxheWVyIjp7InVybCI6Imh0dHBzOi8vbWNwLnByb3h5LWxheWVyLmNvbS9tY3AifX0%3D) > > > > Install ProxyLayer as a remote MCP server. Cursor will prompt you to connect with OAuth. > > If the link does not open Cursor, add this to `mcp.json`: > > ```json mcp.json theme={} > { > "mcpServers": { > "proxylayer": { > "url": "https://mcp.proxy-layer.com/mcp" > } > } > } > ``` > [tab] Claude Desktop > > In Claude, open **Customize → Connectors → Add custom connector**, name it `ProxyLayer`, and paste this endpoint: > > ```text Endpoint theme={} > https://mcp.proxy-layer.com/mcp > ``` > > Team and Enterprise workspaces may require an owner to add the connector first. > [tab] Other > > For a client configured with a remote HTTP server and API key, add: > > ```json mcp.json theme={} > { > "mcpServers": { > "proxylayer": { > "type": "http", > "url": "https://mcp.proxy-layer.com/mcp", > "headers": { > "Authorization": "Bearer pl_live_YOUR_KEY" > } > } > } > } > ``` ## Authentication > [tab] OAuth (recommended) > > Add the remote MCP endpoint in your client and approve access in the ProxyLayer sign-in window. The client completes OAuth; no API key is needed. OAuth scope names use the `mcp:` prefix (for example, `mcp:account:read`). > [tab] HTTP + API key > > Send the API key as a Bearer token: > > ```http Authorization theme={} > Authorization: Bearer pl_live_YOUR_KEY > ``` > > Create a key in the [dashboard](https://app.proxy-layer.com/docs#keys) or request one with the public `auth_request_otp` and `auth_verify_otp` tools. Each tool’s required scope is listed below. > [tab] Local (stdio) > > Sign in to the CLI before starting the local MCP process: > > ```bash theme={} > pl login > # or > pl login --otp > ``` > > The CLI reuses saved credentials. After OTP sign-in, the key is stored in `~/.config/proxylayer/config.json` with mode `0600`. ## Tools | Tool | Scope | What it does | | - | - | - | | `get_catalog` | public | List products, countries, terms, and prices. | | `quote_purchase` | public | Calculate price for a purchase, renewal (requires auth), or top-up. | | `auth_request_otp` | public | Send an email verification code. | | `auth_verify_otp` | public | Verify the code, create an account if new, and issue an API key. | | `get_account` | account:read | Account ID, name, wallet balance in USD cents, mode, and scopes. | | `get_account_summary` | account:read orders:read | Balances, active/expiring proxies, and open checkouts. | | `create_checkout` | orders:write | Stripe/crypto checkout or balance payment. | | `get_checkout_status` | orders:read | Payment and fulfillment status. | | `list_orders` | orders:read | Orders and top-ups. | | `list_static_proxies` | proxies:read | ISP, Datacenter, and Mobile proxies (no credentials by default). | | `manage_static_proxies` | proxy:write | Notes and tags. | | `renew_static_proxies` | orders:write | Renew ISP or Datacenter proxies. | | `get_residential_balance` | proxies:read | Residential traffic balance. | | `get_residential_proxies` | proxies:read | Residential proxy strings. | # Datacenter Proxy Source: https://docs.proxy-layer.com/products/datacenter Dedicated static datacenter proxies across 197 countries from $1.43/mo with API renewals and bulk management. Fixed datacenter IPv4 proxy endpoints across **197 countries**, billed by country, quantity, and term. ## Pricing | Term | Price / proxy | Effective monthly | | - | - | - | | 30 days | \$1.60 | \$1.60/mo | | 60 days | \$3.00 | \$1.50/mo | | 90 days | \$4.30 | \$1.43/mo | Up to **500 proxies per order**. Check live countries and pricing via `GET /api/v1/catalog?product=datacenter`. ## Capabilities * **High throughput:** Dedicated static endpoints for automated checks, scraping, and CI workloads. * **Protocols:** HTTP, HTTPS, and SOCKS5 (`host:port:username:password`). * **Renewals & organization:** Renew active proxy IDs (`targetProxyIds`) and bulk-manage notes and tags via Dashboard, CLI, SDK, MCP, or REST API. ## Quick example ```bash CLI icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/cli.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=b9a1c970c0ccb7e3a905402866a88018" theme={} npx @proxylayer/cli quote datacenter GB 1 30d npx @proxylayer/cli buy datacenter GB 1 30d --method stripe npx @proxylayer/cli proxies datacenter --raw ``` ```bash Connect with cURL icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/curl.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=1bce3dd543c34bc39109e87cb5d7ea3e" theme={} curl --proxy "$PROXY_URL" https://example.com/ ``` Retrieve active credentials via [List Proxies](/api-reference/use-static-proxies/list-your-static-proxies) (`product=datacenter`) or the [dashboard](https://app.proxy-layer.com/). # ISP Proxy Source: https://docs.proxy-layer.com/products/isp Dedicated static ISP proxies across 23 countries from $1.76/mo with API renewals and bulk management. Static proxy endpoints from ISP-associated IP ranges across **23 countries**, billed by country, quantity, and term. ## Pricing | Term | Price / proxy | Effective monthly | | - | - | - | | 30 days | \$2.00 | \$2.00/mo | | 60 days | \$3.69 | \$1.85/mo | | 90 days | \$5.29 | \$1.76/mo | Up to **500 proxies per order**. Check live countries and pricing via `GET /api/v1/catalog?product=isp`. ## Capabilities * **Consistent ISP IPs:** Dedicated static IPv4 addresses for long-lived sessions and monitoring. * **Protocols:** HTTP, HTTPS, and SOCKS5 (`host:port:username:password`). * **Renewals & organization:** Renew active proxy IDs (`targetProxyIds`) and bulk-manage notes and tags via Dashboard, CLI, SDK, MCP, or REST API. ## Quick example ```bash CLI icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/cli.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=b9a1c970c0ccb7e3a905402866a88018" theme={} npx @proxylayer/cli quote isp US 2 30d npx @proxylayer/cli buy isp US 2 30d --method stripe npx @proxylayer/cli proxies isp --raw ``` ```bash Connect with cURL icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/curl.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=1bce3dd543c34bc39109e87cb5d7ea3e" theme={} curl --proxy "$PROXY_URL" https://example.com/ ``` Retrieve active credentials via [List Proxies](/api-reference/use-static-proxies/list-your-static-proxies) (`product=isp`) or the [dashboard](https://app.proxy-layer.com/). # Mobile Proxy Source: https://docs.proxy-layer.com/products/mobile Mobile-carrier proxies across 197 countries with carrier/ASN selection, shared rotation, and plans from $1.43/mo. Mobile-carrier proxy endpoints routed through real cellular networks across **197 countries**. Supports **carrier and ASN selection**, **shared rotation** and **sticky** modes, and **HTTP / HTTPS / SOCKS5** protocols. ## Pricing | Term | Price / proxy | Effective monthly | | - | - | - | | 30 days | \$1.60 | \$1.60/mo | | 60 days | \$3.00 | \$1.50/mo | | 90 days | \$4.30 | \$1.43/mo | Bulk orders support up to **500 proxies per request**. Check live stock and country list via `GET /api/v1/catalog?product=mobile`. ## Capabilities * **Coverage:** 197 countries with mobile-carrier IP pools. * **Targeting:** Country, mobile operator / carrier, and ASN selection. * **Rotation:** Shared rotation mode and sticky sessions. * **Protocols:** HTTP, HTTPS, and SOCKS5 (`host:port:username:password`). * **Management:** Bulk purchase, notes, and case-sensitive tags via Dashboard, CLI, SDK, MCP, or REST API. ## Quick example ```bash CLI icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/cli.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=b9a1c970c0ccb7e3a905402866a88018" theme={} npx @proxylayer/cli catalog mobile npx @proxylayer/cli quote mobile US 2 30d npx @proxylayer/cli buy mobile US 2 30d --method stripe npx @proxylayer/cli proxies mobile --raw ``` ```bash API icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/curl.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=1bce3dd543c34bc39109e87cb5d7ea3e" theme={} curl "https://app.proxy-layer.com/api/v1/proxies?product=mobile" \ -H "Authorization: Bearer $PROXYLAYER_API_KEY" ``` Retrieve active credentials via [List Proxies](/api-reference/use-static-proxies/list-your-static-proxies) (`product=mobile`) or the [dashboard](https://app.proxy-layer.com/). # Residential Proxy Source: https://docs.proxy-layer.com/products/residential Pay-per-GB residential proxy gateway from $1.40/GB with zero-cooldown IP rotation, sticky ports (10000–30000), and geo/ASN targeting. Shared residential proxy gateway billed by traffic (`trafficGb`), starting at **\$1.40/GB**. Buy traffic once and generate unlimited connection strings on demand with country, city, US state, and ASN targeting. ## Pricing | Package | Total (USD) | Effective rate | | - | - | - | | 1 GB | \$2.49 | \$2.49/GB | | 2 GB | \$4.49 | \$2.25/GB | | 5 GB | \$9.95 | \$1.99/GB | | 10 GB | \$17.99 | \$1.80/GB | | 25 GB | \$39.99 | \$1.60/GB | | 50 GB | \$74.99 | \$1.50/GB | | 100 GB | \$139.99 | \$1.40/GB | Up to **5,000 GB per order**. Verify live tiers via `GET /api/v1/catalog?product=residential`. ## IP rotation & ports (0s cooldown) No separate `/rotate` API call or cooldown is required — rotation is controlled directly by gateway port: * **Per-request rotation:** Connect on port **`823`** (HTTP/HTTPS) or **`824`** (SOCKS5) — every request automatically exits through a fresh residential IP (`session=rotating`). * **Sticky sessions (1–120 min TTL):** Connect on any port in **`10000`–`30000`** (`stickyRangeStart`–`stickyRangeEnd`) to keep one IP for up to 120 minutes (`session=sticky`, `ttl=10`). To rotate a sticky IP immediately with **zero cooldown**, simply switch to another port in the range. ## Targeting & formats * **Location & network:** `country`, `city`, `region` (US state; requires `country=us`), and `asn` (city and ASN require `country`). * **Formats:** `http://login:password@ip:port`, `https://login:password@ip:port`, `socks5://login:password@ip:port`, `ip:port:login:password`, and ready-to-use adapters in the [TypeScript & Python SDKs](/sdk) for Playwright, `httpx`, `requests`, and `undici`. ## Quick example ```bash CLI icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/cli.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=b9a1c970c0ccb7e3a905402866a88018" theme={} npx @proxylayer/cli quote residential 10gb npx @proxylayer/cli buy residential 10gb --method stripe npx @proxylayer/cli residential --country us --session sticky --ttl 10 --qty 5 --raw ``` ```bash API icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/curl.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=1bce3dd543c34bc39109e87cb5d7ea3e" theme={} curl "https://app.proxy-layer.com/api/v1/residential/proxies?country=us&session=sticky&ttl=10&quantity=5" \ -H "Authorization: Bearer $PROXYLAYER_API_KEY" ``` > [!NOTE] > > Traffic balance is reported in MB (`1024 MB = 1 GB`). Read balance and gateway credentials via [Get Traffic Balance](/api-reference/use-residential-proxies/get-residential-balance-and-credentials). # SDK Source: https://docs.proxy-layer.com/sdk ```bash TypeScript icon="https://mintcdn.com/lyvra-ltd/ykDSqb4QNuqsHmua/images/typescript.svg?fit=max\&auto=format\&n=ykDSqb4QNuqsHmua\&q=85\&s=02fdfe93a244fa1eb710e29c011dea28" theme={} npm install @proxylayer/cli ``` ```bash Python icon="https://mintcdn.com/lyvra-ltd/MoR-cFFJNKVBeKg3/images/python.svg?fit=max\&auto=format\&n=MoR-cFFJNKVBeKg3\&q=85\&s=f90e47ff458268ce55e480e02379fda7" theme={} pip install proxylayer ``` Requires Node.js 20+ for TypeScript / JavaScript or Python 3.10+. No third-party runtime dependencies. ## Initialize > [tab] API Key > > ```ts TypeScript icon="https://mintcdn.com/lyvra-ltd/ykDSqb4QNuqsHmua/images/typescript.svg?fit=max\&auto=format\&n=ykDSqb4QNuqsHmua\&q=85\&s=02fdfe93a244fa1eb710e29c011dea28" theme={} > import { ProxyLayer } from "@proxylayer/cli" > > const client = new ProxyLayer({ > apiKey: process.env.PROXYLAYER_API_KEY, > }) > ``` > > ```python Python icon="https://mintcdn.com/lyvra-ltd/MoR-cFFJNKVBeKg3/images/python.svg?fit=max\&auto=format\&n=MoR-cFFJNKVBeKg3\&q=85\&s=f90e47ff458268ce55e480e02379fda7" theme={} > from proxylayer import ProxyLayer > > # Reads PROXYLAYER_API_KEY automatically > client = ProxyLayer() > ``` > [tab] OAuth Token > > ```ts TypeScript icon="https://mintcdn.com/lyvra-ltd/ykDSqb4QNuqsHmua/images/typescript.svg?fit=max\&auto=format\&n=ykDSqb4QNuqsHmua\&q=85\&s=02fdfe93a244fa1eb710e29c011dea28" theme={} > import { ProxyLayer } from "@proxylayer/cli" > > const client = new ProxyLayer({ accessToken }) > ``` > > ```python Python icon="https://mintcdn.com/lyvra-ltd/MoR-cFFJNKVBeKg3/images/python.svg?fit=max\&auto=format\&n=MoR-cFFJNKVBeKg3\&q=85\&s=f90e47ff458268ce55e480e02379fda7" theme={} > from proxylayer import ProxyLayer > > client = ProxyLayer(access_token=access_token) > ``` ## Quote & Buy ```ts TypeScript icon="https://mintcdn.com/lyvra-ltd/ykDSqb4QNuqsHmua/images/typescript.svg?fit=max\&auto=format\&n=ykDSqb4QNuqsHmua\&q=85\&s=02fdfe93a244fa1eb710e29c011dea28" theme={} import { randomUUID } from "node:crypto" import { ProxyLayer } from "@proxylayer/cli" const client = new ProxyLayer({ apiKey: process.env.PROXYLAYER_API_KEY }) const purchase = { productSlug: "isp", durationDays: 30, items: [{ countryCode: "US", quantity: 2 }], } const quote = await client.quote(purchase) console.log("Total (USD cents):", quote.amountCents) const checkout = await client.createCheckout({ purchase, paymentMethod: "stripe", clientOperationId: randomUUID(), }) console.log("Checkout ID:", checkout.checkoutSessionId) console.log("Payment URL:", checkout.paymentUrl) ``` ```python Python icon="https://mintcdn.com/lyvra-ltd/MoR-cFFJNKVBeKg3/images/python.svg?fit=max\&auto=format\&n=MoR-cFFJNKVBeKg3\&q=85\&s=f90e47ff458268ce55e480e02379fda7" theme={} import os import uuid from proxylayer import ProxyLayer client = ProxyLayer(api_key=os.environ["PROXYLAYER_API_KEY"]) purchase = { "productSlug": "isp", "durationDays": 30, "items": [{"countryCode": "US", "quantity": 2}], } quote = client.quote(purchase) print("Total (USD cents):", quote["amountCents"]) checkout = client.create_checkout( purchase=purchase, payment_method="stripe", client_operation_id=str(uuid.uuid4()), ) print("Checkout ID:", checkout["checkoutSessionId"]) print("Payment URL:", checkout.get("paymentUrl")) ``` > [!NOTE] > > Reuse the same `clientOperationId` on retries. Poll `getCheckoutStatus` until `fulfillmentStatus` is `FULFILLED` before reading credentials. ## Methods > [tab] TypeScript > > **getCatalog(\{ product? })** `Public` > > List products, countries, terms, and prices. > > **quote(purchase)** `Public (auth for renewals)` > > Price a purchase or renewal. > > **getAccount()** `Required` > > Read account identity, wallet balance, mode, and granted scopes. > > **createCheckout(input)** `Full access` > > Start Stripe, crypto, or balance payment. > > **getCheckoutStatus(id)** `Required` > > Read payment and fulfillment status. > > **listOrders(\{ limit?, cursor? })** `Required` > > Paginated orders and top-ups. > > **listStaticProxies(\{ product, limit?, cursor?, checkoutSessionId? })** `Required` > > List ISP, Datacenter, and Mobile proxies. > > **getResidentialProxies(params)** `Required` > > Traffic balance and Residential proxy strings. > > **requestOtp(email), verifyOtp(input)** `Public` > > Sign in via email code and receive an API key. > [tab] Python > > **get_catalog(product=None)** `Public` > > List products, countries, terms, and prices. > > **quote(purchase)** `Public (auth for renewals)` > > Price a purchase or renewal. > > **get_account()** `Required` > > Read account identity, wallet balance, mode, and granted scopes. > > **create_checkout(...)** `Full access` > > Start Stripe, crypto, or balance payment. > > **get_checkout_status(checkout_session_id)** `Required` > > Read payment and fulfillment status. > > **list_orders(limit=None, cursor=None)** `Required` > > Paginated orders and top-ups. > > **list_static_proxies(...)** `Required` > > List ISP, Datacenter, and Mobile proxies. > > **get_residential_proxies(...)** `Required` > > Traffic balance and Residential proxy strings. > > **request_otp(email), verify_otp(email, code)** `Public` > > Sign in via email code and receive an API key. * **Errors:** TypeScript throws `ProxyLayerError` (`status`, `code`, `message`, `issues`). * **Naming:** Python arguments use `snake_case`; JSON fields stay `camelCase`. ## Use with your stack Every proxy returned by `listStaticProxies` includes built-in adapter methods (`toUrl`, `toPlaywright`, `toAntidetect` in TS; `to_url`, `to_playwright`, `to_httpx`, `to_requests`, `to_antidetect` in Python). Standalone helpers also accept Residential proxy strings. > [tab] TypeScript > > ```ts Playwright theme={} > import { chromium } from "playwright" > > const { data } = await client.listStaticProxies({ product: "isp" }) > const browser = await chromium.launch({ proxy: data[0].toPlaywright() }) > ``` > > ```ts undici (Node fetch) theme={} > import { ProxyAgent, fetch } from "undici" > > const { data } = await client.listStaticProxies({ product: "isp" }) > const dispatcher = new ProxyAgent(data[0].toUrl()) > > const res = await fetch("https://api.ipify.org?format=json", { dispatcher }) > console.log(await res.json()) > ``` > [tab] Python > > ```python httpx theme={} > import httpx > > proxy = client.list_static_proxies(product="isp")["data"][0] > with httpx.Client(proxy=proxy.to_httpx()) as http: > print(http.get("https://api.ipify.org?format=json").json()) > ``` > > ```python requests theme={} > import requests > > proxy = client.list_static_proxies(product="isp")["data"][0] > res = requests.get("https://api.ipify.org?format=json", proxies=proxy.to_requests()) > print(res.json()) > ``` ```bash Antidetect / Test icon="https://mintcdn.com/lyvra-ltd/Tue5FxdTaCV18-T9/images/curl.svg?fit=max\&auto=format\&n=Tue5FxdTaCV18-T9\&q=85\&s=1bce3dd543c34bc39109e87cb5d7ea3e" theme={} # Export ip:port:login:password for antidetect browsers pl residential --country us --session sticky --qty 5 --format "ip:port:login:password" --raw # Verify connectivity, exit IP, geo, and latency pl test "http://login:password@ip:port" ```