{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper – Snapshots and History",
    "description": "Wayback Machine snapshots for any URL or domain with no 10,000-row cap, at $2 per 1,000. Closest capture to a date, a one-row domain history, and archived text when you ask.",
    "version": "0.1",
    "x-build-id": "UvfhpKFcBmYe5yLhI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/martinvarelaa~wayback-machine-snapshots/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-martinvarelaa-wayback-machine-snapshots",
        "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/martinvarelaa~wayback-machine-snapshots/runs": {
      "post": {
        "operationId": "runs-sync-martinvarelaa-wayback-machine-snapshots",
        "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/martinvarelaa~wayback-machine-snapshots/run-sync": {
      "post": {
        "operationId": "run-sync-martinvarelaa-wayback-machine-snapshots",
        "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": [
          "targets"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "list-snapshots",
              "closest-snapshot",
              "domain-summary"
            ],
            "type": "string",
            "description": "List snapshots, the capture closest to a date, or one history row per domain.",
            "default": "list-snapshots"
          },
          "targets": {
            "title": "URLs or domains",
            "type": "array",
            "description": "One URL or domain per line, for example https://example.com or example.com/pricing.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "Exact URL is the reliable default. Domain-wide lists often time out at archive.org; use Domain history summary for a whole site.",
            "default": "exact"
          },
          "from": {
            "title": "From",
            "type": "string",
            "description": "First day to include. YYYY, YYYY-MM, or YYYY-MM-DD. Example: 2015-01-01."
          },
          "to": {
            "title": "To",
            "type": "string",
            "description": "Last day to include. YYYY, YYYY-MM, or YYYY-MM-DD. Example: 2015-12-31."
          },
          "closestTo": {
            "title": "Date for the closest snapshot",
            "type": "string",
            "description": "Used in closest mode. Example: 2015-01-01."
          },
          "collapse": {
            "title": "Collapse duplicates",
            "enum": [
              "none",
              "digest",
              "day",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Year keeps the default run short. Digest keeps a row only when the archived content changed.",
            "default": "year"
          },
          "statusFilter": {
            "title": "HTTP status",
            "enum": [
              "any",
              "200",
              "3xx",
              "4xx"
            ],
            "type": "string",
            "description": "200 keeps successful captures. 3xx and 4xx use the CDX status prefix.",
            "default": "200"
          },
          "mimeFilter": {
            "title": "MIME type",
            "type": "string",
            "description": "Example: text/html. Leave empty to keep every MIME type.",
            "default": "text/html"
          },
          "maxSnapshots": {
            "title": "Maximum snapshots",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many snapshot rows. There is no hidden 10,000 cap.",
            "default": 10
          },
          "fetchContent": {
            "title": "Fetch archived page content",
            "type": "boolean",
            "description": "Download the archived page and return text, Markdown, or HTML. Charged per downloaded page.",
            "default": false
          },
          "contentFormat": {
            "title": "Content format",
            "enum": [
              "text",
              "markdown",
              "html"
            ],
            "type": "string",
            "description": "Used only when Fetch archived page content is on.",
            "default": "text"
          },
          "maxContentPages": {
            "title": "Maximum pages to download",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on archived pages downloaded in the run, even if Maximum snapshots is higher.",
            "default": 10
          },
          "onlyChanged": {
            "title": "Only rows where the content changed",
            "type": "boolean",
            "description": "Keep the first capture of each URL and later captures whose content digest changed.",
            "default": false
          },
          "includeSnapshots": {
            "title": "Also list snapshots",
            "type": "boolean",
            "description": "In domain history mode, also return snapshot rows. Those rows are charged separately.",
            "default": false
          },
          "sinceLastRun": {
            "title": "Only snapshots since the previous run",
            "type": "boolean",
            "description": "On a daily schedule, continue after the last snapshot already returned for the same targets and filters.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}