{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine History: Snapshots & Archived URLs API",
    "description": "Get a website's history from the Wayback Machine using the official archive.org APIs. List every snapshot of a URL, every archived URL on a domain, or the capture closest to a date. Dates, status codes, snapshot links and raw links. Empty and failed lookups free.",
    "version": "0.1",
    "x-build-id": "rOywF8P07d8HbSBKJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hillcountrybots~wayback-history/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hillcountrybots-wayback-history",
        "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/hillcountrybots~wayback-history/runs": {
      "post": {
        "operationId": "runs-sync-hillcountrybots-wayback-history",
        "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/hillcountrybots~wayback-history/run-sync": {
      "post": {
        "operationId": "run-sync-hillcountrybots-wayback-history",
        "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": "Required. One per line, e.g. example.com, https://example.com/pricing or example.com/blog/. A bare domain means its homepage in Snapshots and Closest modes, and the whole domain in Archived URLs mode. Private and local addresses are refused (free).",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to get",
            "enum": [
              "snapshots",
              "timeline",
              "archivedUrls",
              "closest"
            ],
            "type": "string",
            "description": "Snapshots lists captures of the exact URL. Timeline returns one summary row per URL: first and last seen, total captures, captures per year, status code counts and content versions. Archived URLs lists unique URLs (one row per URL, first capture). Closest returns one row per input.",
            "default": "snapshots"
          },
          "matchType": {
            "title": "Archived URLs scope",
            "enum": [
              "domain",
              "host",
              "prefix"
            ],
            "type": "string",
            "description": "Only used in Archived URLs mode. Big domains can have millions of URLs: use a path prefix, a date range and Max rows per URL to keep runs short.",
            "default": "domain"
          },
          "from": {
            "title": "From date",
            "pattern": "^$|^[0-9]{4}([-/.]?[0-9]{2}){0,5}$",
            "type": "string",
            "description": "Optional. Earliest capture date: 2015, 2015-06 or 2015-06-30 (UTC)."
          },
          "to": {
            "title": "To date",
            "pattern": "^$|^[0-9]{4}([-/.]?[0-9]{2}){0,5}$",
            "type": "string",
            "description": "Optional. Latest capture date: 2020, 2020-12 or 2020-12-31 (UTC)."
          },
          "collapse": {
            "title": "One snapshot per",
            "enum": [
              "none",
              "hour",
              "day",
              "month",
              "year",
              "digest"
            ],
            "type": "string",
            "description": "Snapshots mode: keep only the first capture per hour, day, month or year, or only captures whose content changed. Great for 'how did this page change over time'.",
            "default": "none"
          },
          "onlyStatus200": {
            "title": "Only successful captures (HTTP 200)",
            "type": "boolean",
            "description": "Drop captures of redirects, errors and missing pages.",
            "default": false
          },
          "skipQueryStrings": {
            "title": "Skip URLs with query strings",
            "type": "boolean",
            "description": "Archived URLs mode: drop URLs with ?parameters (tracking tags, session IDs, search pages), which are usually noise. Turn off to keep them.",
            "default": true
          },
          "mimeType": {
            "title": "MIME type filter",
            "type": "string",
            "description": "Optional. Keep only one content type, e.g. text/html or application/pdf. Leave empty for all."
          },
          "closestTo": {
            "title": "Closest to date",
            "pattern": "^$|^[0-9]{4}([-/.]?[0-9]{2}){0,5}$",
            "type": "string",
            "description": "Closest mode only: target date such as 2012-01-01. Empty = the most recent capture."
          },
          "maxRowsPerUrl": {
            "title": "Max rows per input",
            "minimum": 1,
            "type": "integer",
            "description": "Exact maximum rows returned for each input URL or domain.",
            "default": 1000
          },
          "maxCapturesScanned": {
            "title": "Timeline: max captures counted per URL",
            "minimum": 100,
            "maximum": 200000,
            "type": "integer",
            "description": "Timeline mode only. Captures read per URL to build the counts (first and last seen are always exact). Very popular pages can have 100,000+ captures; above this cap the row says countsComplete: false.",
            "default": 50000
          },
          "maxRows": {
            "title": "Max rows in this run (spend cap)",
            "minimum": 1,
            "type": "integer",
            "description": "Exact maximum rows charged in this run, across all inputs. The run's own max-charge setting is also respected.",
            "default": 10000
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Seconds to wait for one archive API answer. Each request is retried up to 3 times with backoff when the archive is busy.",
            "default": 90
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}