Connection settings
Learn how to connect your application to Apify Proxy. See the required parameters such as the correct username and password.
Below are the HTTP proxy connection settings for Apify Proxy.
Parameter | Value / explanation |
---|---|
Proxy type | HTTP |
Hostname | proxy.apify.com |
Port | 8000 |
Username | Specifies the proxy parameters such as groups, session and location. See username parameters below for details. Note: this is not your Apify username. |
Password | Proxy password. Your password is displayed on the Proxy page in the Apify Console. In Apify actors, it is passed as the APIFY_PROXY_PASSWORD environment variable. See the environment variables docs for more details. |
Connection URL | http://<username>:<password>@proxy.apify.com:8000 |
Static IP Addresses | 18.208.102.16 , 35.171.134.41 Static IP addresses, that can be used as alternatives to Hostname . |
WARNING: All usage of Apify Proxy with your password is charged towards your account. Do not share the password with untrusted parties or use it from insecure networks – the password is sent unencrypted due to the HTTP protocol's limitations.
Username parameters
The username
field enables you to pass parameters like groups, session ID and country for your proxy connection.
For example, if you're using datacenter proxies and want to use the new_job_123
session using the SHADER
group, the username will be:
groups-SHADER,session-new_job_123
The table below describes the available parameters.
groups | Set proxied requests to use servers from the selected groups. Set to groups-[group name] or auto when using datacenter proxies.Set to groups-RESIDENTIAL when using residential proxies.Set to groups-GOOGLE_SERP when using Google SERP proxies. |
---|---|
session | If specified, all proxied requests with the same session identifier are routed through the same IP address. For example session-new_job_123 .This parameter is optional. By default, each proxied request is assigned a randomly picked least used IP address. The session string can only contain numbers (0-9), letters (a-z or A-Z), dot (.), underscore (_), a tilde (~). The maximum length is 50 characters. |
country | If specified, all proxied requests will use proxy servers from a selected country. Note that if there are no proxy servers from the specified country, the connection will fail. For example groups-SHADER,country-US uses proxiesfrom the SHADER group located in the USA.This parameter is optional. By default, the proxy uses all available proxy servers from all countries. |
If you want to specify one parameter and not the others, just provide that parameter and omit the others. To use the default behavior (not specifying either groups
, session
, or country
), set the username to auto. auto serves as a placeholder because the username can't be empty.
To learn more about sessions and IP address rotation, see the proxy overview page.
Code examples
We have code examples for connecting to our proxy using the Apify SDK and Crawlee and other JavaScript libraries (axios and got-scraping), as well as examples in Python and PHP.
Proxy groups
You can see which proxy groups you have access to on the Proxy page in the Apify Console.
To use a specific proxy group (or multiple groups), specify it in the username
parameter.