{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper - Archived URLs & Lost 404 Page Finder",
    "description": "Wayback Machine scraper: extract every archived URL of a website from the Internet Archive CDX API, check which still work today, find lost 404 pages, get 301 redirect suggestions and recover old page titles and text. No API key needed.",
    "version": "0.1",
    "x-build-id": "yldHoIG8HJGdIFPHM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pandabear~wayback-lost-url-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pandabear-wayback-lost-url-finder",
        "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/pandabear~wayback-lost-url-finder/runs": {
      "post": {
        "operationId": "runs-sync-pandabear-wayback-lost-url-finder",
        "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/pandabear~wayback-lost-url-finder/run-sync": {
      "post": {
        "operationId": "run-sync-pandabear-wayback-lost-url-finder",
        "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": [
          "domains"
        ],
        "properties": {
          "domains": {
            "title": "Domains or URL prefixes",
            "type": "array",
            "description": "Websites to analyze, e.g. `example.com` or `example.com/blog`. One per line.",
            "default": [
              "paulgraham.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "host",
              "domain",
              "prefix"
            ],
            "type": "string",
            "description": "`host` = all pages on this exact host (www is treated the same). `domain` = also include all subdomains (slower on big sites). `prefix` = only URLs starting with the given path, e.g. `example.com/blog/`.",
            "default": "host"
          },
          "maxUrlsPerDomain": {
            "title": "Max unique URLs per domain",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Stop after this many unique archived URLs per domain. Controls cost and run time.",
            "default": 50
          },
          "checkLiveStatus": {
            "title": "Check live status today",
            "type": "boolean",
            "description": "Request each URL on the live site (HEAD, falling back to GET) to find pages that are now 404/410, redirect to the homepage, or no longer resolve. Needed for the redirect map.",
            "default": true
          },
          "outputOnlyLost": {
            "title": "Output only lost / broken pages",
            "type": "boolean",
            "description": "Save only URLs that are lost (404/410), redirect to the homepage, return 5xx, or are unreachable. You are only charged for saved results.",
            "default": false
          },
          "extractArchivedContent": {
            "title": "Recover archived page content",
            "enum": [
              "none",
              "lost",
              "all"
            ],
            "type": "string",
            "description": "Fetch the latest archived snapshot and extract title, meta description, H1, word count and text. Useful to rebuild lost pages.",
            "default": "none"
          },
          "maxContentExtractions": {
            "title": "Max content recoveries per domain",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of archived pages to download per domain.",
            "default": 50
          },
          "maxTextChars": {
            "title": "Max text characters per recovered page",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Truncate recovered page text to this many characters. 0 = don't store the text, only title/description/word count.",
            "default": 3000
          },
          "onlyHtml": {
            "title": "Only HTML pages",
            "type": "boolean",
            "description": "Skip images, PDFs, CSS, JS and other non-HTML captures.",
            "default": true
          },
          "onlySuccessfulCaptures": {
            "title": "Only URLs that were once live (HTTP 200)",
            "type": "boolean",
            "description": "Only list URLs the Wayback Machine captured with status 200, i.e. real pages that existed. Turn off to also include archived redirects and errors.",
            "default": true
          },
          "ignoreQueryStrings": {
            "title": "Ignore query strings",
            "type": "boolean",
            "description": "Treat `page?ref=x` and `page` as the same URL and drop tracking/query parameters. Turn off to keep every unique query-string variant.",
            "default": true
          },
          "fromYear": {
            "title": "From year",
            "minimum": 1996,
            "maximum": 2100,
            "type": "integer",
            "description": "Only consider captures from this year onward."
          },
          "toYear": {
            "title": "To year",
            "minimum": 1996,
            "maximum": 2100,
            "type": "integer",
            "description": "Only consider captures up to this year."
          },
          "includeUrlPatterns": {
            "title": "Include URL patterns (regex)",
            "type": "array",
            "description": "If set, keep only URLs matching at least one of these regular expressions, e.g. `/blog/`.",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Exclude URL patterns (regex)",
            "type": "array",
            "description": "Skip URLs matching any of these regular expressions. Leave empty to use sensible defaults (static assets, wp-json, tracking parameters...).",
            "items": {
              "type": "string"
            }
          },
          "liveCheckConcurrency": {
            "title": "Live check concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many live-status requests run in parallel against the target site. Keep it low (2–6) to be polite and avoid HTTP 429 rate limiting.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}