{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper: Snapshots, History & Archived Pages",
    "description": "List every Internet Archive snapshot of a URL or a whole domain, find the closest capture to a date, track how a page changed over time, and download the archived HTML. Official CDX and availability APIs, no API key.",
    "version": "0.0",
    "x-build-id": "wZmclEeAd2oH9K3eo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/winterlock~wayback-machine-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-winterlock-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/winterlock~wayback-machine-scraper/runs": {
      "post": {
        "operationId": "runs-sync-winterlock-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/winterlock~wayback-machine-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-winterlock-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to do",
            "enum": [
              "snapshots",
              "availability",
              "pageHistory",
              "fetchSnapshot"
            ],
            "type": "string",
            "description": "List snapshots, find the closest capture to a date, track how a page changed, or download the archived content itself.",
            "default": "snapshots"
          },
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "One per line. A full URL, or a bare hostname to cover a whole site when combined with a match type below.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "Exact matches that one URL. Prefix matches everything under a path. Host matches one hostname. Domain matches the hostname and all its subdomains.",
            "default": "exact"
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Earliest capture to include. A year (2015), a month (201503), a date (20150301) or a full timestamp all work."
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Latest capture to include, in the same formats as From date."
          },
          "newestFirst": {
            "title": "Newest captures first",
            "type": "boolean",
            "description": "For List snapshots and Page history. The archive is ordered oldest first, so a capped run returns a page's earliest captures; turn this on to take the most recent ones instead. Download archived content always takes the most recent capture in the date range you set.",
            "default": false
          },
          "onlySuccessful": {
            "title": "Only successful captures",
            "type": "boolean",
            "description": "Skip captures the Archive recorded as redirects or errors, keeping only HTTP 200 responses.",
            "default": false
          },
          "filters": {
            "title": "Extra filters (advanced)",
            "type": "array",
            "description": "Raw CDX filters, one per line, such as mimetype:text/html or !statuscode:404. A leading ! negates the match.",
            "items": {
              "type": "string"
            }
          },
          "collapse": {
            "title": "Collapse (advanced)",
            "type": "array",
            "description": "Collapse consecutive rows sharing a field, one per line. digest keeps only captures where the content changed; timestamp:6 keeps one per month.",
            "items": {
              "type": "string"
            }
          },
          "nearestTo": {
            "title": "Nearest to date",
            "type": "string",
            "description": "For Closest snapshot. The date to search around, such as 20200101. Leave empty for the most recent capture."
          },
          "maxSnapshotsPerUrl": {
            "title": "Max snapshots per URL",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "For List snapshots and Page history. Popular pages hold tens of thousands of captures, so this is the main control on run size and cost.",
            "default": 500
          },
          "copiesPerUrl": {
            "title": "Archived copies to download per URL",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For Download archived content. 1 downloads the most recent capture in your date range; a higher number also downloads the captures before it, newest first. Each copy is one billed result.",
            "default": 1
          },
          "maxContentCharacters": {
            "title": "Max characters of archived content",
            "minimum": 500,
            "maximum": 1000000,
            "type": "integer",
            "description": "For Download archived content. Longer pages are cut off at this length and flagged as truncated.",
            "default": 200000
          },
          "maxItems": {
            "title": "Max items in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the run after saving this many items. Leave empty for no limit."
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "The Internet Archive is a nonprofit running on donations. Please leave this low.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for ordinary runs. Turn on Apify Proxy only if the Archive rate-limits a very long batch.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}