{
  "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": "kUhIFRwTj2L5iXEhL"
  },
  "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": "Pages or domains to look up",
            "type": "array",
            "description": "One address per line. You get one row per archived snapshot (capture) of each address. Example: apify.com or apify.com/store. Leave empty only if you use \"Availability check\" or \"Archive.org item search\" below.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "How much of the site to include",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "Exact URL returns only that page. Path prefix = everything under that path. Whole host = every page on one host (www.example.com). Domain = the host plus all its subdomains.",
            "default": "exact"
          },
          "fromDate": {
            "title": "Captured from (optional)",
            "type": "string",
            "description": "Earliest capture date. Use YYYY, YYYYMM or YYYYMMDD, for example 2015 or 20200101. Empty = from the first capture.",
            "default": ""
          },
          "toDate": {
            "title": "Captured until (optional)",
            "type": "string",
            "description": "Latest capture date, same format, for example 2023 or 20231231. Empty = up to today.",
            "default": ""
          },
          "onlySuccessful": {
            "title": "Only HTTP 200 captures (loaded OK)",
            "type": "boolean",
            "description": "Turn on to drop captures that were errors or redirects and keep only pages that archived successfully. Ignored when \"HTTP status filter\" is filled in.",
            "default": false
          },
          "statusCodes": {
            "title": "HTTP status filter (optional)",
            "type": "string",
            "description": "Keep only these status codes. Examples: 404, 200,301,302, 3xx (any 300s), !200 (everything except 200), - (revisit records with no status). Empty = every status.",
            "default": ""
          },
          "mimeFilter": {
            "title": "Content type filter (optional)",
            "type": "string",
            "description": "Keep only one content type, for example text/html, application/pdf or image/jpeg. Start with ! to exclude it (!image/jpeg). Empty = all types.",
            "default": ""
          },
          "collapse": {
            "title": "Remove duplicate captures",
            "enum": [
              "none",
              "daily",
              "monthly",
              "yearly",
              "digest",
              "unique-urls"
            ],
            "type": "string",
            "description": "Pick how many captures to keep. One per day, month or year thins out busy pages. One per content change returns a new row only when the page really changed (best for change history). One per unique URL gives a site inventory.",
            "default": "none"
          },
          "inventoryStats": {
            "title": "Add capture counts to each URL",
            "type": "boolean",
            "description": "Only with \"One per unique URL\". Adds captureCount, firstSeen and lastSeen to every URL row. Slower: the actor reads all captures of each URL (up to \"Max captures to read\").",
            "default": false
          },
          "maxScanRows": {
            "title": "Max captures to read (1,000 to 1,000,000)",
            "minimum": 1000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Safety cap for inventory statistics and \"Only new results\" runs, which read more captures than they return. The run stops at this many. Default 200,000.",
            "default": 200000
          },
          "checkAvailabilityUrls": {
            "title": "URLs to check",
            "type": "array",
            "description": "One URL per line. Each URL returns its closest archived snapshot. Never-archived URLs return a free row with isArchived false. Example: https://example.com/pricing",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "availabilityTimestamp": {
            "title": "Closest to this date (optional)",
            "type": "string",
            "description": "Date as YYYYMMDD, for example 20200315. Empty = the most recent snapshot.",
            "default": ""
          },
          "itemSearchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "One query per line: plain text or a field query. Examples: web scraping, creator:\"Mark Twain\", collection:prelinger. Up to 10,000 items per query, one row per item.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "itemMediaType": {
            "title": "Type of item",
            "enum": [
              "any",
              "texts",
              "movies",
              "audio",
              "software",
              "image",
              "data",
              "web",
              "collection",
              "etree",
              "education"
            ],
            "type": "string",
            "description": "Restrict the search to one kind of archive.org item. Any type = no restriction.",
            "default": "any"
          },
          "itemSortBy": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "downloads",
              "downloadsLastWeek",
              "downloadsLastMonth",
              "newestAdded",
              "publicationDate",
              "title"
            ],
            "type": "string",
            "description": "How to order the item results, for example Most downloaded or Newest added.",
            "default": "relevance"
          },
          "onlyNew": {
            "title": "Only return new results",
            "type": "boolean",
            "description": "Skip rows that an earlier run with the same inputs already delivered (they are not charged). Ideal for a daily or weekly schedule. New = new content versions, captures, URLs, items or closest snapshot.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Name of this monitor memory. Empty = derived from your inputs. Reuse a name to share memory between runs, or use different names for separate monitors. Example: competitor-site-weekly",
            "default": ""
          },
          "resetSeen": {
            "title": "Start over (forget previous results)",
            "type": "boolean",
            "description": "Clear this monitor memory before the run so every row counts as new again.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows to return (1 to 1,000,000)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Most rows returned and charged (snapshots, availability checks and archive items). Free plan is capped at 10 rows (preview). Paid plans: leave empty for no limit."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}