{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine URL Extractor – Archived URLs, Snapshots & Diff",
    "description": "List every URL the Internet Archive Wayback Machine has saved for a domain or URL prefix: first and last capture, capture count, status, MIME type and snapshot links. Date, status and MIME filters. Optional archived page text as Markdown and a content diff between two dates.",
    "version": "0.1",
    "x-build-id": "PVDhTmFbCci6qFe09"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~wayback-url-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-wayback-url-extractor",
        "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/gazidev~wayback-url-extractor/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-wayback-url-extractor",
        "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/gazidev~wayback-url-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-wayback-url-extractor",
        "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": "Domains or URLs",
            "type": "array",
            "description": "Any mix of: a domain (`example.com`: every archived URL of the domain and its subdomains), `*.example.com`, a URL prefix (`example.com/blog/` or `example.com/docs/*`: everything under that path) or an exact page URL (`https://example.com/pricing`: that page only, useful for the diff). Change how entries are read with `Match type`.",
            "default": [
              "crawlee.dev"
            ],
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "auto",
              "domain",
              "host",
              "prefix",
              "exact"
            ],
            "type": "string",
            "description": "`auto`: bare domain → domain incl. subdomains, URL ending in `/` or `*` → prefix, other URLs → exact page. Or force one type for all entries: `domain` (domain + all subdomains), `host` (this host only, no subdomains), `prefix` (all URLs starting with the entry) or `exact`.",
            "default": "auto"
          },
          "maxUrls": {
            "title": "Max URLs (total)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after saving this many unique archived URLs in total (0 = no limit). You pay only for URLs saved. Large domains can have millions of archived URLs.",
            "default": 200
          },
          "maxUrlsPerInput": {
            "title": "Max URLs per domain/URL",
            "minimum": 0,
            "type": "integer",
            "description": "Limit per entry when you give several (0 = no per-entry limit).",
            "default": 0
          },
          "from": {
            "title": "Captured from",
            "type": "string",
            "description": "Only captures on or after this date. `2015`, `2015-06`, `2015-06-30` or relative (`1 year`, `6 months`, `30 days`)."
          },
          "to": {
            "title": "Captured until",
            "type": "string",
            "description": "Only captures on or before this date (inclusive: `2019` means until 2019-12-31). Same formats as above."
          },
          "statusCodes": {
            "title": "HTTP status codes",
            "type": "array",
            "description": "Keep only captures with these original HTTP statuses, e.g. `200`, or `3xx` for all redirects. Empty = all statuses (incl. 404s and redirects that the crawler recorded).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mimeTypes": {
            "title": "MIME types",
            "type": "array",
            "description": "Keep only captures with these content types, e.g. `text/html`, `application/pdf`, `image/*`. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "urlRegex": {
            "title": "Only URLs matching (regex)",
            "type": "string",
            "description": "Java regex that must match the **whole** original URL, e.g. `.*\\.pdf` or `.*/blog/.*`. Applied by the Internet Archive server, so filtered URLs are never downloaded or charged."
          },
          "excludeUrlRegex": {
            "title": "Exclude URLs matching (regex)",
            "type": "string",
            "description": "Drop URLs whose whole original URL matches, e.g. `.*\\.(css|js|png|jpg|gif|svg|woff2?)`."
          },
          "skipQueryStrings": {
            "title": "Skip URLs with query strings",
            "type": "boolean",
            "description": "Drop URLs containing `?` (tracking parameters, search pages, session IDs). Useful for clean page lists.",
            "default": false
          },
          "skipTrackingUrls": {
            "title": "Skip tracking-parameter URLs",
            "type": "boolean",
            "description": "Drop URL variants whose query contains analytics or session parameters (`utm_*`, `__hstc`, `fbclid`, `gclid`, `sessionid`, `PHPSESSID`…). Real dynamic pages such as `?id=12` or `?p=345` are kept. Filtered on the Internet Archive server, never charged.",
            "default": true
          },
          "skipMalformedUrls": {
            "title": "Skip malformed URLs",
            "type": "boolean",
            "description": "Drop obviously broken URLs the archive crawler picked up from bad HTML (containing `\"`, `<`, `>`, `%22`, braces or whitespace). Not charged.",
            "default": true
          },
          "captureStats": {
            "title": "Capture statistics (first/last capture, count, versions)",
            "type": "boolean",
            "description": "On: reads every capture to give `firstCapture`, `lastCapture`, `captureCount`, `uniqueVersions` (distinct content digests), the latest status and a direct link to the latest snapshot. Off: one CDX row per URL (collapse by urlkey), faster for huge domains, but only the first capture is known.",
            "default": true
          },
          "maxCapturesPerUrl": {
            "title": "Max captures counted per URL",
            "minimum": 10,
            "type": "integer",
            "description": "Home pages can have 100,000+ captures. After this many, counting stops for that URL (`captureCountCapped: true`), the newest capture is looked up directly and the scan moves on. Keeps runs fast.",
            "default": 5000
          },
          "fetchContent": {
            "title": "Fetch snapshot content",
            "type": "boolean",
            "description": "Download each URL's archived page (raw `id_` mode, without the Wayback toolbar) and add its title and text. Charged per snapshot downloaded (`snapshot-fetched`). Non-text captures (images, PDFs) are skipped and not charged.",
            "default": false
          },
          "contentFormat": {
            "title": "Content format",
            "enum": [
              "markdown",
              "text",
              "html"
            ],
            "type": "string",
            "description": "`markdown`: main content as clean Markdown with links (good for LLMs). `text`: plain text. `html`: the raw archived HTML.",
            "default": "markdown"
          },
          "contentSnapshot": {
            "title": "Which snapshot",
            "enum": [
              "latest",
              "earliest"
            ],
            "type": "string",
            "description": "Content of the newest successful (HTTP 200) capture, or the earliest one.",
            "default": "latest"
          },
          "maxContentChars": {
            "title": "Max content characters",
            "minimum": 1000,
            "type": "integer",
            "description": "Content longer than this is cut (`contentTruncated: true`).",
            "default": 100000
          },
          "compareFrom": {
            "title": "Compare: older date",
            "type": "string",
            "description": "Set both compare dates to get a content diff per URL: the capture closest to each date is downloaded, converted to Markdown and compared (similarity, lines added/removed, unified diff). Up to 2 `snapshot-fetched` events per URL. Use exact page URLs or a small `Max URLs`. Formats: `2020`, `2020-06-30`, `2 years`."
          },
          "compareTo": {
            "title": "Compare: newer date",
            "type": "string",
            "description": "The newer date for the diff, e.g. `2025-01-01` or `1 day`."
          },
          "maxDiffChars": {
            "title": "Max diff characters",
            "minimum": 500,
            "type": "integer",
            "description": "The unified diff is cut after this many characters (`diffTruncated: true`). `addedLines` / `removedLines` keep up to 200 lines each.",
            "default": 20000
          },
          "cdxDelaySecs": {
            "title": "Delay between CDX requests (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Minimum pause between Internet Archive CDX API calls. The Actor already slows down automatically on HTTP 429/503 and retries with backoff; raise this if you run many jobs in parallel.",
            "default": 1
          },
          "requestTimeoutSecs": {
            "title": "Snapshot request timeout (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Timeout for downloading one archived snapshot. Failed requests are retried with backoff.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}