Troubleshooting Response Size Too Large Errors
ZenRows enforces a maximum response size per request, which varies depending on your subscription plan. If the response exceeds your plan’s limit (whether it’s HTML content, JSON data, or a screenshot), you will receive a 413 Content Too Large
error and the response will not be delivered.
This error usually occurs when:
- You target pages with large amounts of HTML or dynamic content
- You use
json_response=true
, which includes all background network requests - You capture high-resolution or full-page screenshots
Below are ways to reduce the response size and troubleshoot this issue.
1. Check If the Response Exceeds Your Plan’s Limit
Start by confirming whether the requested content goes over your plan’s response size allowance. This includes:
- HTML from the page
- JSON output (if
json_response=true
is used) - Screenshots
Try the same request without optional parameters like json_response=true
to compare the difference in response size.
2. Use Targeted Extraction
Instead of fetching the entire HTML, extract only what you need using:
- CSS selectors or XPath to select specific elements
- The
outputs
parameter to return items like emails, phone numbers, links, or headings
3. Optimize Screenshot Requests
Large screenshots can exceed the size limit. To avoid this:
- Use a CSS selector (like
screenshot_selector
) to capture a specific part of the page - Avoid full-page screenshots unless strictly necessary
- Reduce file size with
screenshot_format
(for example, JPEG) andscreenshot_quality
4. Avoid json_response=true
if Not Needed
This parameter includes all network activity such as AJAX and XHR requests, which can significantly increase the response size.
Remove it if you do not need this data. Instead, use targeted selectors to extract what matters.
5. Block Unnecessary Resources
You can use the block_resources
parameter to prevent loading heavy assets like images, fonts, or videos. This reduces the total page weight.
ZenRows blocks some resource types like stylesheets and images by default to improve performance.
Only override this behavior when necessary.
To disable all blocking, set block_resources=none
.
Learn more in the Block Resources Documentation.
Still Receiving the Error?
If the page is too large by nature and optimizations do not resolve it:
- Make multiple requests by dividing the page into sections
- Upgrade your plan for higher response size limits
- Contact us at success@zenrows.com for support
A 413 Content Too Large
error means the request was successful but the final output could not be returned due to size restrictions. Use the suggestions above to avoid this limit and ensure efficient scraping.