{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper: Captures, Pages & URLs",
    "description": "Every capture the Wayback Machine holds of a URL, a path, a host or a whole domain: date, HTTP status, content type, digest and archive links. Read the archived pages as text, markdown or HTML, or list a site's URLs with their first and latest capture.",
    "version": "0.1",
    "x-build-id": "2UiNJdktkyruhQqwf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kaleidoscopelabs~wayback-machine-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kaleidoscopelabs-wayback-machine-scraper",
        "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/kaleidoscopelabs~wayback-machine-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kaleidoscopelabs-wayback-machine-scraper",
        "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/kaleidoscopelabs~wayback-machine-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kaleidoscopelabs-wayback-machine-scraper",
        "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 or domains",
            "minItems": 1,
            "type": "array",
            "description": "The addresses whose captures to list, one per line: a page (https://example.com/pricing) or a site (example.com). With or without https:// and www. give the same captures. A line that is not a web address is skipped and said in the log. Up to 1,000 per run.",
            "default": [
              "https://www.nasa.gov/"
            ],
            "items": {
              "type": "string"
            }
          },
          "scope": {
            "title": "Read",
            "enum": [
              "page",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "How much each line covers: the page itself (page), every address that begins with it (prefix), every page of its host (host), or the host and all its subdomains (domain). Host and domain read the whole site, whatever path the line has.",
            "default": "page"
          },
          "list": {
            "title": "List",
            "enum": [
              "captures",
              "urls"
            ],
            "type": "string",
            "description": "What the run stores: every capture (captures), or each URL the Wayback Machine holds under a line once (urls), with its first and latest capture, how many captures it has and how many versions of its content. Use urls with Addresses under this one, The whole host or The whole domain to get a site's pages. A URL list reads every capture of the site: one with millions of captures takes long, and the dates narrow it.",
            "default": "captures"
          },
          "capturesPerUrl": {
            "title": "Captures per URL or domain",
            "minimum": 0,
            "type": "integer",
            "description": "How many captures the run stores for each line, oldest first; 0 stores every capture, which for a whole site can be very many.",
            "default": 1000
          },
          "maxUrls": {
            "title": "URLs per line",
            "minimum": 0,
            "type": "integer",
            "description": "With List set to urls: how many URLs the run stores for each line, in the order of the Wayback Machine's index (by host, then path); 0 stores every URL.",
            "default": 1000
          },
          "from": {
            "title": "Captured from",
            "pattern": "^\\s*(\\d{4}(-\\d{2}(-\\d{2})?)?|\\d{4,14})?\\s*$",
            "type": "string",
            "description": "Only captures made on or after this date: a year (2020), a month (2020-03) or a day (2020-03-15). Empty: from the first capture."
          },
          "to": {
            "title": "Captured up to",
            "pattern": "^\\s*(\\d{4}(-\\d{2}(-\\d{2})?)?|\\d{4,14})?\\s*$",
            "type": "string",
            "description": "Only captures made on or before this date: a year (2020), a month (2020-03) or a day (2020-03-15). Empty: up to the latest capture."
          },
          "closestTo": {
            "title": "Closest to a date",
            "pattern": "^\\s*(\\d{4}(-\\d{2}(-\\d{2})?)?|\\d{4,14})?\\s*$",
            "type": "string",
            "description": "Store one capture of each page: the one closest to this date, before or after it, among those the status and content filters keep. A year (2020), a month (2020-03) or a day (2020-03-15); a year or a month means its first day. Works with the scope This page; the date range and One capture per are not used with it. Empty: list captures."
          },
          "onePer": {
            "title": "One capture per",
            "enum": [
              "capture",
              "hour",
              "day",
              "month",
              "year",
              "content"
            ],
            "type": "string",
            "description": "Thin each address's captures: every capture (capture), the first of each hour, day, month or year, or one each time the content changed from the capture before (content).",
            "default": "capture"
          },
          "statuses": {
            "title": "Page status",
            "enum": [
              "ok",
              "redirects",
              "errors",
              "notFound",
              "all"
            ],
            "type": "string",
            "description": "Which captures to keep by the HTTP status the site answered with when it was captured: pages that loaded (ok), redirects, errors (4xx and 5xx), pages that were gone (notFound: 404 and 410; a capture that repeats one unchanged is not listed), or all.",
            "default": "ok"
          },
          "types": {
            "title": "Content",
            "enum": [
              "pages",
              "pdf",
              "all"
            ],
            "type": "string",
            "description": "HTML pages only (pages), PDF files only (pdf; a capture that repeats a PDF unchanged is not listed), or every captured file: images, scripts, style sheets and the rest (all).",
            "default": "pages"
          },
          "content": {
            "title": "Read each capture's page",
            "enum": [
              "none",
              "text",
              "markdown",
              "html",
              "all"
            ],
            "type": "string",
            "description": "Store the page a capture holds with it: its title and its text, its markdown, its HTML as captured, or all three. Reading a page takes a few seconds for each capture, so it is done for the first captures of each line only (see Pages per URL or domain); pair it with One capture per month or content change to spread them over time. None lists the captures only.",
            "default": "none"
          },
          "pagesPerUrl": {
            "title": "Pages per URL or domain",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "With Read each capture's page: how many of each line's captures are stored with their page, oldest first. The line's other captures are stored without it.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}