{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Search",
    "description": "Search the Internet Archive's Wayback Machine for historical snapshots of any website. Retrieve archived page metadata -- including timestamps, URLs, MIME types, HTTP status codes, and content hashes -- for up to 10,000 snapshots per run.",
    "version": "1.0",
    "x-build-id": "mhIVjOm3yoQJxdw34"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~wayback-machine-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-wayback-machine-search",
        "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/ryanclinton~wayback-machine-search/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-wayback-machine-search",
        "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/ryanclinton~wayback-machine-search/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-wayback-machine-search",
        "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": {
          "monitor": {
            "title": "Monitor mode (one-flag scheduled monitoring)",
            "type": "boolean",
            "description": "Turn on for scheduled monitoring runs. One flag enables: change detection, only-changed snapshots, change intelligence + diffs, alerts on moderate-or-major changes, timeline output, insights record, AND delta-since-last-run state tracking. Compose with a Use Case preset for industry-specific defaults.",
            "default": false
          },
          "deltaSinceLastRun": {
            "title": "Delta since last run (return only what's new)",
            "type": "boolean",
            "description": "Turn on for stateful monitoring without external storage. The actor remembers the events and snapshot URLs returned in the previous run (in a named key-value store) and filters this run to only the events / snapshots that are NEW since then. First run for a given URL set returns everything as new.",
            "default": false
          },
          "monitorStateKey": {
            "title": "Monitor state key (advanced)",
            "type": "string",
            "description": "Optional override for the key-value-store key used by Delta mode. Auto-derived from the sorted URL list if not set; provide a stable string here if you want to share state across separate runs that have different URL inputs (e.g. weekly batch + ad-hoc spot-checks)."
          },
          "useCase": {
            "title": "Use Case (one-click preset)",
            "enum": [
              "custom",
              "seo",
              "compliance",
              "competitor",
              "forensics"
            ],
            "type": "string",
            "description": "Pick a preset to auto-configure filters, change detection, and output mode for a common workflow. Set to \"custom\" to use the raw inputs below. SEO = monthly buckets + 200-only + change-only. Compliance = closest-date evidence with content. Competitor = monthly buckets + only-changed + alerts on moderate-or-major. Forensics = full-domain crawl, no collapsing.",
            "default": "custom"
          },
          "url": {
            "title": "URL",
            "type": "string",
            "description": "URL or domain to search for snapshots (e.g., \"example.com\" or \"https://example.com/page\"). Ignored if you supply a list under URLs (batch).",
            "default": "apify.com"
          },
          "urls": {
            "title": "URLs (batch / comparative)",
            "maxItems": 50,
            "type": "array",
            "description": "Optional: query multiple URLs in one run for comparative competitive intelligence. Each URL gets its own snapshots, change detection, and metrics in the output. The single URL above is added if both fields are populated.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match Type",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "How to match the URL. \"exact\" = exact URL only, \"prefix\" = URL prefix match, \"host\" = all pages on same host, \"domain\" = all subdomains too",
            "default": "exact"
          },
          "dateFrom": {
            "title": "Date From",
            "type": "string",
            "description": "Start date filter (YYYYMMDD or YYYY format, e.g., \"20200101\" or \"2020\")"
          },
          "dateTo": {
            "title": "Date To",
            "type": "string",
            "description": "End date filter (YYYYMMDD or YYYY format, e.g., \"20231231\" or \"2023\")"
          },
          "targetDate": {
            "title": "Target Date (closest-snapshot lookup)",
            "type": "string",
            "description": "Return the single snapshot closest to this date — useful for legal/compliance evidence (\"what did the page say on 2020-06-15?\"). Accepts YYYY-MM-DD or YYYYMMDD. When set, overrides Max Results and returns one snapshot with distanceFromTargetDays."
          },
          "statusFilter": {
            "title": "Status Code Filter",
            "type": "string",
            "description": "HTTP status code filter (e.g., \"200\" for successful pages only)"
          },
          "mimeFilter": {
            "title": "MIME Type Filter",
            "type": "string",
            "description": "MIME type filter (e.g., \"text/html\" for HTML pages only)"
          },
          "collapseBy": {
            "title": "Collapse Duplicates",
            "enum": [
              "",
              "digest",
              "timestamp:6",
              "timestamp:8",
              "timestamp:10"
            ],
            "type": "string",
            "description": "Collapse duplicate snapshots. \"digest\" = unique content only, \"timestamp:6\" = one per month, \"timestamp:8\" = one per day, \"timestamp:10\" = one per hour"
          },
          "fastLatest": {
            "title": "Fast Latest (recency optimization)",
            "type": "boolean",
            "description": "Return the most recent snapshots faster by skipping older index segments. Only useful for domains with hundreds of thousands of snapshots — combine with Max Results to fetch the latest N quickly.",
            "default": false
          },
          "autoPaginate": {
            "title": "Auto-paginate beyond 10,000 results",
            "type": "boolean",
            "description": "When the CDX API hits its 10,000-row cap, automatically chunk the query year-by-year and merge the results — letting you pull full multi-year domain histories in one run. Costs more proxy time; only enable when you need the complete archive.",
            "default": false
          },
          "maxResults": {
            "title": "Max Results (per URL)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of snapshots to return per URL (max 10,000 in a single CDX query — enable Auto-paginate to exceed). Ignored when Target Date is set (always returns one snapshot).",
            "default": 500
          },
          "detectChanges": {
            "title": "Detect Changes Between Snapshots",
            "type": "boolean",
            "description": "Compare each snapshot to the previous one and flag rows where the content hash or HTTP status changed. Adds a \"changed\" boolean and \"changeType\" string to every result. Free — uses metadata you already have.",
            "default": true
          },
          "onlyChanged": {
            "title": "Only Return Changed Snapshots",
            "type": "boolean",
            "description": "Filter results to only the snapshots where the page actually changed (plus the first \"initial\" baseline). Requires Detect Changes. Turns 1,000 raw snapshots into ~50 actionable rows.",
            "default": false
          },
          "changeIntelligence": {
            "title": "Change Intelligence (magnitude + categories + key diffs)",
            "type": "boolean",
            "description": "Augment every changed row with a changeSummary (magnitude: minor/moderate/major, categories: pricing/legal/product/layout/etc., keyDiffs: human-readable change phrases) and a structured diff (added/removed text, change score). Best results require Include Page Content so the actor can diff actual text.",
            "default": false
          },
          "alertOnMagnitude": {
            "title": "Alert when changes hit this severity",
            "enum": [
              "none",
              "any",
              "moderate",
              "major"
            ],
            "type": "string",
            "description": "Emit a single \"alert\" record at the top of the dataset when changes meet the threshold. Pairs well with scheduling: connect a webhook → Slack/email when the alert record fires. Requires Change Intelligence to compute magnitude.",
            "default": "none"
          },
          "query": {
            "title": "Historical diff search (keyword)",
            "type": "string",
            "description": "Filter the output to only snapshots whose change content matches a keyword. Searches changeSummary categories (e.g. \"pricing\"), keyDiffs, added/removed text, and full content. Pure post-filter — no extra API calls. Example: query \"pricing\" returns only the snapshots where pricing changed."
          },
          "includeInsights": {
            "title": "Emit Insights record (default ON)",
            "type": "boolean",
            "description": "Push a single \"insights\" record at the top of the dataset with key events, risk signals, business signals, typed events, coverage, cross-URL comparison, and chartData. Turn off if you only want raw rows.",
            "default": true
          },
          "outputMode": {
            "title": "Output Mode",
            "enum": [
              "snapshots",
              "timeline",
              "report"
            ],
            "type": "string",
            "description": "What records to emit. \"Snapshots\" = one row per snapshot (default). \"Timeline\" = one row per stable version (consecutive identical-digest snapshots collapsed). \"Report\" = a markdown report in the key-value store + version records + a summary record.",
            "default": "snapshots"
          },
          "generateReport": {
            "title": "Generate Markdown Report",
            "type": "boolean",
            "description": "Always write a REPORT.md to the run's key-value store, even when Output Mode is \"snapshots\". Useful when you want both raw rows and a human-readable summary.",
            "default": false
          },
          "includeContent": {
            "title": "Include Page Content",
            "type": "boolean",
            "description": "Fetch and include the archived page text content. Required for the diff/keyDiffs fields under Change Intelligence. Slow — fetches each snapshot individually with polite rate limiting.",
            "default": false
          },
          "maxContentFetch": {
            "title": "Max Pages to Fetch Content",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of pages to fetch content for (only used if Include Page Content is enabled)",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy used to reach the Wayback Machine CDX API. Defaults to RESIDENTIAL, which is the most reliable — Archive.org blocks many datacenter IPs. You can switch to AUTO or custom proxies if you have a preferred setup.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}