Screenshot API error ยท HTTP 424

Target website unreachable

target_unreachable

The browser could not load the page. The message names Chrome’s network error, such as ERR_TOO_MANY_REDIRECTS or ERR_SSL_PROTOCOL_ERROR; each has its own page. A connection that could not be opened at all (refused, timed out, unreachable) is reported as ERR_CONNECTION_FAILED.

How to recognize it

The API answers with status 424 and a JSON body with the message and the error.code target_unreachable, for example:

HTTP/1.1 424
Content-Type: application/json

{
  "error": {
    "code": "target_unreachable",
    "message": "The target website could not be loaded (ERR_CONNECTION_FAILED)."
  },
  "message": "The target website could not be loaded (ERR_CONNECTION_FAILED)."
}

Common causes

  • The website is down, or its firewall refuses connections from data centers.
  • A redirect loop, a broken TLS setup or an invalid response.
  • A page that answers with nothing at all.

How to fix it

  1. Open the error’s page for its causes: ERR_CONNECTION_FAILED, ERR_TOO_MANY_REDIRECTS, ERR_SSL_PROTOCOL_ERROR, …
  2. Check that the site loads from another network.

Retry

When the site is back. A retry right away usually fails the same way.

Billing

Not billed: a request answered with this error does not count against your quota. One exception: when an evaluate step of actions or the scripts ran in the page before the render failed, it is billed as one request, because that code could read the page, unless the failure is ours.

Common Chrome network errors

What each error means, how to fix it, and how the API reports it:

Every response carries an X-Request-Id header. If this page does not explain the error, write to support@screenshotbase.com with that id. All statuses: status codes.

Other API errors

Screenshot API

Take screenshots from your code

screenshotbase renders any website in a real browser and returns the image: full page or viewport, any device size, retina, from 117 countries (paid plans), with cookie banners and ads hidden.

/v1/take documentation Screenshot API All documentation

300 free screenshots every month. No credit card required.

GET https://api.screenshotbase.com/v1/take?url=https://example.com&full_page=true

# Response: the image (PNG, JPG, WebP, AVIF or GIF)
curl -G "https://api.screenshotbase.com/v1/take" \
  --data-urlencode "url=https://example.com" \
  -d viewport_width=1280 -d viewport_height=800 \
  -d full_page=true -d format=png \
  -H "apikey: YOUR-API-KEY" \
  -o screenshot.png

More free tools