Other Features
Session ID
The Session ID feature allows you to use the same IP address across multiple API requests. By setting the session_id=12345
parameter in your requests, ZenRows® will ensure that all requests made with the same Session ID are routed through the same IP address for 10 minutes.
This feature is useful for web scraping sites that track sessions or limit IP rotation. It helps simulate a persistent session and avoids triggering anti-bot systems that flag frequent IP changes.
1
to 99999
for session_id
.Original HTTP Code
By default, the ZenRows API returns standard HTTP codes based on the success or failure of your request. However, websites may provide their own status codes, which can give you valuable information about how the site handled the request (e.g., 403 Forbidden
or 500 Internal Server Error
).
If you need to retrieve the original HTTP status code returned by the target website, simply enable the original_status=true
parameter. This is particularly useful for debugging, understanding site-specific responses, or adapting scraping strategies based on the target site’s behavior.
Return content on error
When working with web scraping, you may encounter errors such as 404 Not Found
, 500 Internal Server Error
, or 503 Service Unavailable
. Even in these cases, the response might contain valuable information, such as error messages or partial content that can aid in debugging.
To access this content despite the error status, you can use the allowed_status_codes
parameter. This feature enhances the API’s debugging capabilities by allowing you to retrieve the content associated with specified error codes.
You can specify multiple status codes in a single request by separating them with commas.
allowed_status_codes
will incur charges!POST / PUT Requests
You can send POST and PUT requests using your preferred programming language, and ZenRows® will handle the data forwarding to the target site seamlessly. This allows you to interact with APIs or web forms that require data submission without worrying about the underlying mechanics of HTTP requests.
The response you receive will contain the original content from the target site, including any headers and cookies. This can be particularly useful for maintaining sessions or tracking state during your interactions with web applications.
Accessing headers and cookies will vary based on the method you use to make the request, so refer to the relevant documentation for your programming language or library to handle these elements appropriately.
Plan Usage
To monitor your subscription plan’s usage programmatically, you can call the endpoint /v1/subscriptions/self/details
. This allows you to track your API usage in real time, enabling better management of your resources and ensuring you stay within your plan’s limits.
Calls made to this endpoint do not count against your concurrency limits, making it an efficient way to gather usage statistics without impacting your scraping activities.
To use this feature, include your API Key in the request header using X-API-Key
. This is necessary for authentication and to ensure that the usage data corresponds to your account.
/usage
is deprecated, so please use the updated endpoint for all future requests to avoid disruptions.The output will be something similar to this:
Frequently Asked Questions (FAQ)
Was this page helpful?