セッション
複数のリクエストにわたって同じ整数をsessionに渡すことで、それらすべてで同じプロキシIPを維持できます。ターゲットサイトが単一のナビゲーションやログインフロー内でIPによってあなたを追跡する場合に便利です。セッションは最後に使用されてから5分後に期限切れになります。
Endpoint
Section titled “Endpoint” GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>&session=<INTEGER>
Parameters
Section titled “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
Section titled “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
Section titled “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"}