{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayback Machine & Internet Archive Scraper – Snapshots, Search",
    "description": "Query the Wayback Machine's official JSON APIs: snapshot history (CDX) for any URL, the latest archived snapshot, and full-text search of archive.org items. No login, no scraping, no proxy.",
    "version": "0.2",
    "x-build-id": "lG0ZG1Jib9Z1yUM4k"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rowfeed~wayback-internet-archive-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rowfeed-wayback-internet-archive-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/rowfeed~wayback-internet-archive-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rowfeed-wayback-internet-archive-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/rowfeed~wayback-internet-archive-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rowfeed-wayback-internet-archive-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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "snapshots",
              "latest",
              "search"
            ],
            "type": "string",
            "description": "snapshots = full CDX history per URL (one row per archived capture). latest = the most recent snapshot per URL (one row per URL). search = full-text search of archive.org items (books, audio, video, software, texts).",
            "default": "snapshots"
          },
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Domains or URLs to look up in the Wayback Machine. Used by the snapshots and latest modes. A malformed entry becomes an unbilled error row instead of stopping the run.",
            "default": [
              "example.com",
              "apify.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "from": {
            "title": "From (snapshots mode)",
            "type": "string",
            "description": "Only include snapshots captured on or after this year or date, e.g. 2024 or 20240101. Leave blank for no lower bound."
          },
          "to": {
            "title": "To (snapshots mode)",
            "type": "string",
            "description": "Only include snapshots captured on or before this year or date, e.g. 2026 or 20261231. Leave blank for no upper bound."
          },
          "matchType": {
            "title": "Match type (snapshots mode)",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "exact = only this URL. prefix = this URL and everything under it. host = the whole hostname. domain = the hostname and its subdomains.",
            "default": "exact"
          },
          "statusCode": {
            "title": "Status code filter (snapshots mode)",
            "type": "string",
            "description": "Only include snapshots with this HTTP status code, e.g. 200. Leave blank to include every status code.",
            "default": "200"
          },
          "maxSnapshotsPerUrl": {
            "title": "Max snapshots per URL (snapshots mode)",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many snapshot rows per URL. Each row is one `row` event ($0.50 per 1,000).",
            "default": 100
          },
          "collapse": {
            "title": "Collapse (snapshots mode)",
            "type": "string",
            "description": "Collapse consecutive snapshots that share the same value of this CDX field, e.g. digest (skip re-captures with identical content) or timestamp:8 (one per day). Leave blank for every capture.",
            "default": "digest"
          },
          "query": {
            "title": "Search query (search mode)",
            "type": "string",
            "description": "Full-text search query against archive.org's item catalog (title, description, text).",
            "default": "climate data"
          },
          "mediaType": {
            "title": "Media type filter (search mode)",
            "type": "string",
            "description": "Optional archive.org mediatype filter, e.g. texts, audio, movies, software, image, data. Leave blank for every media type."
          },
          "maxResults": {
            "title": "Max results (search mode)",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many search result rows. Each row is one `row` event ($0.50 per 1,000).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}