## TL;DR

You can put ScraperAPI behind Selenium by routing Selenium traffic through its proxy: use selenium-wire and set the proxy to proxy-server.scraperapi.com on port 8001 - username 'scraperapi', your API key as the password - passed via seleniumwire_options at driver creation. That way the whole browser session inherits ScraperAPI's proxy rotation and IP handling, instead of only getting it for direct API requests.

## Fix

1. You can put ScraperAPI behind Selenium by routing Selenium traffic through its proxy: use selenium-wire and set the proxy to proxy-server.scraperapi.com on port 8001 - username 'scraperapi', your API key as the password - passed via seleniumwire_options at driver creation.
   Expected: You get the expected result; the problem is gone.
2. That way the whole browser session inherits ScraperAPI's proxy rotation and IP handling, instead of only getting it for direct API requests.
   Expected: You get the expected result; the problem is gone.

## When to use

- You are setting up or using this ScraperAPI behind Selenium feature.
- The symptom matches: route traffic via selenium-wire proxy at proxy-server.scraperapi.com:8001.

## When NOT to use

- Unrelated ScraperAPI behind Selenium issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported against ScraperAPI behind Selenium.

## Variant phrasings

### route traffic via selenium-wire proxy at proxy-server.scraperapi.com:8001

## Why it happens

Stack Overflow (ScraperAPI with Python Selenium, accepted answer): route ScraperAPI through Selenium using selenium-wire's proxy options - the proxy server is proxy-server.scraperapi.com on port 8001, with 'scraperapi' as the username and your API key as the password. Pass it via seleniumwire_options when creating the Chrome driver. This is the pattern when the target needs a real browser session behind ScraperAPI's rotating proxies.

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.