Spider Screenshot API

Capture full-page or viewport screenshots.

OpenAPI Specification

spider-cloud-screenshot-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Spider Cloud Crawling Screenshot API
  version: v1
  description: 'Spider Cloud is a Rust-based, AI-friendly web scraping and crawling platform.

    The REST API accepts and returns JSON (also XML, CSV, JSONL via the content-type header)

    and authenticates with a Bearer API key. Every account is allowed up to 10,000 core

    API requests per minute.

    '
  contact:
    name: Spider Cloud Support
    url: https://spider.cloud
    email: support@spider.cloud
  license:
    name: Proprietary
    url: https://spider.cloud
servers:
- url: https://api.spider.cloud
  description: Spider Cloud production API
security:
- bearerAuth: []
tags:
- name: Screenshot
  description: Capture full-page or viewport screenshots.
paths:
  /screenshot:
    post:
      tags:
      - Screenshot
      summary: Capture a Screenshot
      operationId: screenshot
      description: Capture a full-page or viewport screenshot of a URL.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenshotRequest'
      responses:
        '200':
          description: Screenshot binary or URL reference.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScreenshotResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        message:
          type: string
    ScreenshotResponse:
      type: object
      properties:
        url:
          type: string
        image_base64:
          type: string
        image_url:
          type: string
    ScreenshotRequest:
      type: object
      required:
      - url
      properties:
        url:
          type: string
        full_page:
          type: boolean
        viewport_width:
          type: integer
        viewport_height:
          type: integer
        format:
          type: string
          enum:
          - png
          - jpeg
          - webp
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key