{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper - Snapshots & Every Archived URL",
    "description": "For site migrations, redirect maps, recovering deleted pages and domain diligence: every snapshot of a URL, or every archived URL under a domain, from the official Wayback CDX API - first and last capture, capture count, status codes and a link to the copy. One page alone can return 768,693 rows.",
    "version": "0.1",
    "x-build-id": "WnvanmpKzlmhnf7Sl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~wayback-machine-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-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/neverempty~wayback-machine-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-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/neverempty~wayback-machine-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-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 or domains",
            "type": "array",
            "description": "Pages or domains to look up, such as apify.com, https://www.nytimes.com/section/technology or docs.python.org. In URL-list mode you can also write *.example.com (every subdomain) or example.com/blog/* (everything under a path). A malformed entry is reported as its own row and never sent to the archive, because the archive would silently answer it with captures of a different address.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to return",
            "enum": [
              "snapshots",
              "urls"
            ],
            "type": "string",
            "description": "Snapshots: one row per archived capture of each URL, with its date, HTTP status, content type, size and a link to the archived copy. URL list: one row per distinct URL the archive holds under a domain, host or path, with when it was first and last captured, how many times, and every status code it has returned.",
            "default": "snapshots"
          },
          "matchType": {
            "title": "URL list scope",
            "enum": [
              "domain",
              "host",
              "prefix"
            ],
            "type": "string",
            "description": "Only used for the URL list. Domain covers the host and all its subdomains, host covers exactly that host, and prefix covers everything under the path you give.",
            "default": "domain"
          },
          "from": {
            "title": "From date",
            "type": "string",
            "description": "Only captures on or after this date. YYYY, YYYY-MM, YYYY-MM-DD or the archive's own digits (for example 2021 or 20210315). An impossible date is rejected with a reason rather than sent - the archive answers one with an empty result that looks exactly like 'nothing archived'.",
            "default": ""
          },
          "to": {
            "title": "To date",
            "type": "string",
            "description": "Only captures on or before this date, in the same forms as From date. The range is inclusive: 2021 means up to the end of 2021.",
            "default": ""
          },
          "collapse": {
            "title": "Thin out snapshots",
            "enum": [
              "month",
              "change",
              "day",
              "year",
              "none"
            ],
            "type": "string",
            "description": "Snapshots only. The archive often holds many captures a day of the same page. Month keeps one capture per month (the latest of each month in newest-first order, the earliest in oldest-first), change keeps only the captures where the content changed, none returns every capture. For the most heavily archived pages (such as google.com) thinning out can time out at the archive; a narrower date range or none works there.",
            "default": "month"
          },
          "order": {
            "title": "Order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Snapshots only. Newest returns the most recent captures first; oldest starts from the first capture the archive holds.",
            "default": "newest"
          },
          "statusFilter": {
            "title": "HTTP status",
            "enum": [
              "any",
              "ok",
              "redirect",
              "error"
            ],
            "type": "string",
            "description": "Snapshots only. Keep captures whose recorded HTTP status is a success (2xx), a redirect (3xx) or an error (4xx/5xx). The archive applies this filter before thinning out, so with one-per-month you get one matching capture for each month rather than losing the months whose first capture was a redirect. About one capture in eight is a revisit that records no status at all; those only appear when this is set to any.",
            "default": "any"
          },
          "maxResultsPerUrl": {
            "title": "Maximum rows per URL",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most snapshot rows, or distinct URLs in URL-list mode, returned for each entry. Up to 10,000.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}