Proxy rotation API for web scraping. Use KnoxProxy as a lower-cost direct proxy alternative to ScraperAPI, with the same residential IP rotation and geo-targeting but bandwidth-based pricing instead of per-request fees.
Install the HTTP client for your language.
pip install requests # Python
npm install axios # JavaScriptSwap the ScraperAPI endpoint for a direct proxy configuration using KnoxProxy.
# ScraperAPI approach (per-request pricing):
# requests.get("http://api.scraperapi.com?api_key=KEY&url=TARGET")
# KnoxProxy approach (per-GB pricing):
proxies = {"http": "http://user:pass@gw.knoxproxy.com:7000", "https": "http://user:pass@gw.knoxproxy.com:7000"}
requests.get("https://target.com", proxies=proxies)Target specific countries the same way ScraperAPI does, but via username suffix.
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"
}For scrapes that require a consistent IP across requests, use sticky sessions.
proxies = {
"http": "http://your_username-session-scrape01:your_password@gw.knoxproxy.com:7000",
"https": "http://your_username-session-scrape01:your_password@gw.knoxproxy.com:7000"
}Set up KnoxProxy with axios in Node.js.
const axios = require("axios");
const { HttpsProxyAgent } = require("https-proxy-agent");
const agent = new HttpsProxyAgent("http://your_username-country-us:your_password@gw.knoxproxy.com:7000");
const resp = await axios.get("https://example.com", { httpsAgent: agent });Run parallel test scrapes through both services. Compare success rates and total cost. KnoxProxy is typically 3-5x cheaper for high-volume workloads.
import requests
# Migration guide: ScraperAPI to KnoxProxy
# ScraperAPI: $49/mo for 100K requests ($0.00049/request)
# KnoxProxy: pay per GB, no request limits
# Before (ScraperAPI)
# response = requests.get(
# "http://api.scraperapi.com",
# params={"api_key": "SCRAPERAPI_KEY", "url": target_url, "country_code": "us"}
# )
# After (KnoxProxy - direct proxy, lower cost)
def scrape(url: str, country: str = "us") -> str:
proxies = {
"http": f"http://your_username-country-{country}:your_password@gw.knoxproxy.com:7000",
"https": f"http://your_username-country-{country}:your_password@gw.knoxproxy.com:7000",
}
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"Accept-Language": "en-US,en;q=0.9",
}
resp = requests.get(url, proxies=proxies, headers=headers, timeout=30)
resp.raise_for_status()
return resp.text
html = scrape("https://example.com/products", "gb")
print(f"Fetched {len(html)} bytes from GB proxy")KnoxProxy rotates IPs per connection automatically. Unlike ScraperAPI where rotation is API-managed, KnoxProxy handles it at the proxy level. No API key needed, no request limits.
| Problem | Fix |
|---|---|
| Response differs from ScraperAPI | Add browser-like headers (User-Agent, Accept, Accept-Language) to your requests. For JS-rendered pages, pair KnoxProxy with Playwright or Puppeteer. |
| 407 Proxy Authentication Required | Verify username and password. Country suffix format: your_username-country-{cc}. Check credentials at 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.
ScraperAPI charges per request. KnoxProxy charges per GB. For typical web pages (50-200 KB), KnoxProxy can be 3-5x cheaper at volume.
KnoxProxy is a standard proxy service. You make requests directly to target URLs through the proxy, rather than through an API endpoint. This is simpler and faster.
Yes. Replace the ScraperAPI URL with direct target URLs and add proxy configuration. The code change is minimal: swap API params for a proxies dict.
ScraperAPI offers JS rendering as a feature. With KnoxProxy, pair with Playwright or Puppeteer for JS rendering. KnoxProxy handles the IP rotation, the browser handles rendering.
Free trial on rotating residential -- 3 minutes setup, no credit card.