ScraperAPI
General-purpose scraping; the gateway supplies the api_key
Fronts the synchronous endpoint of ScraperAPI; the gateway fills in the secret api_key parameter on the query string.
GETretrieves the page aturl.- A
POSTorPUTdelivers a form or body to the target, with the body relayed as-is.
Everything is driven by the query string: the target url plus any ScraperAPI parameter (country_code, render, device_type, premium, …). What you put there reaches ScraperAPI exactly as written.
Credential handling
api_keygoes in ahead of everything you send — ScraperAPI wants its parameters placed beforeurl, and this also keeps a target URL with incomplete encoding from swallowing them.- An
api_keysupplied by the client in the query is discarded (any encoding), so nothing can displace the injected key. - The header form of the key,
x-sapi-api_key, is discarded. Authorizationis removed, and here that matters beyond hygiene: underkeep_headers=trueScraperAPI passes your headers on to the scraped site — a surviving gateway token would therefore leak to a third party.
Every other header — the x-sapi-* controls such as x-sapi-render included — goes through untouched.
Examples
Basic scrape
Render JS + geotarget
POST a form to the target
Expect slow scrapes — ~70 seconds is the allowance ScraperAPI suggests. Since the gateway simply waits on the upstream, the timeout that actually binds is your client’s. Payloads can be big too (up to ~50MB on ScraperAPI’s side), and the gateway streams every byte back.
ScraperAPI’s response comes back untouched. Every supported parameter is listed in ScraperAPI’s documentation.