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

# Screenshot a page

> Capture a full-page PNG screenshot of a rendered page.



## OpenAPI

````yaml https://api.hydrafetch.com/openapi.json post /v1/web/screenshot
openapi: 3.0.0
info:
  title: Hydrafetch API
  description: >-
    Hydrafetch is a web data API for LLMs and agents. Send a URL and get back
    clean Markdown, the page's own structured data, schema-shaped JSON, links,
    or a summary, with the navigation, banners and boilerplate stripped out.
    Scrape one page, crawl a whole site, run a search, or extract to a schema,
    all through one API with one response shape. Every call costs one credit a
    page whatever it took to fetch, and failures are never billed.


    Point us at a whole site and get every page. Ask a question and get answers
    with per-field

    confidence and the passage each value came from. You describe the outcome
    you want — the

    pipeline decides how to get it.


    ## Authentication


    Every request is authenticated with your API key in the `X-API-Key` header.
    Keys are scoped to a

    workspace and carry its credit balance.


    ## Credits


    Calls are billed in credits and charged only on success. A standard scrape
    is one credit; richer

    formats and the extraction tier cost more. Each response reports what it
    consumed.


    ## Conventions


    All timestamps are UTC ISO 8601. Long-running jobs (crawl, batch) return a
    job id you poll, or a

    webhook you register. Errors return a structured body with a stable `code`
    and an HTTP status.
  version: '1.0'
  contact:
    name: Hydrafetch
    url: https://hydrafetch.com
    email: support@hydrafetch.com
servers:
  - url: https://api.hydrafetch.com
    description: Production
security:
  - apiKey: []
tags:
  - name: Scrape
    description: >-
      Turn one URL into clean, LLM-ready content. Ask for Markdown, HTML, links,
      or the page’s own structured data, and poll a job id when a fetch runs
      long.
  - name: Crawl & batch
    description: >-
      Whole sites rather than single pages. Map every URL, crawl with depth and
      path rules, batch a list you already have, and read the webhook deliveries
      for either.
  - name: Search
    description: >-
      Search the web and get the ranked results back already scraped, so an
      agent has content to cite rather than links to fetch.
  - name: Extract
    description: >-
      Pull schema-shaped JSON out of one or many pages, with optional per-field
      confidence and the source passage behind each value.
  - name: Brand
    description: >-
      Resolve a domain into the company ready to render: logos for light and
      dark, the palette ranked by how the site uses it, fonts, socials, and the
      design system behind them.
  - name: Media
    description: >-
      Images and screenshots from a page, with source and alt text, or a
      rendered capture of the page as it appears.
paths:
  /v1/web/screenshot:
    post:
      tags:
        - Media
      summary: Screenshot a page
      description: Capture a full-page PNG screenshot of a rendered page.
      operationId: screenshot
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenshotRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenshotResponseDto'
components:
  schemas:
    ScreenshotRequestDto:
      type: object
      properties:
        url:
          type: string
          example: https://example.com
          description: The URL to screenshot. Must be http(s).
        fullPage:
          type: boolean
          example: true
          description: >-
            Capture the entire scrollable page instead of just the viewport.
            Default off.
        waitFor:
          type: number
          minimum: 0
          maximum: 30000
          description: Extra milliseconds to let the page settle before capture.
        timeout:
          type: number
          minimum: 1000
          maximum: 120000
          description: Overall time budget for the request, in milliseconds.
        maxAge:
          type: number
          minimum: 0
          description: >-
            Reuse a stored screenshot if it is younger than this many
            milliseconds. Defaults to 7 days, so a repeated request returns the
            stored PNG with `cached: true` without re-rendering — which also
            means it returns immediately and does not apply `waitFor`. Pass 0 to
            force a fresh capture.
        viewport:
          type: string
          enum:
            - desktop
            - laptop
            - tablet
            - mobile
          example: desktop
          description: >-
            Screen size to render at. Defaults to desktop (1920x1080). Ignored
            when width/height are given explicitly.
        viewportWidth:
          type: number
          minimum: 320
          maximum: 3840
          description: Exact viewport width in pixels. Overrides `viewport`.
        viewportHeight:
          type: number
          minimum: 240
          maximum: 2160
          description: >-
            Exact viewport height in pixels. Overrides `viewport`. With fullPage
            the capture still extends to the full page height.
      required:
        - url
    ScreenshotResponseDto:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/WebScreenshotDataDto'
      required:
        - data
    WebScreenshotDataDto:
      type: object
      properties:
        url:
          type: string
          example: https://example.com
          description: The URL you requested.
        finalUrl:
          type: string
          example: https://example.com/
          description: The final URL after any redirects.
        status:
          type: number
          example: 200
          description: HTTP status of the captured page.
        screenshot:
          type: string
          example: https://media.hydrafetch.com/screenshots/a1/a1b2c3.png
          description: Public URL of the captured PNG. Stable for the same URL and options.
        screenshotType:
          type: string
          enum:
            - fullPage
            - viewport
          example: viewport
          description: >-
            Whether the capture covers the whole scrollable page or just the
            viewport.
        width:
          type: number
          example: 1920
          description: Image width in pixels.
        height:
          type: number
          example: 1080
          description: Image height in pixels.
        cached:
          type: boolean
          example: false
          description: >-
            True when a stored screenshot was reused instead of capturing a new
            one.
      required:
        - url
        - finalUrl
        - status
        - screenshot
        - screenshotType
        - width
        - height
        - cached
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key

````