When extracting a dynamic residential proxy, query the official location catalog first, then pass country, state, and city in order. Do not guess spellings or invent username syntax. Not a city landing page. Not for mainland China.
To exit from a specific country or city on dynamic residential traffic, pass the documented location fields when you extract credentials. Do not edit the username. This page follows the official Dynamic Resource 2 guide: query the standard names the platform publishes; do not guess state or city spelling. If you omit location fields, extract uses a global random IP.
This is not another article about which market to pick; that guide is how to choose a location. It is also not a city or country landing page under `/locations/`. Published country pages stay on the locations hub, and inventory follows the console. Authorized targets only. Not supported in mainland China.
What to prepare
| Item | Where it comes from |
|---|---|
| Dynamic account ID and token | `accountId` from the purchase response; keep the token on the server. See extract credentials |
| Target market | Choose by the site you need to see, not by where you sit. See how to choose a location |
| Standard location names | Call the documented country, region, and city catalogs first; do not guess |
| A fixed exit | If you need a fixed IP for the subscription term, use static instead of extract parameters |
Placeholders only (not production): host `proxy.example.invalid`, port `10000`, user `USER_EXAMPLE`, password `PASS_EXAMPLE_NOT_REAL`. Account ID example `ACCOUNT_ID_EXAMPLE`. City names below are official docs examples and do not promise that the city is in stock right now.
How location fields stack
The docs require country, then state or province, then city:
| Target level | Fields to send | What not to do |
|---|---|---|
| Global random | Omit `country`, `state`, and `city` | Do not invent a username for this |
| Country only | `country` only (a two-letter code such as `US` in the docs) | Do not send a local-language country name or a made-up code |
| Down to a city | `country`, `state`, and `city` together | Do not send `city` without country and state |
Use the documented catalog endpoints for countries, regions in a country, and cities in a country plus region. `country` is the two-letter code from the catalog; `state` and `city` are the standard names in that catalog. If you also use a sticky session, generate a new session id when you change location; see sticky sessions.
Extract example with a location
The state and city values come from the official docs example. Query the catalog before you send a live request, and treat stock as whatever the API and console return.
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",
"country": "US",
"state": "California",
"city": "Los Angeles"
}'
The documented default protocol is still `socks5`. Reaching an HTTPS target through SOCKS5 does not mean HTTP proxy or HTTPS CONNECT is available on this extract path. Keep host, port, username, and password in separate fields. Entry hostnames may differ by region in the current documented implementation; use the `host` in the response.
Common mistakes
| Mistake | Why it fails |
|---|---|
| Guessing spellings such as `newyork` | The docs require standard catalog names |
| Sending only a city | The hierarchy is incomplete and the API may return 400 |
| Adding `-country-us` to the username | Clients should not assemble usernames |
| Treating this page as a city product page | Whether a city can be purchased or extracted follows the catalog and console only |
| Changing location but reusing an old sticky session id | You may keep the previous exit; change the session id when you change location |
For a first check see test with curl. For protocols see HTTP / SOCKS5.
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
What happens if I omit the location?
The docs say extract then uses a global random IP.
Can I send only a city?
No. If you send `city`, you must also send `country` and `state`.
Does the Los Angeles example mean that city is always in stock?
No. It is a docs request example. Check the current catalog and console before you buy or extract.
Why can't I select a country by editing the username?
The extract API already has location fields. The official guidance is to use the username exactly as returned.
How is this different from choosing a city on a static IP?
Static orders use `countryCode` and `cityCode` from the product query, and the IP stays relatively fixed for the term. Dynamic location fields apply to that extract, not to a static IP. See rotating vs static.
Can I use this to bypass login walls?
No. Authorized targets only.
Why is the exit unchanged after I switch locations?
If you reuse the same sticky session id, the docs warn you may keep the previous region's exit. Create a new session id when you change location.
Which price should I trust?
The console and Pricing.
Next steps
- Query the location catalog, then extract.
- Check an authorized target and confirm the exit.
- For a short-lived stable exit, see sticky sessions; for a long-lived fixed IP, see static.