Zyte API error handling#
While using Zyte API, you may get the following type of responses:
Zyte API sends a successful response, i.e. a response with an HTTP status code of 200, when that response provides the requested data, ban-free.
A Zyte API response is considered successful even in the following scenarios:
Some browser actions have failed.
The webpage content does not match the specified automatic extraction property.
Bad website responses#
When a website sends a response with an HTTP status code other than 200, and that response is not the result of a ban, Zyte API sends that response to you.
Browser action failures#
Browser action failures, such as timeouts, do not cause Zyte API to send an unsuccessful response.
Zyte API returns your requested output (e.g. browser HTML, screenshot) the way it was at the time of the action error, and the Zyte API response includes an actions field with details about the outcome of each action.
Automatic extraction mismatches#
Mismatches between the webpage content and the specified automatic extraction request field do not cause Zyte API to send an unsuccessful response.
Zyte API returns your requested output, including the
field that indicates the probability that the specified automatic extraction
property matches the webpage content.
You are not charged for rate-limiting responses.
Zyte API may send a response with an HTTP status code of 429 or 503 for rate-limiting purposes.
The right way to handle any rate-limiting response is to retry its request as many times as needed until you get a non-rate-limiting response.
Rate-limiting responses are sent in the following scenarios:
You have exceeded your account rate limit.
After signup, Zyte API accounts are allowed, by default, a maximum of 500 requests per minute. You may open a support ticket to request a higher rate limit for your account.
When making an efficient use of Zyte API, getting a small percentage of rate-limiting responses due to exceeding your account rate limit is expected and normal.
You have exceeded your website rate limit.
Each website has a different, website-specific rate limit. These limits exist to avoid causing issues on websites.
Zyte API is overloaded.
You are not charged for unsuccessful responses.
Zyte API sends an unsuccessful response, i.e. a response with an HTTP status code of 400 or higher that is not a rate-limiting response, when Zyte API cannot provide the requested data.
Zyte API sends unsuccessful responses in the following scenarios:
Your request is invalid
Your account has been suspended
Temporary download errors#
Zyte API sends an HTTP 520 response when a temporary error prevents downloading the requested URL. You can retry your request until you get a different type of response.
If retries do not make a difference, please open a support ticket to report the issue.
Permanent download errors#
Zyte API sends an HTTP 521 response when a permanent error prevents downloading the requested URL.
You can wait for us to address the issue, or open a support ticket and ask to be notified when the issue is resolved.
For some websites, Zyte API may sometimes accidentally flag some temporary download errors as permanent download errors. If sending the same Zyte API request multiple times returns an HTTP 521 error only sometimes, you might want to treat HTTP 521 errors as HTTP 520 errors for the target website, i.e. retry them automatically, until we resolve your issue report.
If Zyte API sends an HTTP 500 response, it means there is an unexpected issue affecting Zyte API. If the issue persists, feel free to open a support ticket and ask to be notified when the issue is resolved.
Zyte API may send a response with an HTTP status code of 400, 401, or 422 if there is an error in your request, including:
Zyte API sends an HTTP 403 response if you Zyte API account is suspended.
Causes of account suspension include:
When retrying requests automatically, please use an exponential backoff algorithm: for any given request, increase the time between retries exponentially.
A banned response is a response from a website that is different from the response that a person would have received.
Zyte API handles banned responses automatically and transparently, so that you never get a banned response.
For a given request, if Zyte API cannot avoid a banned response in a reasonable time, Zyte API sends you a temporary download error response, for which you are not charged. You can then retry your request as many times as needed until Zyte API succeeds.
We monitor and proactively work on improving Zyte API success rates and response times. However, if you wish, you may open a support ticket and ask to be notified when an issue that affects you is resolved.
Zyte API uses many different techniques to avoid bans. However, Zyte API does not log into websites automatically. Zyte API cannot automatically get you data that is always locked behind a user login.