---
title: "Fetch an image in its original format"
method: POST
path: "/getImage"
tags: ["Scraping"]
---

# Fetch an image in its original format

`POST /getImage`

## Request

- Base URL: `https://api.scrapeunblocker.com`
- URL: `https://api.scrapeunblocker.com/getImage`
- Auth: API key in header `x-scrapeunblocker-key`

Downloads the image at `url` through rotating proxies and returns its bytes exactly as the image host serves them, with the host's own `Content-Type` (JPEG, PNG, WebP, AVIF, GIF incl. animation, SVG, ICO, ...). Nothing is re-encoded. When the host answers with a bot challenge, a real browser opens the image and clears it. `url` must point at the image itself - for a page, use /getPageSource and take the image URL from its HTML.

## Query parameters

- `url` string, required
- `proxy_country` string

## Response `200`

The image bytes, unchanged, with the image's own `Content-Type`. `X-Destination-URL` carries the final URL after redirects. Billed.

- unknown

## Other responses

- `400`: Invalid URL, unsupported scheme or `proxy_country`, or `Hostname cannot be resolved` - the domain does not exist (billed).
- `403`: Blocked by bot protection on every exit and in the browser, or the image host refused the URL itself (expired signed link; then `X-Origin-Status` is set). Not billed.
- `404`: The image host answered 404 (the image does not exist); `X-Origin-Status: 404` tells it apart from a wrong API path. Billed.
- `410`: The image host answered 410 (gone), with `X-Origin-Status: 410`. Billed.
- `413`: The file is larger than 50 MB. Not billed.
- `415`: The URL is not an image (an HTML page or another file type); `X-Resource-Content-Type` names what it is. Not billed.
- `422`: Validation Error
- `504`: Request timed out (75 s cap). Not billed.
- `523`: Image host unreachable or answering 5xx on every exit (`X-Origin-Status` carries its status when it answered). Not a bot block, not billed - retry later.

---

[API](https://skmtc.dev/scrapeunblocker/apis/scrapeunblocker-api.md) · [All operations](https://skmtc.dev/scrapeunblocker/apis/scrapeunblocker-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrapeunblocker/apis/scrapeunblocker-api/revisions/c02f1254cc47?raw)
