{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper: Archived URLs, Snapshots & Page Text",
    "description": "Scrape the Internet Archive Wayback Machine via its official CDX API: every archived URL of a domain, snapshot history of any page (only content changes), first/last capture summary, and archived page text or Markdown. Date/status filters, alerts. $0.50 per 1,000 records.",
    "version": "1.0",
    "x-build-id": "sMfZpvCuHNhWPkx6z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/manageable_gully~wayback-machine-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-manageable_gully-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/manageable_gully~wayback-machine-scraper/runs": {
      "post": {
        "operationId": "runs-sync-manageable_gully-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/manageable_gully~wayback-machine-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-manageable_gully-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",
        "required": [
          "targets"
        ],
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "urls",
              "snapshots",
              "summary"
            ],
            "type": "string",
            "description": "urls = every unique archived URL of a domain or URL prefix with its first capture (find old/deleted pages, build redirect maps, SEO recovery). snapshots = every capture of the given pages over time (optionally only when the content changed). summary = one row per target: first and last capture, years archived, snapshot closest to a date.",
            "default": "urls"
          },
          "targets": {
            "title": "Websites, domains or URLs",
            "type": "array",
            "description": "One per line: a domain (example.com), a URL (https://example.com/pricing), a URL prefix ending in * (example.com/blog/*), or a web.archive.org link.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "auto",
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "Auto: in 'urls' mode a bare domain means the whole domain incl. subdomains and a URL with a path means that prefix; in 'snapshots'/'summary' mode it means the exact URL. A trailing * always means prefix.",
            "default": "auto"
          },
          "dateFrom": {
            "title": "Captured from",
            "type": "string",
            "description": "Only captures on/after this date: 2015, 2015-06, 2015-06-30, 20150630120000, or relative like '30 days' / '2 years'."
          },
          "dateTo": {
            "title": "Captured to",
            "type": "string",
            "description": "Only captures on/before this date (same formats)."
          },
          "statusCodes": {
            "title": "HTTP status codes",
            "type": "array",
            "description": "Keep only captures with these status codes, e.g. 200, 301, 404, or classes like 2xx / 3xx. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "mimeTypes": {
            "title": "MIME types",
            "type": "array",
            "description": "Keep only these content types, e.g. text/html, application/pdf. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "excludeAssets": {
            "title": "Skip images, CSS, JS & fonts",
            "type": "boolean",
            "description": "In 'urls' mode, skip URLs of static assets (images, CSS, JS, fonts, media, archives).",
            "default": true
          },
          "urlFilter": {
            "title": "URL must match (regex)",
            "type": "string",
            "description": "Optional regular expression the full archived URL must match, e.g. .*/blog/.* or .*\\.pdf$"
          },
          "collapse": {
            "title": "Snapshot frequency",
            "enum": [
              "none",
              "hour",
              "day",
              "month",
              "year",
              "digest"
            ],
            "type": "string",
            "description": "Used in 'snapshots' mode. 'Only when content changed' skips captures identical to the previous one (same content hash).",
            "default": "none"
          },
          "order": {
            "title": "Order",
            "enum": [
              "oldest",
              "newest"
            ],
            "type": "string",
            "description": "Used in 'snapshots' mode.",
            "default": "oldest"
          },
          "closestDate": {
            "title": "Snapshot closest to date",
            "type": "string",
            "description": "Used in 'summary' mode: also return the capture closest to this date (e.g. 2019-01-01)."
          },
          "fetchContent": {
            "title": "Fetch archived page content",
            "type": "boolean",
            "description": "Download each archived HTML page (original, without the Wayback toolbar) and add title, meta description, canonical, H1, word count and the text/Markdown. Charged per page.",
            "default": false
          },
          "contentFormat": {
            "title": "Content format",
            "enum": [
              "text",
              "markdown",
              "html"
            ],
            "type": "string",
            "description": "Format of the 'content' field.",
            "default": "text"
          },
          "maxContentChars": {
            "title": "Max content characters",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate content to this many characters (0 = no limit).",
            "default": 20000
          },
          "maxContentPages": {
            "title": "Max pages with content",
            "minimum": 0,
            "type": "integer",
            "description": "Stop fetching content after this many pages (records are still saved).",
            "default": 100
          },
          "maxItemsPerTarget": {
            "title": "Max records per target",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit (large domains can have millions of archived URLs).",
            "default": 1000
          },
          "maxItems": {
            "title": "Max records in total",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit.",
            "default": 0
          },
          "onlyNew": {
            "title": "Only new (for schedules)",
            "type": "boolean",
            "description": "Remember what earlier runs returned and save only new archived URLs ('urls' mode) or new captures ('snapshots' mode). Use with a schedule to get alerts.",
            "default": false
          },
          "stateKey": {
            "title": "Alert name",
            "type": "string",
            "description": "Separate memory for different scheduled tasks using Only new.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}