# Country targeting > Request PacketStream residential exits by ISO two-letter country code and handle unavailable countries without accepting the wrong location. PacketStream supports country-level targeting. Append `_country-` and an ISO two-letter country code to the auth key. ## Request a country This password requests a United States exit: ```text AUTH_KEY_country-US ``` Use uppercase ISO two-letter codes in new integrations. The proxy hostname and port do not change. ```bash COUNTRY_PASSWORD="${PACKETSTREAM_AUTH_KEY}_country-US" curl --silent --show-error --fail-with-body \ --proxy 'https://proxy.packetstream.io:31111' \ --proxy-user "${PACKETSTREAM_USER}:${COUNTRY_PASSWORD}" \ 'https://ipinfo.io' \ | jq '{ip, country, region, city, org}' ``` For a country-sensitive workflow, verify that the returned country is `US` before collecting the intended destination. To get a valid code, choose the country in the **Location** list on the [Proxy Access page](https://app.packetstream.io/dashboard/network_access); the generated password then carries the matching suffix. PacketStream ignores a code it does not recognize, and the request then exits in any country. The ipinfo.io check above shows the country you got. ## Targeting boundary Country is the supported targeting boundary. City, region, postal code, and coordinates reported by IP databases are approximate diagnostic data—not targeting guarantees. The content a destination returns can also depend on: - browser locale and accepted languages; - cookies and prior session state; - account settings; - the requested hostname or regional URL; - delivery or billing details supplied to the destination. A country-targeted exit does not override those application-level inputs. ## Unavailable countries If a recognized country has no available exits, PacketStream fails the request. It does not silently substitute another country. Preserve that distinction in your application: ```text requested country unavailable → record unavailable work authentication failed → stop and fix credentials destination failed → apply the destination retry policy ``` Do not remove the country constraint inside a generic retry handler. That can turn a visible availability failure into plausible data from the wrong market. Use bounded backoff when retrying availability, and give the job a total time limit. ## Combine targeting with a sticky session Add a session modifier when related requests need the same country-targeted exit: ```text AUTH_KEY_country-DE_session-market42 ``` The sticky-session contract remains the same: it can retain the exit for up to 60 minutes, and it fails if the associated Packeter disconnects. ## Store targeting as job configuration Record the requested country alongside the collected result. Do not infer it later from a URL or from an approximate IP database response. A minimal provenance record might include: ```json { "requested_country": "US", "observed_country": "US", "collected_at": "2026-07-22T14:05:00Z", "source_url": "https://example.com/public-page" } ``` Avoid placing proxy credentials or auth-key modifiers containing sensitive labels into stored provenance.