Sending Custom Headers

triangle-exclamation

You can send custom headers (User Agent, Referer, Cookies, etc.) when making a request through our API. By addin the keep_headers=true parameter, the API will forward these headers to the target website.

  • API REQUEST

curl --request GET \
  --header "X-MyHeader: 123" \
  --url 'http://api.scraperapi.com/?api_key=API_KEY&keep_headers=true&url=http://example.com' 
  • PROXY MODE

curl --request GET \
  --header "X-MyHeader: 123" \
  --proxy "http://scraperapi.keep_headers=true:[email protected]:8001" \ 
  --insecure \
  "http://example.com"
circle-check

Last updated