Advanced
Custom headers
Section titled “Custom headers”Pass headers as a URL-encoded JSON object via custom_headers:
curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://api.example.com&custom_headers=%7B%22Authorization%22%3A%22Bearer%20abc123%22%7D"Useful when the target expects bearer tokens, X-Requested-With: XMLHttpRequest, or locale preferences.
Custom cookies
Section titled “Custom cookies”Set cookies inline via custom_cookies:
cookie_name=value; other_name=value2URL-encoded:
curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://example.com&custom_cookies=session_id%3Dabc%3B%20locale%3Den-US"For cookies across multiple requests, prefer session_id, cookies set by the server will persist automatically.
POST and PUT
Section titled “POST and PUT”Switch method with method. Pass the body as the request body.
curl -X POST \ "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://api.example.com/users&method=POST" \ -H "Content-Type: application/json" \ -d '{"email":"user@example.com","plan":"pro"}'PUT is identical with method=PUT.
Screenshots
Section titled “Screenshots”Return a full-page PNG instead of HTML:
curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://example.com&render_js=1&screenshot=1" \ -o screenshot.pngOptions:
screenshot_full_page=1, capture beyond the viewport.screenshot_selector=<css>, capture just one element.
Binary files
Section titled “Binary files”For PDFs, images, or any non-text response, add binary_response=1. The scraper streams the binary payload through:
curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://example.com/file.pdf&binary_response=1" \ -o file.pdfStealth controls
Section titled “Stealth controls”Some targets flag the default browser fingerprint. You can disable stealth mode for debugging (not recommended in production):
curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://example.com&disable_stealth=1&render_js=1"Combining flags
Section titled “Combining flags”All flags compose. A real-world request looks like:
curl "https://scrape.shifter.io/v1?\api_key=YOUR_API_KEY&\url=https://shop.example.com/products/42&\render_js=1&\wait_for_css=.price&\session_id=cart-001&\premium_proxy=1&\country=us&\extract_rules=%7B%22price%22%3A%7B%22selector%22%3A%22.price%22%2C%22output%22%3A%22text%22%7D%7D"One successful request, one credit.
- Errors & limits, what codes mean and how retries interact with credits.
- FAQ, credits, failures, custom scripts.