Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions sources/platform/proxy/residential_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ State-level targeting is currently only supported for the United States.
To use state targeting, specify the `country` parameter in the [username](./usage.md#username-parameters) using the [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) format: `country-US_XX`, where `XX` is the two-letter state abbreviation. For example, to target California when using the proxy URL directly, set the username to `groups-RESIDENTIAL,country-US_CA`.


In the [Apify SDK](/sdk) you set the state in your proxy configuration using the `countryCode`/`country_code` parameter:
In the [Apify SDK](/sdk) you set the state in your proxy configuration using the `countryCode`/`country_code` and `subdivisionCode`/`subdivision_code` parameters:

<Tabs groupId="main">
<TabItem value="JavaScript" label="JavaScript">
Expand All @@ -129,7 +129,8 @@ await Actor.init();
// ...
const proxyConfiguration = await Actor.createProxyConfiguration({
groups: ['RESIDENTIAL'],
countryCode: 'US_CA',
countryCode: 'US',
subdivisionCode: 'CA',
});
// ...
await Actor.exit();
Expand All @@ -146,7 +147,8 @@ async def main():
# ...
proxy_configuration = await Actor.create_proxy_configuration(
groups=['RESIDENTIAL'],
country_code='US_CA',
country_code='US',
subdivision_code='CA',
)
# ...
```
Expand Down
Loading