Custom Headers

BrowserAPI allows you to add your own headers to a request and get customised results.

Custom HTTP headers are useful when you want to provide additional information to your request. If your request requires passing custom HTTP headers, all you have to do is to append WSA- to your header's name and add them to your request.

For example, the Sec-Fetch-Dest: document header will be passed as WSA-Sec-Fetch-Dest: document.

Only use this feature to get customized results, do not use this feature to avoid blocks. BrowserAPI has a powerful internal engine that takes care of everything for you.

Custom Headers Integration Examples

curl --request GET --url "https://api.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&url=http%3A%2F%2Fhttpbin.org%2Fheaders" --header "WSA-My-header: test" --header "WSA-User-Agent: potato"

Important! The url parameter has to be encoded.

( i.e. &url=https%3A%2F%2Fwww.webscrapingapi.com%2F )

Response Example
{
    "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",
        "X-Amzn-Trace-Id": "Root=1-6267c064-44fa9993017cfcc32e41dfc1"
    }
}

Last updated