{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper — Archive.org Snapshots & URL History",
    "description": "Every Wayback Machine (archive.org) capture of a URL, folder, host or domain: timestamp, status, MIME type, digest and archive links. Unique versions, daily/yearly sampling, unique URLs, per-site summaries, optional archived page Markdown. $2 per 1,000 snapshots.",
    "version": "0.1",
    "x-build-id": "7SP4Zt5lupMh3qzMF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actor-forge~wayback-snapshots/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actor-forge-wayback-snapshots",
        "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/actor-forge~wayback-snapshots/runs": {
      "post": {
        "operationId": "runs-sync-actor-forge-wayback-snapshots",
        "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/actor-forge~wayback-snapshots/run-sync": {
      "post": {
        "operationId": "run-sync-actor-forge-wayback-snapshots",
        "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": "URLs or domains",
            "type": "array",
            "description": "Pages, folders or domains to look up in the Wayback Machine, e.g. example.com, https://example.com/pricing. Shortcuts: example.com/blog/* = everything under that path, *.example.com = the whole domain with subdomains.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "Exact: that one URL. Prefix: every URL starting with it (a folder). Host: every URL on that host name. Domain: the host and all its subdomains. Prefix/host/domain queries are slow on archive.org's side (20–40 s per index page).",
            "default": "exact"
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "snapshots",
              "summary"
            ],
            "type": "string",
            "description": "Snapshots: one row per archived capture. Summary: one row per input — first and last capture, total captures, captures per year, missing years (charged per summary, not per capture).",
            "default": "snapshots"
          },
          "collapse": {
            "title": "Collapse captures",
            "enum": [
              "digest",
              "none",
              "hourly",
              "daily",
              "monthly",
              "yearly",
              "unique-urls"
            ],
            "type": "string",
            "description": "Busy pages are captured thousands of times with identical content. Unique versions (default) keeps a capture only when the content changed. Hourly/daily/monthly/yearly keep the first capture of each period. Unique URLs keeps one row per distinct URL (best with prefix/host/domain to list every archived page of a site). None returns every capture.",
            "default": "digest"
          },
          "from": {
            "title": "From date",
            "type": "string",
            "description": "Only captures on or after this date: 2015, 201505, 20150501 or 2015-05-01."
          },
          "to": {
            "title": "To date",
            "type": "string",
            "description": "Only captures on or before this date (the whole period is included: 2018 means up to 31 Dec 2018)."
          },
          "statusFilter": {
            "title": "HTTP status filter",
            "type": "string",
            "description": "Only captures with these HTTP status codes, comma-separated: 200, 2xx, 200,301 — or exclude with !404, !5xx. Empty = all (includes redirects and errors)."
          },
          "mimeFilter": {
            "title": "MIME type filter",
            "type": "string",
            "description": "Only captures of these content types: text/html, application/pdf, image/* — or exclude with !image/*. Empty = all."
          },
          "newestFirst": {
            "title": "Newest first",
            "type": "boolean",
            "description": "Exact URLs only: return the most recent captures (up to the max per URL) newest first, instead of the oldest first.",
            "default": false
          },
          "maxSnapshotsPerUrl": {
            "title": "Max snapshots per URL",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many snapshot rows for each input. Each row is charged, so this is also your cost cap per URL.",
            "default": 1000
          },
          "fetchContent": {
            "title": "Fetch archived page content",
            "type": "boolean",
            "description": "Download the archived HTML of snapshots and add the page title and main content as Markdown/text (charged per page, see pricing). Only HTML captures with status 200 are fetched.",
            "default": false
          },
          "maxContentPages": {
            "title": "Max pages with content",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Fetch content for at most this many snapshots in the run (the first ones delivered). Failed fetches don't count.",
            "default": 10
          },
          "contentFormat": {
            "title": "Content format",
            "enum": [
              "markdown",
              "text",
              "both"
            ],
            "type": "string",
            "description": "What to include when fetching content.",
            "default": "markdown"
          },
          "maxIndexPagesPerUrl": {
            "title": "Max index pages per URL (prefix/host/domain)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Prefix, host and domain queries walk archive.org's index page by page (each ~3,000–7,000 captures, 20–40 s). Stop after this many pages per input, even if fewer snapshots than the max were found (e.g. with tight filters on a huge site).",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed normally — archive.org's CDX API is public. Turn on Apify Proxy only if your runs keep hitting rate limits.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}