Buy dynamic residential traffic first, then collect a complete host, port, username, and password. This page follows the official Dynamic Resource 2 guide and dynamic traffic and extract: save the accountId from the purchase response, call extract, and pass the returned fields to your client. Do not assemble or rewrite the username. For the API overview see API integration; for string formats see proxy format. English API getting-started pages live at Quickstart and Authentication.
ZTProxy also offers static residential proxies (billed per IP per month). Static host and auth values are read from the order list after provisioning. Do not apply this extract flow to a static order. Examples are fake placeholders, not production endpoints. Authorized targets only. Not supported in mainland China.
What to prepare
| Item | Where it comes from |
|---|---|
| Purchased dynamic traffic and account ID | Console or accountId in the purchase response. The documented public product number is dynamic_2; the label in the console is authoritative |
| Access token | Keep it on the server only; see Authentication and Quickstart |
| A check target | An HTTPS URL you are allowed to request |
| Product choice | If you need a fixed exit for the subscription term, use static and rotating vs static |
Placeholders only (not production): host proxy.example.invalid, port 10000, user USER_EXAMPLE, password PASS_EXAMPLE_NOT_REAL. Token example TOKEN_EXAMPLE_NOT_REAL, account ID example ACCOUNT_ID_EXAMPLE. Commands follow the docs.
What extract returns
A successful extract returns structured host, port, username, and password fields. For batch extract, read data.proxy.list. In that case the structured fields and formatted_proxy refer only to the first item. formatted_proxy uses the order host:port:username:password. When you put that into a page or a log, still keep credentials off the host so you never emit a literal username:password@host token.
| Field | How to use it |
|---|---|
host / port | Copy into the client as returned; do not invent the entry hostname |
username / password | Use separate fields; do not build or edit the username |
protocol | Docs default to socks5. Reaching an HTTPS target through SOCKS5 does not mean HTTP proxy or HTTPS CONNECT is available on this extract path. If the console or another path returns an HTTP proxy, follow that value; see HTTP / SOCKS5 |
| Entry host | Current documented implementation: host5.ztproxy.net for the United States, and host4.ztproxy.net for Asia, Europe, other non-US locations, or a global random exit. Always use the host in that extract response |
Regular users can extract only their own accounts. Agents can extract only accounts they are allowed to manage. Do not treat an order number as an account ID.
One extract example
Replace the account ID and token with your values. This body requests a global random exit with the documented default SOCKS5. Targeting and sticky sessions are covered in location targeting and sticky sessions.
export ZTPROXY_BASE="https://backend.ztproxy.net/api"
export ZTPROXY_TOKEN="TOKEN_EXAMPLE_NOT_REAL"
curl -X POST "$ZTPROXY_BASE/business/dynamic-accounts/ACCOUNT_ID_EXAMPLE/extract" \
-H "Authorization: Bearer $ZTPROXY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"protocol": "socks5"
}'
When you test, pass the returned host, port, and auth as separate flags, for example curl --proxy plus --proxy-user. Do not write username:password@host. See test with curl. If the docs example uses socks5h:// with host and port, keep the protocol consistent with the extract result.
If the console offers the same extract action, follow the labels on screen. You should still receive a complete credential set and leave the username untouched.
Troubleshooting
| Symptom | Check first |
|---|---|
| 401 | Expired token or missing Authorization header. See Authentication |
| 403 | Extracting an account that is not yours, or an agent acting outside their scope |
| 404 | Using an order number instead of accountId; list accounts first |
| 400 | Traffic exhausted, or invalid location or session parameters. See remaining traffic |
| 503 | Entry or usage temporarily unavailable; do not retry without a limit; keep the time and order number |
| 407 or your own IP | Whether you used the complete returned fields, and whether the protocol matches. See error checklist |
Keep tokens and proxy passwords on the server or in a secret store. Do not put them in front-end code, public repos, or logs.
Scope and compliance
Use this only against targets you are authorized to access. This is not a bypass guide. Prices follow the console and Pricing (dynamic about $0.40/GB, about $0.20/GB on the 100 TB package; shared static about $1.50 and dedicated about $5 per IP per month). USDT and USDC are accepted; Visa and Mastercard are still being applied for. Not supported in mainland China.
FAQ
Why can't I build the username myself?
The official docs require a full credential set from extract. Clients should not assemble or modify the proxy username. Adding your own country or session suffix often produces failed authentication.
Can I use the sample host and account ID?
No. Replace them with values from the console or the API. The placeholders in this page are not production endpoints.
Is extract HTTP or SOCKS5 by default?
The documented default on this extract path is socks5. Reaching an HTTPS target through SOCKS5 does not mean HTTP proxy or HTTPS CONNECT is available on that path. Follow the protocol you received. The general protocol guide is HTTP / SOCKS5.
How is extract different from a static order?
Dynamic traffic is consumed in GB and credentials come from extract. A static residential IP is relatively fixed for the subscription term, and you read the instance from the order list after provisioning. Do not reuse this extract flow for static orders.
How many proxies can I extract at once?
The docs allow quantity from 1 to 200, default 1. Read batch results from data.proxy.list. That range is not a product concurrency cap or SLA.
Can I use this to bypass login walls?
No. Authorized targets only.
Is the entry host always host4 or host5?
Those names describe the current documented implementation and can differ by region. Always use the host field in the extract response; do not hard-code a hostname.
Which price should I trust?
The console and Pricing.
Next steps
- Save the real
accountIdand extract a complete credential set. - Run a check against an authorized target.
- For a specific exit, see location targeting; for a short-lived stable exit, see sticky sessions.