Screenshot API error ยท HTTP 422

Country proxy refused the website

geo_target_refused

With ip_country_code, the proxy network we load pages through for that country will not load this website: its policy for the site. Nothing of the page was loaded.

How to recognize it

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

HTTP/1.1 422
Content-Type: application/json

{
  "error": {
    "code": "geo_target_refused",
    "message": "The IP location proxy refused to load this website (ip_country_code). Try another country, or render it without ip_country_code."
  },
  "message": "The IP location proxy refused to load this website (ip_country_code). Try another country, or render it without ip_country_code."
}

Common causes

  • A website that the proxy network does not load, for every country or for the one you asked for.

How to fix it

  1. Try another country in ip_country_code.
  2. Send the request without ip_country_code to load the page from our default location.

Billing

Not billed, and it does not count towards a free account’s 5 screenshots from other countries in any 5 days. 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.

Related parameters

ip_country_code. Each is described in the take endpoint reference.

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 100+ countries, 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 format=png \
  -H "apikey: YOUR-API-KEY" \
  -o screenshot.png

More free tools

Start using our Screenshot API for free today!

Get 300 requests / month for free