{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper: Snapshots & Website History",
    "description": "Scrape the Wayback Machine: every archived snapshot of any URL with date, HTTP status, MIME type and archive link, full archived-URL inventories per domain, and closest-snapshot checks. Dedupe by day, month or year. Export CSV, Excel, JSON, XML. No login or API key.",
    "version": "0.1",
    "x-build-id": "qZcQUrEOjHfOl4b4e"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~wayback-machine-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-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/recordsdata~wayback-machine-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-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/recordsdata~wayback-machine-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-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 / domains (snapshot history)",
            "type": "array",
            "description": "Pages or domains to list archived Wayback Machine snapshots for (for example apify.com or apify.com/store). Leave empty only if you use the availability check list or the archive.org item search.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "exact = that page only; prefix = everything under the path; host = whole host; domain = host + subdomains.",
            "default": "exact"
          },
          "fromDate": {
            "title": "From date (optional)",
            "type": "string",
            "description": "Earliest snapshot, YYYY, YYYYMM or YYYYMMDD (e.g. 2015 or 20200101).",
            "default": ""
          },
          "toDate": {
            "title": "To date (optional)",
            "type": "string",
            "description": "Latest snapshot, YYYY, YYYYMM or YYYYMMDD.",
            "default": ""
          },
          "onlySuccessful": {
            "title": "Only HTTP 200 captures",
            "type": "boolean",
            "description": "Keep only snapshots that archived successfully (status 200). Ignored when \"HTTP status filter\" below is set.",
            "default": false
          },
          "statusCodes": {
            "title": "HTTP status filter (optional)",
            "type": "string",
            "description": "Keep only captures with these HTTP status codes: one code (404), a list (200,301,302), a pattern with x for any digit (3xx, 5xx), or a leading ! to exclude them (!200 = everything except 200). Use - for archive revisit records that carry no status. Empty = every status.",
            "default": ""
          },
          "mimeFilter": {
            "title": "MIME filter (optional)",
            "type": "string",
            "description": "Keep only this content type, e.g. text/html, application/pdf, image/jpeg. Start with ! to exclude it (!image/jpeg).",
            "default": ""
          },
          "collapse": {
            "title": "Deduplicate",
            "enum": [
              "none",
              "daily",
              "monthly",
              "yearly",
              "digest",
              "unique-urls"
            ],
            "type": "string",
            "description": "Collapse snapshots: one per day/month/year, one per content change (a new row only when the page content, its digest, differs from the previous capture), or one per unique URL (site inventory mode).",
            "default": "none"
          },
          "inventoryStats": {
            "title": "Inventory statistics per URL",
            "type": "boolean",
            "description": "With \"One per unique URL\": add captureCount, firstSeen and lastSeen to every URL row. The actor reads all captures of the URLs it returns (counted within your date, status and MIME filters), so it is slower than a plain inventory. Reading stops after \"Max captures to read\".",
            "default": false
          },
          "maxScanRows": {
            "title": "Max captures to read",
            "minimum": 1000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Safety limit for inventory statistics and only-new runs, which read more captures than they return. The run stops when this many captures were read (1,000 to 1,000,000). Default 200,000.",
            "default": 200000
          },
          "checkAvailabilityUrls": {
            "title": "Availability check URLs",
            "type": "array",
            "description": "URLs to check for their closest archived Wayback Machine snapshot. One row per URL; URLs that were never archived return a free row with isArchived false.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "availabilityTimestamp": {
            "title": "Availability target date (optional)",
            "type": "string",
            "description": "Find the snapshot closest to this date (YYYYMMDD). Empty = most recent.",
            "default": ""
          },
          "itemSearchQueries": {
            "title": "Archive.org item search queries",
            "type": "array",
            "description": "Search the Internet Archive collections (books, video, audio, software, images) with a text query or a field query, for example web scraping, creator:\"Mark Twain\" or collection:prelinger. One query per line; up to 10,000 items per query. Each item is one row.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "itemMediaType": {
            "title": "Item type",
            "enum": [
              "any",
              "texts",
              "movies",
              "audio",
              "software",
              "image",
              "data",
              "web",
              "collection",
              "etree",
              "education"
            ],
            "type": "string",
            "description": "Restrict the item search to one archive.org media type.",
            "default": "any"
          },
          "itemSortBy": {
            "title": "Item sort order",
            "enum": [
              "relevance",
              "downloads",
              "downloadsLastWeek",
              "downloadsLastMonth",
              "newestAdded",
              "publicationDate",
              "title"
            ],
            "type": "string",
            "description": "Order of the item search results.",
            "default": "relevance"
          },
          "onlyNew": {
            "title": "Only new results",
            "type": "boolean",
            "description": "Return only rows that no earlier run with the same inputs delivered: new content versions with \"One per content change\", new captures otherwise, new URLs in inventory mode, new archive.org items, a new closest snapshot in availability checks. Rows already seen are skipped and not charged. Ideal for a schedule.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Name for the memory of previous results. Leave empty to derive it from your inputs. Use the same name to share memory between runs, or a different name to keep separate monitors.",
            "default": ""
          },
          "resetSeen": {
            "title": "Forget previous results",
            "type": "boolean",
            "description": "Clear the memory for this monitor before the run, so every row counts as new again.",
            "default": false
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum rows to return and pay for (snapshots, availability checks and archive items). Free users are limited to 10 rows (preview). Paid users: leave empty for no limit, or set up to 1,000,000."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}