{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot API & URL to PDF: Full Page, Mobile, Dark",
    "description": "Turn URLs into full-page or viewport screenshots (PNG/JPEG) and PDFs (A4, Letter, Legal) with desktop, iPhone, Pixel and iPad presets, dark mode, cookie banners hidden and lazy images loaded. Bulk lists, CSV or dataset input; files with direct links.",
    "version": "0.1",
    "x-build-id": "JfpwXPD3BWkBsOWAm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/latamdatatools~screenshot-pdf-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-latamdatatools-screenshot-pdf-api",
        "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/latamdatatools~screenshot-pdf-api/runs": {
      "post": {
        "operationId": "runs-sync-latamdatatools-screenshot-pdf-api",
        "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/latamdatatools~screenshot-pdf-api/run-sync": {
      "post": {
        "operationId": "run-sync-latamdatatools-screenshot-pdf-api",
        "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, one per line.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset with URLs (optional)",
            "type": "string",
            "description": "ID of an Apify dataset; the URL is read from \"URL field\"."
          },
          "csvUrl": {
            "title": "CSV / Google Sheets URL (optional)",
            "type": "string",
            "description": "Public CSV with a header row, or a Google Sheets link shared as \"Anyone with the link\"."
          },
          "urlField": {
            "title": "URL field",
            "type": "string",
            "description": "Field or column with the URL in the dataset or CSV.",
            "default": "url"
          },
          "screenshot": {
            "title": "Screenshot",
            "type": "boolean",
            "description": "Save an image of each page.",
            "default": true
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the whole scrollable page (up to \"Max height\"). Off = only the first screen (viewport).",
            "default": true
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "png",
              "jpeg"
            ],
            "type": "string",
            "description": "PNG is lossless; JPEG files are much smaller.",
            "default": "png"
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "10-100. Only for JPEG.",
            "default": 80
          },
          "maxHeight": {
            "title": "Max height (px)",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Full-page screenshots taller than this are cut (row marked \"truncated\").",
            "default": 15000
          },
          "pdf": {
            "title": "PDF",
            "type": "boolean",
            "description": "Save a PDF of each page.",
            "default": false
          },
          "pdfFormat": {
            "title": "Paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "Tabloid"
            ],
            "type": "string",
            "description": "PDF paper size.",
            "default": "A4"
          },
          "pdfLandscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Landscape orientation.",
            "default": false
          },
          "pdfPrintBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Include background colours and images.",
            "default": true
          },
          "pdfScreenMedia": {
            "title": "Look like the screen",
            "type": "boolean",
            "description": "Use the screen styles instead of the site's print stylesheet.",
            "default": true
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop-1366",
              "desktop-1920",
              "laptop-1280",
              "desktop-1440-retina",
              "iphone-15",
              "pixel-7",
              "ipad",
              "custom"
            ],
            "type": "string",
            "description": "Viewport size, pixel density and mobile user agent.",
            "default": "desktop-1366"
          },
          "viewportWidth": {
            "title": "Custom width",
            "minimum": 240,
            "maximum": 3840,
            "type": "integer",
            "description": "Only with device \"Custom\"."
          },
          "viewportHeight": {
            "title": "Custom height",
            "minimum": 240,
            "maximum": 2160,
            "type": "integer",
            "description": "Only with device \"Custom\"."
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Ask the site for its dark theme (prefers-color-scheme: dark). Sites without a dark theme look the same.",
            "default": false
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide common consent popups (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast and generic cookie bars) with CSS. Nothing is accepted or rejected for you.",
            "default": true
          },
          "hideSelectors": {
            "title": "Extra CSS selectors to hide",
            "type": "array",
            "description": "E.g. \".chat-widget\", \"#newsletter-popup\".",
            "items": {
              "type": "string"
            }
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When the page counts as loaded before the extra delay.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Wait after loading, for animations and late content.",
            "default": 1000
          },
          "waitForSelector": {
            "title": "Wait for selector (optional)",
            "type": "string",
            "description": "CSS selector that must appear before capturing (max 15 s)."
          },
          "scrollToBottom": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scroll through the page before a full-page screenshot so lazy-loaded images appear.",
            "default": true
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout (seconds)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Slow pages are captured with what loaded so far.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "2 fits in 1 GB of memory; raise memory to go faster.",
            "default": 2
          },
          "maxUrls": {
            "title": "Max URLs per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Unique URLs captured per run.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}