Skip to content
Login Sign up

API request

To scrape a web page, send a GET request to the Web Scraping API base endpoint with your api_key and the target url. Additional optional parameters let you control rendering, proxy type, geolocation, timeouts, and more.

GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>
ParameterTypeRequiredDescription
api_keystringyesYour Web Scraping API access key. Found in your account dashboard.
urlstringyesThe target URL to scrape.
render_jsintegerno0 (default) or 1. Enable JavaScript rendering via a headless browser. Costs 5 API calls for datacenter and 25 for residential.
proxy_typestringnodatacenter (default) or residential. Residential costs 10 calls without JS rendering and 25 with.
countrystringno2-letter country code for proxy geolocation. Supported list depends on proxy type.
keep_headersintegerno1 to pass custom request headers through, 0 to use only the ones you specify.
sessionintegernoReuse the same proxy IP across multiple requests by reusing the same session number. Expires 5 minutes after last use.
timeoutintegernoMaximum request time in milliseconds. Max 60000. The API returns whatever HTML was collected before the timeout fires.
devicestringnodesktop (default), mobile, or tablet.
wait_untilstringnoAdvanced. Condition for when rendering is considered complete. Requires render_js=1.
wait_forintegernoAdvanced. Milliseconds to wait after page load. Recommended 5000-10000. Requires render_js=1.
wait_for_cssstringnoAdvanced. Wait up to 10 seconds for a CSS selector to appear. Requires render_js=1.
screenshotintegernoAdvanced. Set to 1 to return a screenshot. Requires render_js=1.
screenshot_optionsobjectnoAdvanced. Controls screenshot dimensions and full_page.
extract_rulesstringnoAdvanced. URL-encoded JSON describing CSS extraction rules.
disable_stealthintegernoAdvanced. Set to 1 to disable the default stealth plugin. Requires render_js=1.
auto_parserintegernoAdvanced. Set to 1 to return parsed JSON instead of HTML.
js_instructionsstringnoAdvanced. URL-encoded JSON array of actions to run before scraping. Requires render_js=1.
binary_responseintegernoSet to 1 to return a base64-encoded binary file (for PDFs, images, etc.).
Terminal window
curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://httpbin.org/get"