{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine Scraper: Snapshots, Page Text & Domain History",
    "description": "Internet Archive Wayback Machine data without login: snapshot lists (CDX) with date, status and MIME filters, archived pages as clean text, Markdown or HTML for any date, domain history reports for SEO and expired domains, and archive.org item search. Pay per result, from $0.50 per 1,000.",
    "version": "0.1",
    "x-build-id": "TXnvHas0PgbQmdrSg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/varnmill~wayback-machine-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-varnmill-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/varnmill~wayback-machine-scraper/runs": {
      "post": {
        "operationId": "runs-sync-varnmill-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/varnmill~wayback-machine-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-varnmill-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to fetch",
            "enum": [
              "snapshots",
              "pages",
              "domainHistory",
              "archiveSearch"
            ],
            "type": "string",
            "description": "snapshots: list every capture of a URL, path prefix, host or whole domain from the Wayback CDX index, with date, status and MIME filters. pages: the archived page itself (clean text, Markdown and/or raw HTML, title, meta, links) for the dates you choose. domainHistory: one report per domain with first and last seen, captures per year, gaps, homepage title per year, redirects to other sites and parked-domain signals, for SEO and expired-domain research. archiveSearch: search archive.org items (books, films, audio, software, collections).",
            "default": "snapshots"
          },
          "urls": {
            "title": "URLs or domains",
            "type": "array",
            "description": "One per line. Plain domains (example.com), full URLs (https://example.com/blog/), or Wayback links (https://web.archive.org/web/2019.../https://example.com/) for the pages mode. Used by the snapshots, pages and domainHistory modes.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match (snapshots mode)",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "exact: only this URL. prefix: every URL starting with it (a folder). host: every URL on this host name. domain: every URL on the domain and all its subdomains. Prefix, host and domain matches on big sites return a lot of rows; pair them with a date range, a collapse option or the limit below.",
            "default": "exact"
          },
          "collapse": {
            "title": "Collapse duplicates",
            "enum": [
              "none",
              "hour",
              "day",
              "month",
              "year",
              "urlkey",
              "digest"
            ],
            "type": "string",
            "description": "Keep one capture per hour, day, month or year, one per distinct URL (urlkey, gives the list of archived URLs of a site), or drop captures whose content did not change from the previous one (digest).",
            "default": "none"
          },
          "statusCodes": {
            "title": "HTTP status filter",
            "type": "array",
            "description": "Keep only captures with these archived HTTP status codes, e.g. 200, 404, 301 or a class like 3xx. Empty keeps all.",
            "items": {
              "type": "string"
            }
          },
          "mimeTypes": {
            "title": "MIME type filter",
            "type": "array",
            "description": "Keep only these content types, e.g. text/html, application/pdf or image/* . Empty keeps all.",
            "items": {
              "type": "string"
            }
          },
          "extraFilters": {
            "title": "Advanced CDX filters",
            "type": "array",
            "description": "Raw CDX server filter expressions, passed through as is: field:regex, with ! to negate. Example: !original:.*\\.(css|js)$ or length:[0-9]{5,}.",
            "items": {
              "type": "string"
            }
          },
          "maxSnapshotsPerUrl": {
            "title": "Maximum snapshots per URL",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many captures for each input line. Large domains can have millions.",
            "default": 1000
          },
          "newestFirst": {
            "title": "Newest captures first",
            "type": "boolean",
            "description": "Return the most recent captures (up to 10,000) instead of starting from the oldest.",
            "default": false
          },
          "dates": {
            "title": "Dates (pages mode)",
            "type": "array",
            "description": "Which version of each page to fetch. Use YYYY, YYYY-MM, YYYY-MM-DD or a 14-digit Wayback timestamp; the capture closest to that moment is returned. Also: latest, first, every-year (one capture per year within the date range). Empty means latest.",
            "items": {
              "type": "string"
            }
          },
          "contentFormats": {
            "title": "Content formats",
            "type": "array",
            "description": "text: main content as clean plain text, menus and footers removed. markdown: main content as Markdown with links. html: the raw archived HTML exactly as captured (no Wayback toolbar).",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "markdown",
                "html"
              ],
              "enumTitles": [
                "Clean text",
                "Markdown",
                "Raw HTML"
              ]
            },
            "default": [
              "text",
              "markdown"
            ]
          },
          "includeLinks": {
            "title": "Include links",
            "type": "boolean",
            "description": "Add every link on the archived page (URL, anchor text, internal or external, rel) for backlink and site-structure research.",
            "default": false
          },
          "maxContentChars": {
            "title": "Maximum characters per content field",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate text, Markdown and HTML to this many characters. 0 keeps everything.",
            "default": 0
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "YYYY, YYYY-MM or YYYY-MM-DD. Limits snapshot lists, every-year page samples and domain history years. Empty means from the start of the archive."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "YYYY, YYYY-MM or YYYY-MM-DD. Empty means up to today."
          },
          "maxTitleSamples": {
            "title": "Homepage samples per domain",
            "minimum": 0,
            "maximum": 40,
            "type": "integer",
            "description": "How many archived homepages to open per domain (one per year, spread evenly over the domain's life) to record titles, languages, redirects and parked-domain signals. Each sample takes 2 to 4 seconds. 0 gives only the capture statistics (about 1 second per domain).",
            "default": 20
          },
          "uniqueUrlsUpTo": {
            "title": "Count archived URLs up to",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Also count distinct archived URLs on the domain and subdomains, up to this cap (one extra CDX query, slow on very large sites). 0 skips it.",
            "default": 0
          },
          "searchQuery": {
            "title": "Search query (archiveSearch mode)",
            "type": "string",
            "description": "archive.org search syntax, e.g. title:(apollo 11) or creator:(nasa) AND year:[1960 TO 1972]."
          },
          "mediaType": {
            "title": "Media type",
            "enum": [
              "any",
              "texts",
              "movies",
              "audio",
              "software",
              "image",
              "data",
              "web",
              "collection",
              "etree"
            ],
            "type": "string",
            "description": "Limit the search to one kind of item.",
            "default": "any"
          },
          "collection": {
            "title": "Collection",
            "type": "string",
            "description": "Only items in this archive.org collection identifier, e.g. nasa, prelinger or gutenberg."
          },
          "searchSort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "downloads",
              "newest-added",
              "oldest-added",
              "newest-published",
              "oldest-published",
              "title"
            ],
            "type": "string",
            "description": "Result order.",
            "default": "relevance"
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many items.",
            "default": 100
          },
          "includeFileList": {
            "title": "Include file lists",
            "type": "boolean",
            "description": "Add each item's files with format, size and direct download URL (one extra request per item).",
            "default": false
          },
          "requestIntervalSecs": {
            "title": "Seconds between requests",
            "minimum": 0.3,
            "maximum": 10,
            "type": "number",
            "description": "Minimum pause between requests to the same Internet Archive host. The actor slows down further on its own when archive.org answers 429 or 503.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed normally: the Internet Archive APIs are public. Turn on only if your runs keep getting rate-limited.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}