Other Features
Session ID
Use the same IP for each API Request by using&session_id=12345
. ZenRows will maintain a session for each ID for 10 minutes.
You will need to keep track of them on your side by storing each Session ID so you can reuse them.
Original HTTP Code
ZenRows API returns HTTP Codes depending on the result of the request. If you want to return the status code provided by the website, enable &original_status=true
.
Return content on error
When you need to debug errors or work with resources that display errors 404 (Not Found), 500 (Internal Server Error), or 503 (Service Unavailable), the response may still have valuable data. To help with this, you can use the allowed_status_codes
parameter.
This feature will allow you to obtain the content where you would get an error, enhancing the API’s debugging capabilities and overall utility. These requests will be charged.
To use it, you can include the allowed_status_codes
parameter in your requests. You can send several status codes separated by commas.
POST / PUT Requests
Send POST / PUT requests as usual with your chosen language. ZenRows will transparently forward the data to the target site.
The return value will be the original response’s content. Headers and cookies will also be part of the response. The way to access them will depend on the manner of calling.
Plan Usage
Check the plan usage programmatically by calling the endpoint /v1/subscriptions/self/details
. Usage calls will not count for concurrency, and results are available in real-time.
You will need to include your API Key using the X-API-Key
header.
The old endpoint /usage
is deprecated for new plans.