Anti-bot bypass scraping API. Use KnoxProxy directly as a lower-cost alternative to ZenRows for residential proxy rotation, with the same geo-targeting capabilities and no per-request API fees.
Install your preferred HTTP client.
pip install requests # Python
npm install axios # JavaScriptInstead of sending requests through the ZenRows API endpoint, route them directly through KnoxProxy.
# ZenRows approach (per-request cost):
# requests.get("https://api.zenrows.com/v1/", params={"url": target})
# KnoxProxy approach (per-GB cost, much cheaper):
proxies = {"http": "http://user:pass@gw.knoxproxy.com:7000", "https": "http://user:pass@gw.knoxproxy.com:7000"}Target specific countries by appending a country code to your username.
proxies = {
"http": "http://your_username-country-us:your_password@gw.knoxproxy.com:7000",
"https": "http://your_username-country-us:your_password@gw.knoxproxy.com:7000"
}Add browser-like headers to your requests for better success rates on protected sites.
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"Accept": "text/html,application/xhtml+xml",
"Accept-Language": "en-US,en;q=0.9"
}Implement simple retry logic for failed requests.
for attempt in range(3):
resp = requests.get(url, proxies=proxies, headers=headers, timeout=30)
if resp.status_code == 200:
breakRun a test scrape and compare output with ZenRows. KnoxProxy residential IPs achieve comparable success rates at a fraction of the cost.
import requests
from typing import Optional
# Migration from ZenRows to KnoxProxy
# Before: $2.80/1000 requests with ZenRows
# After: ~$X/GB with KnoxProxy (much lower for typical pages)
KNOX_PROXY = {
"http": "http://your_username-country-us:your_password@gw.knoxproxy.com:7000",
"https": "http://your_username-country-us:your_password@gw.knoxproxy.com:7000",
}
HEADERS = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9",
"Accept-Language": "en-US,en;q=0.9",
}
def scrape(url: str, country: str = "us", retries: int = 3) -> Optional[str]:
"""Scrape a URL through KnoxProxy with retry logic."""
proxy_url = f"http://your_username-country-{country}:your_password@gw.knoxproxy.com:7000"
proxies = {"http": proxy_url, "https": proxy_url}
for attempt in range(retries):
try:
resp = requests.get(url, proxies=proxies, headers=HEADERS, timeout=30)
if resp.status_code == 200:
return resp.text
except requests.RequestException:
continue
return None
html = scrape("https://example.com/products")
if html:
print(f"Success: {len(html)} bytes")KnoxProxy rotates IPs automatically per connection. No API key or per-request fees. Pay only for bandwidth used.
| Problem | Fix |
|---|---|
| Target returns CAPTCHA | Combine KnoxProxy with a headless browser (Playwright or Puppeteer) for JS-rendered pages. KnoxProxy handles the IP, the browser handles the rendering. |
| Connection refused | Verify proxy URL format: http://user:pass@gw.knoxproxy.com:7000. Check credentials in KnoxProxy dashboard. |
USER-country-de-city-berlin-session-profile07Order matters -- geo flags before the session flag. The session name is free text; use the profile ID so the mapping is self-documenting. Password stays as issued; no flags belong there. HTTP on :7000, SOCKS5 on :7001, same credentials.
ZenRows charges per API request, roughly $2.80 per 1,000 requests on its plans, regardless of how small each page is. KnoxProxy instead charges per GB of bandwidth actually transferred, which is significantly cheaper for most scraping workloads since typical pages only use a fraction of a megabyte each.
KnoxProxy is a proxy service, not a browser, so it does not render JavaScript on its own. For JS-heavy pages, pair it with a headless browser like Playwright or Puppeteer: KnoxProxy handles IP rotation and geo-targeting through gw.knoxproxy.com:7000, while the browser handles rendering the page itself.
Almost. Replace the ZenRows API call, which sends your target URL as a parameter to api.zenrows.com, with a direct proxies dict pointing at gw.knoxproxy.com:7000. The request flow becomes simpler, since your code hits the target URL directly through KnoxProxy instead of routing through an intermediary API endpoint.
KnoxProxy's residential IPs carry high trust scores on their own, which helps against basic bot detection. For sites with advanced anti-bot protection, combine KnoxProxy with browser-like headers such as a real User-Agent and Accept-Language string, plus a headless browser like Playwright, for the JavaScript checks ZenRows would otherwise bypass automatically.
Rotating residential proxies -- 3 minutes setup, instant activation, 14-day money-back guarantee.