{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Site Migration Audit & Archive Scraper",
    "description": "Export Wayback snapshots, find historical URLs missing after site migrations, or search Archive.org metadata. Structured JSON/CSV with no login, browser, or proxy.",
    "version": "0.1",
    "x-build-id": "RhP9RKQll0qqIIKPg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/immense_insulator~internet-archive-data-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-immense_insulator-internet-archive-data-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/immense_insulator~internet-archive-data-extractor/runs": {
      "post": {
        "operationId": "runs-sync-immense_insulator-internet-archive-data-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/immense_insulator~internet-archive-data-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-immense_insulator-internet-archive-data-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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "catalog",
              "snapshots",
              "migrationAudit",
              "items"
            ],
            "type": "string",
            "description": "catalog searches Archive.org items; snapshots returns CDX rows; migrationAudit finds archived HTML URLs absent from currentUrls or a current sitemap; items aliases catalog.",
            "default": "catalog"
          },
          "query": {
            "title": "Catalog search query",
            "type": "string",
            "description": "Required in catalog/items mode. Internet Archive advanced-search query; plain text and clauses such as mediatype:texts are supported.",
            "default": "collection:opensource_movies"
          },
          "url": {
            "title": "Wayback URL",
            "type": "string",
            "description": "A single http/https URL or CDX URL pattern for snapshots mode, for example https://example.com/*."
          },
          "urls": {
            "title": "Wayback URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Optional list of http/https URLs or CDX URL patterns. Combined with url, deduplicated, and limited to 100 entries.",
            "items": {
              "type": "string"
            }
          },
          "currentUrls": {
            "title": "Current live URL inventory",
            "maxItems": 10000,
            "type": "array",
            "description": "migrationAudit only. Current absolute URLs; archived URLs absent from this inventory become review candidates. Combined with currentSitemapUrl.",
            "items": {
              "type": "string"
            }
          },
          "currentSitemapUrl": {
            "title": "Current sitemap URL",
            "type": "string",
            "description": "migrationAudit only. Optional absolute sitemap or sitemap-index URL. At most 20 sitemap documents and 10,000 current URLs are read."
          },
          "fromTimestamp": {
            "title": "Snapshots from",
            "pattern": "^[0-9]{1,14}$",
            "type": "string",
            "description": "Optional inclusive CDX timestamp prefix, from YYYY through YYYYMMDDhhmmss (digits only)."
          },
          "toTimestamp": {
            "title": "Snapshots to",
            "pattern": "^[0-9]{1,14}$",
            "type": "string",
            "description": "Optional inclusive CDX timestamp prefix, from YYYY through YYYYMMDDhhmmss (digits only)."
          },
          "statusCodes": {
            "title": "HTTP status filters",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional HTTP status codes to include, such as [200, 301]. Up to 20 values.",
            "items": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            }
          },
          "mimeTypes": {
            "title": "MIME type filters",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional CDX MIME types to include, such as text/html or application/json. Up to 20 values.",
            "items": {
              "type": "string"
            }
          },
          "collapse": {
            "title": "Collapse snapshots",
            "enum": [
              "",
              "digest",
              "urlkey",
              "timestamp:4",
              "timestamp:6",
              "timestamp:8",
              "timestamp:10",
              "timestamp:12",
              "timestamp:14"
            ],
            "type": "string",
            "description": "Optional server-side CDX collapse. digest removes repeated content; urlkey groups canonical URLs; timestamp:N groups by timestamp prefix length.",
            "default": ""
          },
          "mediaType": {
            "title": "Catalog media type",
            "enum": [
              "",
              "texts",
              "movies",
              "audio",
              "software",
              "image",
              "web"
            ],
            "type": "string",
            "description": "Optional catalog mediatype filter.",
            "default": ""
          },
          "yearFrom": {
            "title": "Catalog year from",
            "minimum": 1,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional earliest catalog year (inclusive)."
          },
          "yearTo": {
            "title": "Catalog year to",
            "minimum": 1,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional latest catalog year (inclusive)."
          },
          "sortBy": {
            "title": "Catalog sort order",
            "enum": [
              "downloads desc",
              "date desc",
              "date asc",
              "titleSorter asc"
            ],
            "type": "string",
            "description": "Choose how matching catalog records are ordered before export.",
            "default": "downloads desc"
          },
          "maxItems": {
            "title": "Maximum output items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Global maximum dataset rows across all URLs or catalog pages. Hard limit: 10,000.",
            "default": 100
          },
          "includeMetadata": {
            "title": "Fetch full catalog metadata",
            "type": "boolean",
            "description": "Catalog mode only. Fetch each item's full metadata record.",
            "default": false
          },
          "includeFiles": {
            "title": "Include catalog downloadable files",
            "type": "boolean",
            "description": "Catalog mode only. Include file names, formats, sizes, checksums, and download URLs. Enables full metadata.",
            "default": false
          },
          "fileLimit": {
            "title": "Files per catalog item",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Catalog mode only. Maximum file entries returned for each item.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}