Custom cookies
Attach custom cookies to a scrape by sending a Wsa-Cookie request header. The API forwards those cookies to the target site exactly as you would send them in a browser.
Endpoint
Section titled “Endpoint” GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | Your Web Scraping API key |
url | string | yes | Target URL to fetch |
Wsa-Cookie (header) | string | no | Semicolon-separated cookie string, e.g. name1=value1; name2=value2. |
Example request
Section titled “Example request”curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=http%3A%2F%2Fhttpbin.org%2Fcookies" \ -H "Wsa-Accept: application/json" \ -H "Wsa-Cookie: name1=value1; name2=value2"import requests
r = requests.get( "https://scrape.shifter.io/v1", params={"api_key": "YOUR_API_KEY", "url": "http://httpbin.org/cookies"}, headers={ "Wsa-Accept": "application/json", "Wsa-Cookie": "name1=value1; name2=value2", },)print(r.json())import fetch from 'node-fetch';
const url = 'https://scrape.shifter.io/v1?' + new URLSearchParams({ api_key: 'YOUR_API_KEY', url: 'http://httpbin.org/cookies',});const res = await fetch(url, { headers: { 'Wsa-Accept': 'application/json', 'Wsa-Cookie': 'name1=value1; name2=value2', },});console.log(await res.json());Example response
Section titled “Example response”{ "cookies": { "name1": "value1", "name2": "value2" }}