Crawl4AI with a UK home IP
Crawl4AI is an open-source crawler for LLM and RAG pipelines. Its docs recommend setting the proxy per request with CrawlerRunConfig.proxy_config.
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.
Python
# pip install crawl4ai && crawl4ai-setup
import asyncio
from crawl4ai import AsyncWebCrawler, BrowserConfig, CrawlerRunConfig, ProxyConfig
run_config = CrawlerRunConfig(
proxy_config=ProxyConfig(
server="http://HOST:PORT",
username="USERNAME",
password="PASSWORD",
)
)
async def main():
async with AsyncWebCrawler(config=BrowserConfig(headless=True)) as crawler:
result = await crawler.arun(url="https://www.example.com/", config=run_config)
print(result.success, result.url)
asyncio.run(main())
Rotate across several ProxyPi exits
# export PROXIES="HOST1:PORT1:USERNAME:PASSWORD,HOST2:PORT2:USERNAME:PASSWORD"
from crawl4ai import CrawlerRunConfig, ProxyConfig
from crawl4ai.proxy_strategy import RoundRobinProxyStrategy
proxies = ProxyConfig.from_env() # reads PROXIES
run_config = CrawlerRunConfig(proxy_rotation_strategy=RoundRobinProxyStrategy(proxies))
Good to know
- The older
BrowserConfig(proxy=...)argument is deprecated in Crawl4AI. UseCrawlerRunConfig.proxy_config.
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.