ジオロケーション
countryパラメータに2文字のISO国コードを指定すると、その所在地からリクエストを送信できます。サポートされる国はプロキシタイプによって異なります。位置情報アクセスのないプランでは、選択したプールからランダムな国が割り当てられます。
エンドポイント
Section titled “エンドポイント” GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>&country=us&proxy_type=datacenter
パラメーター
Section titled “パラメーター”| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
api_key | string | はい | お使いのWeb Scraping APIキー |
url | string | はい | 取得対象のターゲットURL |
country | string | いいえ | 2文字の国コード(例: us、gb、de) |
proxy_type | string | いいえ | datacenter(デフォルト)または residential |
- Datacenter:
us,ca,gb,de,fr,es,mx,jp,cn,au. - Residential:
us,ca,gb,de,fr,es,jp,cn,au,br,in,mx.
リクエスト例
Section titled “リクエスト例”curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https%3A%2F%2Fhttpbin.org%2Fget&country=us&proxy_type=datacenter"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",})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',});const res = await fetch(url);console.log(await res.json());レスポンス例
Section titled “レスポンス例”{ "args": {}, "headers": { "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "Accept-Encoding": "gzip, deflate, br", "Host": "httpbin.org", "Upgrade-Insecure-Requests": "1", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.0 Safari/537.36" }, "origin": "192.3.214.245", "url": "https://httpbin.org/get"}