Apify's Actor runtime accepts external proxies through the ProxyConfiguration object, which can be initialized with a list of proxy URLs in the standard protocol-user-password-host-port format. Residential proxies are passed as rotating endpoints where each request receives a new IP, while datacenter proxies can be configured as static addresses for tasks that require session persistence. The configuration is injected at Actor launch time, meaning the same scraping logic can switch between proxy providers without code changes.
For residential pools, the integration typically uses a gateway endpoint provided by the proxy vendor — a single hostname that handles IP rotation internally. The Actor sends every request through this gateway, and the vendor's load balancer assigns a fresh residential IP from the requested country or city pool. Datacenter proxies, by contrast, are usually provisioned as a list of individual IP-port pairs, and the Actor cycles through them using round-robin or weighted-random selection configured in the ProxyConfiguration.
Authentication varies by vendor. Most support either username-password credentials embedded in the proxy URL or IP whitelisting. When running Actors on Apify's cloud, IP whitelisting requires adding Apify's egress IP ranges to the vendor's allowlist — a step often overlooked during initial setup, leading to authentication failures that mimic proxy blocks.