Apify with a UK home IP
Apify's ProxyConfiguration accepts your own proxy URLs. List one URL per ProxyPi exit and Apify rotates through them; pass a session ID to stick to one.
Before you start
You need a ProxyPi login. The free 100 MB trial is enough to test this guide. Copy HOST, PORT, USERNAME and PASSWORD from your dashboard. Examples that read PROXYPI_HTTP expect http://USERNAME:PASSWORD@HOST:PORT in that environment variable.
JavaScript (Apify SDK + Crawlee)
// npm install apify crawlee playwright
import { Actor } from "apify";
import { PlaywrightCrawler } from "crawlee";
await Actor.init();
const proxyConfiguration = await Actor.createProxyConfiguration({
proxyUrls: [process.env.PROXYPI_HTTP], // http://USERNAME:PASSWORD@HOST:PORT (add one per exit)
});
const crawler = new PlaywrightCrawler({
proxyConfiguration,
async requestHandler({ page, request, log }) {
log.info(`${request.url}: ${await page.title()}`);
},
});
await crawler.run(["https://www.example.com/"]);
await Actor.exit();
Python (Apify SDK)
import asyncio, os
from apify import Actor
async def main() -> None:
async with Actor:
proxy_cfg = await Actor.create_proxy_configuration(
proxy_urls=[os.environ["PROXYPI_HTTP"]], # http://USERNAME:PASSWORD@HOST:PORT
)
proxy_url = await proxy_cfg.new_url()
Actor.log.info("Using a ProxyPi exit")
asyncio.run(main())
Good to know
- Store the proxy URL as a secret environment variable on the Actor in Apify Console, not in the source.
- Paid ProxyPi packs include several UK exits, each with its own host and port. Add each one to the list for round-robin rotation.
Official documentation
Third-party APIs change. We checked these against the official docs on 23 November 2026. If something has moved, the linked docs win.
Try it on a real UK home line
The trial is 100 MB of UK residential data. No card needed. Your host, port and login are in your dashboard once you have signed up.
Use ProxyPi within the acceptable use policy and the terms of the sites and tools you use.