コンテンツにスキップ
ログイン サインアップ

カスタムヘッダー

送信するヘッダーに Wsa- プレフィックスを付けることで、スクレイピング対象へのリクエストに任意のヘッダーを追加できます。APIはこのプレフィックスを取り除き、ヘッダーをターゲットサイトに転送します。

GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>
ParameterTypeRequiredDescription
api_keystringyesあなたのWeb Scraping APIキー
urlstringyes取得対象のURL
Wsa-* (header)stringnoWsa- プレフィックスが付いたヘッダーは、プレフィックスを除いた状態でターゲットに転送されます。
Terminal window
curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=http%3A%2F%2Fhttpbin.org%2Fheaders" \
-H "Wsa-My-header: test" \
-H "Wsa-User-Agent: potato"
{
"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",
"My-Header": "test",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "potato"
}
}