{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper",
    "description": "Everything the Wayback Machine offers, in one actor: every saved copy of a website, every archived page of a site, what a page said on any date, and saving pages today. Also covers Common Crawl, a second web archive. No login needed, except to save pages.",
    "version": "0.0",
    "x-build-id": "Wp8PtdyCYHMA1HEjR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dead00~wayback-machine-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dead00-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/dead00~wayback-machine-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dead00-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/dead00~wayback-machine-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dead00-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": {
          "mode": {
            "title": "What do you want?",
            "enum": [
              "snapshots",
              "urlList",
              "pageContent",
              "savePages"
            ],
            "type": "string",
            "description": "Snapshot history = every saved copy with its date (the Wayback calendar). Archived URL list = every page of a site, with first and last capture (the Wayback 'URLs' tab). Page content = the text, title and links of saved copies. Save pages = archive pages now (Save Page Now).",
            "default": "snapshots"
          },
          "urls": {
            "title": "Website URLs",
            "type": "array",
            "description": "One per line, e.g. example.com or https://example.com/about. You can also paste a Wayback link.",
            "items": {
              "type": "string"
            }
          },
          "date": {
            "title": "Date",
            "type": "string",
            "description": "Start of the date range. For page content, the copy closest to this date. Format 2015, 2015-06 or 2015-06-01. Leave empty for all dates or the latest copy."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "End of the date range, e.g. 2018 or 2018-12-31. Leave empty for up to today."
          },
          "maxResults": {
            "title": "Max results per URL",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many rows to collect for each URL. With Archive set to Both, this applies to each archive.",
            "default": 100
          },
          "matchType": {
            "title": "Which pages",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "For the URL list, pick Whole site or everything under a URL.",
            "default": "exact"
          },
          "source": {
            "title": "Archive",
            "enum": [
              "wayback",
              "commoncrawl",
              "both"
            ],
            "type": "string",
            "description": "Snapshot history and page content. Common Crawl is a second web archive with different copies. Without a Date, Common Crawl covers the last 12 months. The URL list and Save pages use the Wayback Machine.",
            "default": "wayback"
          },
          "groupBy": {
            "title": "Show",
            "enum": [
              "all",
              "changes",
              "day",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Snapshot history only. Group copies like the Wayback calendar, or keep only new versions.",
            "default": "all"
          },
          "statusCodes": {
            "title": "Status codes",
            "type": "array",
            "description": "Only include copies with these responses. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "2xx",
                "3xx",
                "4xx",
                "5xx"
              ],
              "enumTitles": [
                "Working pages (2xx)",
                "Redirects (3xx)",
                "Not found and other errors (4xx)",
                "Server errors (5xx)"
              ]
            }
          },
          "fileTypes": {
            "title": "File types",
            "type": "array",
            "description": "Only include these kinds of files. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "html",
                "pdf",
                "image",
                "css",
                "javascript",
                "data",
                "video",
                "audio",
                "documents"
              ],
              "enumTitles": [
                "Web pages",
                "PDFs",
                "Images",
                "Stylesheets (CSS)",
                "Scripts (JavaScript)",
                "Data (JSON, XML)",
                "Video",
                "Audio",
                "Office documents"
              ]
            }
          },
          "urlContains": {
            "title": "URL contains",
            "type": "string",
            "description": "Only include URLs containing this text, e.g. /blog/ or .pdf. Case-sensitive."
          },
          "allVersions": {
            "title": "Every version in the date range",
            "type": "boolean",
            "description": "Get the content of every different version of the page between Date and End date, instead of one copy. Uses the Wayback Machine. Max results limits how many versions.",
            "default": false
          },
          "includeHtml": {
            "title": "Save the full HTML",
            "type": "boolean",
            "description": "Also save each archived page's complete HTML as a file and add its link (htmlUrl). Useful for rebuilding an old site.",
            "default": false
          },
          "archiveAccessKey": {
            "title": "archive.org access key",
            "type": "string",
            "description": "Needed only to save pages. Free: create an account at archive.org, then copy your keys from archive.org/account/s3.php."
          },
          "archiveSecretKey": {
            "title": "archive.org secret key",
            "type": "string",
            "description": "The secret key from the same page."
          },
          "skipIfArchivedWithin": {
            "title": "Skip if already saved within",
            "enum": [
              "never",
              "1d",
              "7d",
              "30d",
              "365d"
            ],
            "type": "string",
            "description": "Don't save a page again if the Wayback Machine already has a copy this recent.",
            "default": "never"
          },
          "saveOutlinks": {
            "title": "Also save linked pages",
            "type": "boolean",
            "description": "Also archive the pages the URL links to.",
            "default": false
          },
          "saveScreenshot": {
            "title": "Take a screenshot",
            "type": "boolean",
            "description": "Also save a full-page screenshot of each page.",
            "default": false
          },
          "saveErrorPages": {
            "title": "Save error pages too",
            "type": "boolean",
            "description": "Save the page even if it returns an error (404, 500).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}