{
  "openapi": "3.0.1",
  "info": {
    "title": "Internet Archive & Wayback Machine Scraper",
    "description": "Search archive.org and the Wayback Machine for OSINT, journalism, and research — books, movies, audio, software, item metadata, file lists, and URL snapshots. Official public APIs, no login. Unofficial — not affiliated with the Internet Archive.",
    "version": "0.1",
    "x-build-id": "AwMLtMd6Eg2QhxdiN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bakos_bence~internet-archive/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bakos_bence-internet-archive",
        "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/bakos_bence~internet-archive/runs": {
      "post": {
        "operationId": "runs-sync-bakos_bence-internet-archive",
        "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/bakos_bence~internet-archive/run-sync": {
      "post": {
        "operationId": "run-sync-bakos_bence-internet-archive",
        "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": {
          "queries": {
            "title": "Queries",
            "type": "array",
            "description": "Enter one query per line: keywords, Lucene (collection:nasa), item IDs, archive.org/details/… URLs, domains, page URLs, or snapshotOf:bbc.co.uk@2015.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "search",
              "metadata",
              "files",
              "snapshots",
              "available"
            ],
            "type": "string",
            "description": "Leave Auto to classify each query. Force Search, Metadata, Files, Snapshots, or Available when mixed input would be ambiguous.",
            "default": "auto"
          },
          "mediaType": {
            "title": "Media type",
            "enum": [
              "all",
              "texts",
              "movies",
              "audio",
              "image",
              "software",
              "data",
              "web",
              "collection",
              "etree"
            ],
            "type": "string",
            "description": "Restrict library search to one Internet Archive media type.",
            "default": "all"
          },
          "collection": {
            "title": "Collection",
            "type": "string",
            "description": "Restrict search to an archive.org collection identifier (e.g. nasa, opensource_movies)."
          },
          "creator": {
            "title": "Creator",
            "type": "string",
            "description": "Match the bibliographic creator / author field."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code as stored by the Archive (eng, fre, spa, …)."
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Start of range (YYYY-MM-DD or YYYYMMDD). Search uses item date; snapshots use capture time."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "End of range (YYYY-MM-DD or YYYYMMDD)."
          },
          "sort": {
            "title": "Search sort",
            "enum": [
              "downloads desc",
              "downloads asc",
              "publicdate desc",
              "publicdate asc",
              "date desc",
              "date asc",
              "titleSorter asc"
            ],
            "type": "string",
            "description": "Sort library hits. Leave empty for relevance. Wayback ignores this."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Cap rows across all queries. Prefill 5 for a cheap trial.",
            "default": 5
          },
          "includeFiles": {
            "title": "Emit file rows",
            "type": "boolean",
            "description": "Also push one dataset row per file (name, format, size in bytes, download URL).",
            "default": false
          },
          "enrichMetadata": {
            "title": "Enrich search hits",
            "type": "boolean",
            "description": "For each search hit, fetch full item metadata (extra Archive request per item).",
            "default": false
          },
          "matchType": {
            "title": "Wayback match",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "How CDX matches the URL. Domain covers every host under the site."
          },
          "collapseSnapshots": {
            "title": "Collapse duplicate captures",
            "type": "boolean",
            "description": "Collapse consecutive Wayback captures with the same content digest.",
            "default": false
          },
          "filterStatus": {
            "title": "HTTP status filter",
            "type": "string",
            "description": "Keep only CDX rows with this status (e.g. 200)."
          },
          "proxyType": {
            "title": "Proxy",
            "enum": [
              "none",
              "apify"
            ],
            "type": "string",
            "description": "Leave off. archive.org APIs are public; a proxy is only for rare IP blocks.",
            "default": "none"
          },
          "proxyConfiguration": {
            "title": "Apify Proxy configuration",
            "type": "object",
            "description": "Used only when Proxy is Apify Proxy.",
            "default": {
              "useApifyProxy": false
            }
          },
          "query": {
            "title": "Query (alias)",
            "type": "string",
            "description": "Single-query alias merged into Queries."
          },
          "maxResults": {
            "title": "Max results (alias)",
            "minimum": 0,
            "type": "integer",
            "description": "Leave empty unless you use the alias. Same cap as Max items. Prefill 5 for a cheap first run.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}