{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Screenshot, PDF, and Visual Change Monitor",
    "version": "0.1",
    "x-build-id": "yLToffu0AemgKQwT6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nichedata-lab~screenshot/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nichedata-lab-screenshot",
        "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/nichedata-lab~screenshot/runs": {
      "post": {
        "operationId": "runs-sync-nichedata-lab-screenshot",
        "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/nichedata-lab~screenshot/run-sync": {
      "post": {
        "operationId": "run-sync-nichedata-lab-screenshot",
        "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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Public http or https pages. Usernames, passwords, and query tokens are removed from saved URLs.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "capture",
              "compare",
              "monitor"
            ],
            "type": "string",
            "description": "capture saves images. compare diffs urls against compareUrl. monitor diffs each page against the previous capture in the baseline store and saves a row only when the change is above the threshold.",
            "default": "capture"
          },
          "compareUrl": {
            "title": "URL to compare against",
            "type": "string",
            "description": "Required when mode is compare. The same devices and selector are used for both pages."
          },
          "devices": {
            "title": "Devices",
            "type": "array",
            "description": "One capture per device. mobile is 390x844, tablet is 820x1180, desktop is 1440x900. custom uses the width and height fields.",
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "tablet",
                "desktop",
                "custom"
              ]
            },
            "default": [
              "desktop"
            ]
          },
          "customWidth": {
            "title": "Custom width",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Width in pixels when a device is custom.",
            "default": 1280
          },
          "customHeight": {
            "title": "Custom height",
            "minimum": 320,
            "maximum": 4000,
            "type": "integer",
            "description": "Height in pixels when a device is custom.",
            "default": 800
          },
          "formats": {
            "title": "Output formats",
            "type": "array",
            "description": "Save one or more of png, jpeg, webp, and pdf.",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "jpeg",
                "webp",
                "pdf"
              ]
            },
            "default": [
              "png"
            ]
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Capture the full scrolled page. Turn this off for the viewport only. Element captures ignore this.",
            "default": true
          },
          "selector": {
            "title": "CSS selector",
            "type": "string",
            "description": "Capture only the first visible element that matches. Leave empty for the page."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When to take the shot. load waits for the load event, domcontentloaded waits for HTML, and networkidle waits until the network is quiet.",
            "default": "load"
          },
          "delayMs": {
            "title": "Delay after load (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Milliseconds to wait after waitUntil and before the shot.",
            "default": 0
          },
          "scrollToBottom": {
            "title": "Scroll to the bottom",
            "type": "boolean",
            "description": "Scroll the page so lazy content can load, then return to the top before the shot.",
            "default": false
          },
          "cleanPage": {
            "title": "Hide banners, ads, and chat widgets",
            "type": "boolean",
            "description": "Hide common cookie banners, ads, and chat widgets before the shot.",
            "default": true
          },
          "hideSelectors": {
            "title": "Extra selectors to hide",
            "type": "array",
            "description": "CSS selectors hidden in addition to the built-in banner rules. Braces are not allowed.",
            "items": {
              "type": "string"
            }
          },
          "includeMarkdown": {
            "title": "Include page text as Markdown",
            "type": "boolean",
            "description": "Save the page title and visible text as Markdown on the dataset row.",
            "default": false
          },
          "acceptLanguage": {
            "title": "Accept-Language",
            "type": "string",
            "description": "Accept-Language header sent on every request. Locale does not replace this value.",
            "default": "en-US,en;q=0.9"
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Browser locale, such as en-US. This sets navigator.language and does not change Accept-Language.",
            "default": "en-US"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string",
            "description": "IANA name, such as UTC or America/New_York.",
            "default": "UTC"
          },
          "changeThresholdPercent": {
            "title": "Change threshold (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Monitor mode saves a row only when the pixel change is above this number. Compare mode always saves a row and sets changed from the same rule.",
            "default": 5
          },
          "baselineStore": {
            "title": "Baseline store name",
            "type": "string",
            "description": "Named key-value store that keeps the previous PNG. It persists across scheduled runs.",
            "default": "screenshot-baselines"
          },
          "baselineKey": {
            "title": "Baseline key",
            "type": "string",
            "description": "Name mixed into the stored record. Standby calls also mix in the platform user id, so two accounts do not share a baseline.",
            "default": "default"
          },
          "maxItems": {
            "title": "Maximum captures",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on URL and device pairs in this run.",
            "default": 25
          },
          "requestTimeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Seconds allowed for navigation and for an element shot.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}