세션
여러 요청에 걸쳐 동일한 정수를 session에 전달하면 모든 요청에서 동일한 프록시 IP를 유지할 수 있습니다. 대상 사이트가 단일 탐색 또는 로그인 흐름 내에서 IP로 사용자를 추적하는 경우 유용합니다. 세션은 마지막 사용으로부터 5분 후 만료됩니다.
Endpoint
섹션 제목: “Endpoint” GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>&session=<INTEGER>
Parameters
섹션 제목: “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | Web Scraping API 키 |
url | string | yes | 가져올 대상 URL |
session | integer | no | 임의의 정수입니다. 동일한 프록시를 재사용하려면 같은 값을 재사용하세요. |
country | string | no | 세션 생성 시 사용되는 선택적 국가 코드입니다. |
proxy_type | string | no | datacenter(기본값) 또는 residential. |
Example request
섹션 제목: “Example request”curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https%3A%2F%2Fhttpbin.org%2Fget&country=us&proxy_type=datacenter&session=100"import requests
r = requests.get("https://scrape.shifter.io/v1", params={ "api_key": "YOUR_API_KEY", "url": "https://httpbin.org/get", "country": "us", "proxy_type": "datacenter", "session": 100,})print(r.json())import fetch from 'node-fetch';
const url = 'https://scrape.shifter.io/v1?' + new URLSearchParams({ api_key: 'YOUR_API_KEY', url: 'https://httpbin.org/get', country: 'us', proxy_type: 'datacenter', session: '100',});const res = await fetch(url);console.log(await res.json());Example response
섹션 제목: “Example response”{ "args": {}, "headers": { "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "Host": "httpbin.org", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4889.0 Safari/537.36" }, "origin": "192.241.96.150", "url": "https://httpbin.org/get"}