Parameters as Headers

Along with the “traditional” means of passing parameters, we also support passing parameters as headers. Passing parameters such as api_key, render, ultra_premium and instruction_set is very straightforward.


Instead of including the parameters in the URL


you can just pass them as headers

curl -H “x-sapi-url:” -H “x-sapi-api_key: <API_KEY>” -h “x-sapi-render: true”

Please note that the 'x-sapi-' prefix is used on each header to avoid collisions with headers used by target sites. We support all standard parameters available with the API. The instruction_set parameter is specifically supported only through headers.


curl -k --proxy “http://scraperapi:<API_KEY>” -H “x-sapi-render: true”

Note that credentials must still be passed to the proxy in the manner shown above, not as headers.

Last updated