{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine API – Snapshots, Archived URLs & Page Changes",
    "description": "Internet Archive Wayback Machine API: list snapshots of any URL, find all archived URLs of a domain, first-seen / domain age, archived page text and what changed between two dates. Official CDX & availability APIs, no proxies, pay per result.",
    "version": "1.0",
    "x-build-id": "LSVFmfPV3E838WEKP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ostrata~wayback-machine-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ostrata-wayback-machine-api",
        "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/ostrata~wayback-machine-api/runs": {
      "post": {
        "operationId": "runs-sync-ostrata-wayback-machine-api",
        "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/ostrata~wayback-machine-api/run-sync": {
      "post": {
        "operationId": "run-sync-ostrata-wayback-machine-api",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs or domains",
            "type": "array",
            "description": "One per line: a domain (apify.com), a page URL (https://www.example.com/pricing) or a web.archive.org link.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to get",
            "enum": [
              "snapshots",
              "urls",
              "summary",
              "content",
              "compare"
            ],
            "type": "string",
            "description": "Snapshots and URLs are charged per record, Summary is one record per URL, Content and Compare are charged per archived page downloaded.",
            "default": "snapshots"
          },
          "matchType": {
            "title": "URL match",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "In 'All archived URLs' mode, Exact is treated as Host.",
            "default": "exact"
          },
          "from": {
            "title": "From date",
            "pattern": "^$|^\\d{4}(-?\\d{2}(-?\\d{2})?)?$",
            "type": "string",
            "description": "Optional. 2015, 2015-06 or 2015-06-30."
          },
          "to": {
            "title": "To date",
            "pattern": "^$|^\\d{4}(-?\\d{2}(-?\\d{2})?)?$",
            "type": "string",
            "description": "Optional. 2020, 2020-12 or 2020-12-31."
          },
          "collapse": {
            "title": "Deduplicate snapshots",
            "enum": [
              "none",
              "digest",
              "hour",
              "day",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Applies to Snapshots and Content modes.",
            "default": "digest"
          },
          "statusCodes": {
            "title": "HTTP status codes",
            "type": "array",
            "description": "Keep captures with these archived status codes. Empty = all (including redirects and errors).",
            "default": [
              "200"
            ],
            "items": {
              "type": "string"
            }
          },
          "mimeTypes": {
            "title": "MIME types",
            "type": "array",
            "description": "Optional, e.g. text/html, application/pdf.",
            "items": {
              "type": "string"
            }
          },
          "maxRecordsPerUrl": {
            "title": "Max records per URL",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Snapshots / URLs modes.",
            "default": 100
          },
          "maxPagesPerUrl": {
            "title": "Max archived pages per URL",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Content mode: how many snapshots to download per URL (oldest first within the date range).",
            "default": 3
          },
          "maxTextChars": {
            "title": "Max text characters per page",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "Content mode. 0 = no text, metadata only.",
            "default": 20000
          },
          "compareFrom": {
            "title": "Compare: from date",
            "pattern": "^$|^\\d{4}(-?\\d{2}(-?\\d{2})?)?$",
            "type": "string",
            "description": "Compare mode: the capture closest to this date is the 'before' version. 2023 or 2023-01-15."
          },
          "compareTo": {
            "title": "Compare: to date",
            "pattern": "^$|^\\d{4}(-?\\d{2}(-?\\d{2})?)?$",
            "type": "string",
            "description": "Compare mode: the capture closest to this date is the 'after' version. Empty = latest capture."
          },
          "ignorePatterns": {
            "title": "Compare: ignore patterns (regex)",
            "type": "array",
            "description": "Text removed before comparing, e.g. \\d{1,2}:\\d{2} for clocks or ©\\s*\\d{4}.",
            "items": {
              "type": "string"
            }
          },
          "maxDiffLines": {
            "title": "Compare: max lines listed",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Max added and removed lines returned per comparison (counts are always complete).",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}