{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper: Snapshots, Archived URLs & History",
    "description": "Get Internet Archive Wayback Machine snapshots of any page, every archived URL of a domain, or the capture closest to a date, with optional archived page text. Date, status, MIME and change filters. $0.30 per 1,000 snapshots.",
    "version": "1.0",
    "x-build-id": "tSeLhxdnTE80UPerI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/best_apis~wayback-machine-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-best_apis-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/best_apis~wayback-machine-scraper/runs": {
      "post": {
        "operationId": "runs-sync-best_apis-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/best_apis~wayback-machine-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-best_apis-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 (https://example.com/pricing) or domains (example.com). Each one is looked up in the Internet Archive Wayback Machine.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to get",
            "enum": [
              "snapshots",
              "urls",
              "closest"
            ],
            "type": "string",
            "description": "Snapshots lists captures over time. Archived URLs lists the unique URLs the archive holds for a site (with its first capture). Closest returns one capture per URL nearest to the date below.",
            "default": "snapshots"
          },
          "matchType": {
            "title": "Match",
            "enum": [
              "auto",
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "Which archived URLs count as a match for each input.",
            "default": "auto"
          },
          "from": {
            "title": "From date",
            "type": "string",
            "description": "Only captures on or after this date: 2015, 2020-06, 2024-01-31, or relative like \"30 days\", \"2 years\"."
          },
          "to": {
            "title": "To date",
            "type": "string",
            "description": "Only captures on or before this date (same formats)."
          },
          "closestTo": {
            "title": "Closest to date",
            "type": "string",
            "description": "For the Closest snapshot mode: the target date (for example 2019-01-01). Defaults to now."
          },
          "onlyChanges": {
            "title": "Only when the page changed",
            "type": "boolean",
            "description": "Skip consecutive captures with identical content (same digest). Turn off to list every single capture.",
            "default": true
          },
          "frequency": {
            "title": "At most one capture per",
            "enum": [
              "any",
              "hour",
              "day",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Thin out the history, for example one snapshot per month.",
            "default": "any"
          },
          "statusCodes": {
            "title": "HTTP status codes",
            "type": "array",
            "description": "Keep only captures with these status codes, for example 200 or 301. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "mimeTypes": {
            "title": "MIME types",
            "type": "array",
            "description": "Keep only these content types, for example text/html or application/pdf. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "urlContains": {
            "title": "URL contains",
            "type": "string",
            "description": "Keep only archived URLs containing this text (case-insensitive), for example /blog/ or .pdf."
          },
          "maxResultsPerUrl": {
            "title": "Max results per input",
            "minimum": 1,
            "type": "integer",
            "description": "Newest first is not available in the archive index: results run oldest to newest.",
            "default": 1000
          },
          "maxResults": {
            "title": "Max results in total",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap for the whole run (keeps cost predictable).",
            "default": 10000
          },
          "includeContent": {
            "title": "Include archived page text",
            "type": "boolean",
            "description": "Download each archived HTML page and add its title, meta description, plain text and links count. Charged separately per page.",
            "default": false
          },
          "maxContentChars": {
            "title": "Max text characters per page",
            "minimum": 100,
            "type": "integer",
            "description": "Longer page text is truncated.",
            "default": 20000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}