> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapeunblocker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch an image in its original format

> 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.



## OpenAPI

````yaml /api-reference/openapi.json post /getImage
openapi: 3.1.0
info:
  title: ScrapeUnblocker API
  description: >-
    Public API for the ScrapeUnblocker proxy/anti-bot service. Authenticate
    every request with the `x-scrapeunblocker-key` header. Documented here:
    page-source extraction, Google SERP scraping, image fetch, and the dedicated
    plugin endpoints (search engines, marketplaces, reviews, travel, social and
    more). All other paths exist for internal operations and are intentionally
    hidden from this spec.
  version: 3.0.0
servers:
  - url: https://api.scrapeunblocker.com
    description: Production
security: []
paths:
  /getImage:
    post:
      tags:
        - Scraping
      summary: Fetch an image in its original format
      description: >-
        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.
      operationId: get_image_getImage_post
      parameters:
        - name: url
          in: query
          required: true
          schema:
            type: string
            title: Url
        - name: proxy_country
          in: query
          required: false
          schema:
            type: string
            title: Proxy Country
      responses:
        '200':
          description: >-
            The image bytes, unchanged, with the image's own `Content-Type`.
            `X-Destination-URL` carries the final URL after redirects. Billed.
          content:
            application/json:
              schema: {}
            image/*:
              schema:
                type: string
                format: binary
        '400':
          description: >-
            Invalid URL, unsupported scheme or `proxy_country`, or `Hostname
            cannot be resolved` - the domain does not exist (billed).
        '403':
          description: >-
            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':
          description: >-
            The image host answered 404 (the image does not exist);
            `X-Origin-Status: 404` tells it apart from a wrong API path. Billed.
        '410':
          description: >-
            The image host answered 410 (gone), with `X-Origin-Status: 410`.
            Billed.
        '413':
          description: The file is larger than 50 MB. Not billed.
        '415':
          description: >-
            The URL is not an image (an HTML page or another file type);
            `X-Resource-Content-Type` names what it is. Not billed.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '504':
          description: Request timed out (75 s cap). Not billed.
        '523':
          description: >-
            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.
      security:
        - ScrapeUnblockerKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ScrapeUnblockerKey:
      type: apiKey
      in: header
      name: x-scrapeunblocker-key
      description: Your ScrapeUnblocker API key. Apply on every request.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.