{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API, Full Page & URL/HTML to PDF",
    "description": "Website screenshot API and URL/HTML to PDF converter. Full-page PNG, JPEG, WebP and A4/Letter PDF from one page load. Batch from a URL list, sitemap or dataset; iPhone/Android views; cookie banners hidden; visual regression diff. $2 per 1,000 files, failed URLs free.",
    "version": "0.1",
    "x-build-id": "EI2Q1dpH0mNwRNVve"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rigel~website-screenshot-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rigel-website-screenshot-pdf",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/rigel~website-screenshot-pdf/runs": {
      "post": {
        "operationId": "runs-sync-rigel-website-screenshot-pdf",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/rigel~website-screenshot-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-rigel-website-screenshot-pdf",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Pages to capture. Only http and https. Credentials in the URL are rejected.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "html": {
            "title": "Raw HTML",
            "type": "string",
            "description": "HTML document to render, up to 2 MB. Produces one result with keys html-<hash>.<ext>."
          },
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "Read URLs from an existing dataset."
          },
          "urlField": {
            "title": "Dataset URL field",
            "type": "string",
            "description": "Field that contains the URL in each dataset item.",
            "default": "url"
          },
          "sitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "sitemap.xml URL. Sitemap indexes and .xml.gz are followed, up to maxUrls."
          },
          "maxUrls": {
            "title": "Maximum URLs",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper bound on URLs plus the optional HTML document.",
            "default": 100
          },
          "formats": {
            "title": "Formats",
            "minItems": 1,
            "type": "array",
            "description": "One stored file per format. All formats come from a single page load.",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "jpeg",
                "webp",
                "pdf"
              ],
              "enumTitles": [
                "PNG",
                "JPEG",
                "WebP",
                "PDF"
              ]
            },
            "default": [
              "png"
            ]
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the full page, capped at 16384 device pixels. Sets truncated when the page is cut.",
            "default": false
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "macbook_retina",
              "iphone_15",
              "pixel_8",
              "ipad",
              "og_card"
            ],
            "type": "string",
            "description": "Viewport, device scale, user agent, and touch.",
            "default": "desktop"
          },
          "width": {
            "title": "Width",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Override the profile width, in CSS pixels."
          },
          "height": {
            "title": "Height",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Override the profile height, in CSS pixels."
          },
          "deviceScaleFactor": {
            "title": "Device scale",
            "minimum": 1,
            "maximum": 3,
            "type": "number",
            "description": "Override the profile pixel density."
          },
          "selector": {
            "title": "Element selector",
            "type": "string",
            "description": "Capture the first matching element instead of the viewport."
          },
          "clip": {
            "title": "Clip region",
            "type": "object",
            "description": "Capture a rectangle in CSS pixels: {x, y, width, height}.",
            "properties": {
              "x": {
                "type": "integer",
                "minimum": 0,
                "title": "X",
                "description": "Left edge of the clip rectangle in CSS pixels."
              },
              "y": {
                "type": "integer",
                "minimum": 0,
                "title": "Y",
                "description": "Top edge of the clip rectangle in CSS pixels."
              },
              "width": {
                "type": "integer",
                "minimum": 1,
                "title": "Width",
                "description": "Width of the clip rectangle in CSS pixels."
              },
              "height": {
                "type": "integer",
                "minimum": 1,
                "title": "Height",
                "description": "Height of the clip rectangle in CSS pixels."
              }
            }
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG and WebP quality, from 1 to 100.",
            "default": 80
          },
          "omitBackground": {
            "title": "Transparent background",
            "type": "boolean",
            "description": "Transparent background for PNG and WebP.",
            "default": false
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "Navigation lifecycle event to wait for.",
            "default": "load"
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "Wait until this element is visible. Missing selectors are free and return SELECTOR_NOT_FOUND."
          },
          "delayMs": {
            "title": "Delay",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause after load, before the capture.",
            "default": 500
          },
          "scrollToLoad": {
            "title": "Scroll to load images",
            "type": "boolean",
            "description": "Scroll the page to trigger lazy images, then return to the top. Defaults to on for full-page captures."
          },
          "timeoutSecs": {
            "title": "Timeout",
            "minimum": 5,
            "maximum": 90,
            "type": "integer",
            "description": "Per-page budget for navigation and rendering.",
            "default": 30
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulate prefers-color-scheme: dark.",
            "default": false
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide common consent managers with CSS. Does not click Accept.",
            "default": true
          },
          "acceptCookies": {
            "title": "Accept cookies",
            "type": "boolean",
            "description": "Click a recognised consent Accept button before hiding the banner.",
            "default": false
          },
          "blockAds": {
            "title": "Block ads and trackers",
            "type": "boolean",
            "description": "Block requests to a curated list of ad and tracker domains.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide selectors",
            "type": "array",
            "description": "CSS selectors to hide before the capture.",
            "items": {
              "type": "string"
            }
          },
          "blurSelectors": {
            "title": "Blur selectors",
            "type": "array",
            "description": "CSS selectors to blur before the capture.",
            "items": {
              "type": "string"
            }
          },
          "customCss": {
            "title": "Custom CSS",
            "maxLength": 8192,
            "type": "string",
            "description": "CSS injected before the capture. Maximum 8 KB."
          },
          "pdf": {
            "title": "PDF options",
            "type": "object",
            "description": "Print options used when formats includes pdf. Defaults to A4, portrait, 1 cm margins, and print backgrounds.",
            "properties": {
              "format": {
                "type": "string",
                "enum": [
                  "A4",
                  "Letter",
                  "Legal",
                  "A3"
                ],
                "title": "Page size",
                "description": "Paper format such as A4 or Letter."
              },
              "landscape": {
                "type": "boolean",
                "title": "Landscape",
                "description": "Landscape orientation when true."
              },
              "printBackground": {
                "type": "boolean",
                "title": "Print background",
                "description": "Include CSS backgrounds in the PDF."
              },
              "scale": {
                "type": "number",
                "minimum": 0.1,
                "maximum": 2,
                "title": "Scale",
                "description": "Print scale factor (1 = 100%)."
              },
              "pageNumbers": {
                "type": "boolean",
                "title": "Page numbers",
                "description": "Add page numbers in the footer."
              },
              "headerTemplate": {
                "type": "string",
                "title": "Header HTML",
                "description": "Custom HTML header template for Chromium PDF."
              },
              "footerTemplate": {
                "type": "string",
                "title": "Footer HTML",
                "description": "Custom HTML footer template for Chromium PDF."
              }
            },
            "default": {
              "format": "A4",
              "landscape": false,
              "margin": {
                "top": "1cm",
                "right": "1cm",
                "bottom": "1cm",
                "left": "1cm"
              },
              "printBackground": true,
              "scale": 1,
              "pageNumbers": false
            }
          },
          "compareWithPrevious": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Diff the PNG against the baseline for the same URL and options. The first run only stores the baseline.",
            "default": false
          },
          "baselineStoreName": {
            "title": "Baseline store",
            "type": "string",
            "description": "Named key-value store that keeps baseline PNGs.",
            "default": "rigel-screenshot-baselines"
          },
          "diffThreshold": {
            "title": "Diff threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "pixelmatch threshold from 0 (strict) to 1.",
            "default": 0.1
          },
          "captureErrorPages": {
            "title": "Capture HTTP error pages",
            "type": "boolean",
            "description": "Store a capture of HTTP 4xx and 5xx responses. Those files are billed. Otherwise HTTP errors are free.",
            "default": false
          },
          "cookies": {
            "title": "Cookies",
            "type": "array",
            "description": "First-party cookies. Sent only to the target origin, never logged."
          },
          "headers": {
            "title": "Headers",
            "type": "object",
            "description": "Extra request headers. Sent only to the target origin, never after a redirect to another origin, and never to third-party subresources. Put cookies in the cookies field. Never logged."
          },
          "proxyUrl": {
            "title": "Proxy URL",
            "type": "string",
            "description": "Your own http or socks5 proxy, used for cleartext HTTP and for HTTPS. The host must be a public address. Apify Proxy is rejected, including its published IP addresses."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Parallel pages. Leave empty to derive it from run memory."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}