{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper - Archived URLs & Website History",
    "description": "Internet Archive Wayback Machine data: every archived URL of a website, a page's versions over time, the closest snapshot per URL, site history and old page content as Markdown. $1/1,000 rows.",
    "version": "0.1",
    "x-build-id": "PZY7DQdPRz56aUlQE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidytools~wayback-machine-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidytools-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/tidytools~wayback-machine-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidytools-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/tidytools~wayback-machine-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidytools-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": "Websites or pages",
            "type": "array",
            "description": "Main input (fill this, or `urlsText` / `startUrls`). One per line: a domain (example.com) or a full page URL (https://example.com/pricing). In \"Archived URLs\" mode a domain lists every archived page of the site; in the other modes each line is one page (a bare domain means its home page). Invalid lines get an error row and are not charged.",
            "items": {
              "type": "string"
            }
          },
          "urlsText": {
            "title": "More URLs (pasted text)",
            "type": "string",
            "description": "Optional: paste a long list (new lines, commas or spaces). Merged with the list above."
          },
          "startUrls": {
            "title": "URL list file (optional)",
            "type": "array",
            "description": "Optional: URLs or a remote text/CSV file with URLs (requestsFromUrl). Merged with the lists above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mode": {
            "title": "What to get",
            "enum": [
              "urls",
              "snapshots",
              "closest",
              "history"
            ],
            "type": "string",
            "description": "Archived URLs: find old or deleted pages of a website (site migrations, content recovery, SEO). Snapshots: every archived version of one page. Closest: one snapshot link per URL, e.g. to replace dead links. History: one summary row per domain or page, e.g. to check an expired domain before buying it. Values: urls = Archived URLs of a site; snapshots = Snapshots of a page over time; closest = Closest snapshot to a date; history = Site history summary per domain.",
            "default": "urls"
          },
          "matchType": {
            "title": "Archived URLs: scope",
            "enum": [
              "domain",
              "host",
              "prefix"
            ],
            "type": "string",
            "description": "Only for \"Archived URLs\" mode. Values: domain = Whole domain incl. subdomains (example.com, blog.example.com...); host = This host only (www.example.com); prefix = Only URLs starting with the given path (example.com/blog/).",
            "default": "domain"
          },
          "onlySuccessful": {
            "title": "Only successful captures (HTTP 200)",
            "type": "boolean",
            "description": "Skip captures of redirects, errors and \"not found\" pages. Turn off to also list redirects (3xx) and errors (4xx/5xx), e.g. to see when a page started redirecting. Not used in History mode (it always counts every capture).",
            "default": true
          },
          "pagesOnly": {
            "title": "Archived URLs: only HTML pages",
            "type": "boolean",
            "description": "Skip images, scripts, stylesheets, PDFs and other files. Turn off to list every archived file.",
            "default": true
          },
          "urlPattern": {
            "title": "Archived URLs: URL must match (regex)",
            "type": "string",
            "description": "Optional. Only URLs matching this regular expression anywhere in the URL, e.g. /blog/ or \\.pdf (with \"only HTML pages\" off)."
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Optional. Only captures on or after this date: 2019, 2019-05, 2019-05-07 or relative like \"2 years\" (ago)."
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Optional. Only captures on or before this date (same formats as From date)."
          },
          "collapse": {
            "title": "Snapshots: which ones",
            "enum": [
              "changes",
              "none",
              "day",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only for \"Snapshots\" mode. Popular pages have thousands of identical captures; \"only when the content changed\" keeps one row per version. Values: changes = Only when the content changed (recommended); none = Every capture; day = At most one per day; month = At most one per month; year = At most one per year.",
            "default": "changes"
          },
          "targetDate": {
            "title": "Closest: target date",
            "type": "string",
            "description": "Only for \"Closest\" mode. The snapshot nearest to this date (2019-05-07, 2019 or \"6 months\"). Empty = the latest snapshot."
          },
          "includeContent": {
            "title": "Include page content (Markdown)",
            "type": "boolean",
            "description": "Snapshots and Closest modes: download each archived HTML page and add its content as clean Markdown (or plain text). Charged per page with content (see pricing); failed downloads are free. Capped by \"Max pages with content\".",
            "default": false
          },
          "contentFormat": {
            "title": "Content format",
            "enum": [
              "markdown",
              "text"
            ],
            "type": "string",
            "description": "Format of the page content. Values: markdown = Markdown (headings, links, lists); text = Plain text.",
            "default": "markdown"
          },
          "maxContentPages": {
            "title": "Max pages with content",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cost cap for page content across the run. The Wayback Machine serves archived pages slowly (a few seconds each), so large numbers take a while.",
            "default": 20
          },
          "maxContentChars": {
            "title": "Max content characters per page",
            "minimum": 1000,
            "maximum": 500000,
            "type": "integer",
            "description": "Longer content is cut (contentTruncated: true).",
            "default": 100000
          },
          "maxResultsPerInput": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Archived URLs or snapshots per line of input. Each result row is charged.",
            "default": 1000
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Cost cap across the whole run (archived URL, snapshot and closest rows).",
            "default": 10000
          },
          "maxConcurrency": {
            "title": "Inputs in parallel",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many inputs are processed at the same time. All requests share one polite rate limit (next setting), so more parallel inputs do not hit the Internet Archive harder.",
            "default": 2
          },
          "requestIntervalMs": {
            "title": "Min time between Wayback requests (ms)",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "The Internet Archive rate-limits heavy users. Index queries are spaced at least this far apart (default 2,500 ms: the index answers \"too many requests\" above about 24 queries a minute), page downloads twice as far. Rate-limited or \"temporarily offline\" answers are retried with back-off (not charged).",
            "default": 2500
          },
          "inputTimeoutSecs": {
            "title": "Time limit per input (seconds)",
            "minimum": 60,
            "maximum": 7200,
            "type": "integer",
            "description": "An input that takes longer gets a timeout error row (not charged).",
            "default": 900
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Only used for requests sent from Apify's network (all requests of this Actor). Apify proxy usage is billed to your Apify account. Not needed normally."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}