Skip to main content

Transparent Status Codes & URLs

You can tell the ScrapeOps Proxy API to return the initial or final status code recieved from the target website using the initial_status_code and final_status_code parameters.

  • Initial Status Code: To have the initial status code returned then add initial_status_code=true to your request. This is useful if you want to see if the request is getting redirected to another URL. The initial status code will be returned in the Sops-Initial-Status-Code header.
  • Final Status Code: To have the final status code returned then add final_status_code=true to your request. This is useful if you want to validate the response if correct. The final status code will be returned in the Sops-Final-Status-Code header.

When these parameters are enabled the proxy will also return the Final URL in the Sops-Final-Url header.


curl -k "https://proxy.scrapeops.io/v1/?api_key=YOUR_API_KEY&url=http://example.com/&initial_status_code=true"

Proxy Selection

Enabling initial_status_code=true and final_status_code=true changes which proxy providers and proxy pools that can be used to process your request. If you enable this functionality it might change the selected proxy to one that performs worse than the normally selected proxy. So you should only enable this functionality if you really need to use this functionality.

Note: It is not possible to set both initial_status_code and final_status_code to true as they use different proxy providers.