Integration

Proxies for Apify

Actor based scraping platform Point it at one gateway host and every request exits from a different residential address, with country targeting when you need it.

HTTPS and SOCKS5   IP whitelist or user and password   From $24.95/mo

Before you start

You need an active plan, your gateway credentials from the dashboard, and either your server IP whitelisted or a user and password pair. Replace USER:PASS in the examples with your real credentials.

The rotating port gives a new IP on every request. Sticky ports hold one address for the life of the session, and both live on the same host, so you choose by port rather than by product.

The gotcha worth knowing

Passing a single rotating URL is enough. The gateway rotates per request, so you do not need to supply a list of many proxy URLs the way you would with static IPs.

Configuration

Apify actors accept a proxy configuration object. Point it at the gateway as a custom proxy URL rather than using the built in pool.

main.js
import { Actor } from 'apify';
import { CheerioCrawler } from 'crawlee';

await Actor.init();

const proxyConfiguration = await Actor.createProxyConfiguration({
    proxyUrls: ['http://USER:PASS@gateway.proxyrotator.com:11000'],
});

const crawler = new CheerioCrawler({
    proxyConfiguration,
    async requestHandler({ request, body }) {
        console.log(request.url, body.length);
    },
});

await crawler.run(['https://api.ipify.org']);
await Actor.exit();

Where to go next

Running more than one tool against the same gateway is normal. These cover the others.

FAQ

Apify proxy setup FAQ

Does this work with rotating and sticky sessions?
Yes. Both run on the same gateway host. The rotating port returns a new IP per request; a sticky port holds one address for the session so a sequence of requests looks like one visitor.
Can I authenticate without a username and password?
Yes. Whitelist your server IP in the dashboard and the gateway will accept connections from it with no credentials in the connection string, which is cleaner if you are committing config to a repository.
Does Apify support SOCKS5?
The gateway serves both HTTPS and SOCKS5. Where the tool supports SOCKS5, prefer it for non HTTP protocols and use the hostname resolving variant so DNS does not leak.
Can I choose the exit country?
Yes, country targeting is available. Set it from the dashboard against your gateway credentials.
What does it cost?
Plans start at $24.95/mo with residential, datacenter, mobile and IPv6 included, and bandwidth bundled rather than metered per gigabyte.

Get your Apify setup running

One gateway, every proxy type, from $24.95/mo. Standard HTTPS and SOCKS5 so your existing code works unchanged.

Copied!