Skip to content
登录 注册

会话

在多个请求中传递相同的整数给 session,即可让这些请求全部使用同一个代理 IP。当目标网站在单次导航或登录流程中通过 IP 追踪你时,这个功能非常有用。会话在最后一次使用后 5 分钟过期。

GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>&session=<INTEGER>
ParameterTypeRequiredDescription
api_keystringyes你的 Web Scraping API 密钥
urlstringyes要抓取的目标 URL
sessionintegerno任意整数。重复使用相同的值以复用同一个代理。
countrystringno创建会话时使用的可选国家代码。
proxy_typestringnodatacenter(默认)或 residential
Terminal window
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"
{
"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"
}