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

# Viewports

> Returns recommended viewport dimensions for both desktop and mobile scans. 
    Use these dimensions to ensure consistent rendering across scans and match common device resolutions.



## OpenAPI

````yaml GET /v1/viewports
openapi: 3.1.0
info:
  title: urlDNA API
  description: >-
    urlDNA API documentation. This API allows you to scan, analyze, and retrieve
    insights about URLs, helping to detect potential threats such as phishing,
    malware, and scams.
  version: 1.0.0
servers:
  - url: https://api.urldna.io
security: []
paths:
  /v1/viewports:
    get:
      tags:
        - Viewports
      summary: List viewports
      description: >-
        Returns recommended viewport dimensions for both desktop and mobile
        scans. 
            Use these dimensions to ensure consistent rendering across scans and match common device resolutions.
      operationId: viewports_v1_viewports_get
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Viewport'
                title: Response Viewports V1 Viewports Get
        '401':
          description: 'Unauthorized: API Key is missing or invalid.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '405':
          description: >-
            Method Not Allowed: The requested HTTP method is not supported for
            this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: 'Too Many Requests: Rate limit exceeded.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: 'Internal Server Error: An unexpected error occurred.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
components:
  schemas:
    Viewport:
      properties:
        width:
          type: integer
          title: Width
          description: Browser viewport width in pixels.
        height:
          type: integer
          title: Height
          description: Browser viewport height in pixels.
        device:
          $ref: '#/components/schemas/DeviceEnum'
          description: The device type simulated during the scan.
      type: object
      required:
        - width
        - height
        - device
      title: Viewport
    APIError:
      properties:
        detail:
          type: string
          title: Detail
          example: Error description message
      type: object
      required:
        - detail
      title: APIError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DeviceEnum:
      type: string
      enum:
        - DESKTOP
        - MOBILE
      title: DeviceEnum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````