{
  "openapi": "3.0.1",
  "info": {
    "title": "Internet Archive & Wayback Machine Scraper: Books, Snapshots",
    "description": "Internet Archive and Wayback Machine scraper. Search archive.org for books, films, music, software and images with metadata and direct download links, or list Wayback Machine snapshots of any URL or domain through the CDX API with date filters. Public APIs, no login, no browser, no proxies.",
    "version": "0.1",
    "x-build-id": "vCnc17k8BEEHqqGXm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/best_celerytop~internet-archive-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-best_celerytop-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/best_celerytop~internet-archive-scraper/runs": {
      "post": {
        "operationId": "runs-sync-best_celerytop-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/best_celerytop~internet-archive-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-best_celerytop-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": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "What to search for, one search per line. Plain words search titles, descriptions and subjects. Advanced Lucene syntax works too, for example `subject:chess AND language:English` or `creator:\"Orson Welles\"`.",
            "items": {
              "type": "string"
            }
          },
          "mediaType": {
            "title": "Media type",
            "enum": [
              "",
              "texts",
              "movies",
              "audio",
              "software",
              "image",
              "data",
              "etree",
              "web"
            ],
            "type": "string",
            "description": "Limit results to one kind of item.",
            "default": ""
          },
          "collection": {
            "title": "Collection",
            "type": "string",
            "description": "Only items from this archive.org collection, for example `prelinger`, `librivoxaudio`, `folkscanomy` or `opensource_movies`. The collection name is the last part of a collection URL. Can be used alone, without search queries."
          },
          "yearFrom": {
            "title": "Published from year",
            "minimum": 1000,
            "maximum": 2100,
            "type": "integer",
            "description": "Keep items whose publication year is this or later."
          },
          "yearTo": {
            "title": "Published to year",
            "minimum": 1000,
            "maximum": 2100,
            "type": "integer",
            "description": "Keep items whose publication year is this or earlier."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "mostDownloaded",
              "newestAdded",
              "oldestAdded",
              "newestPublished",
              "oldestPublished",
              "titleAZ",
              "topRated"
            ],
            "type": "string",
            "description": "Order of the results.",
            "default": "relevance"
          },
          "identifiers": {
            "title": "Item identifiers",
            "type": "array",
            "description": "Fetch specific items by identifier (the last part of an archive.org/details/... URL), for example `chessfundamentals00capa`. Can be combined with searches.",
            "items": {
              "type": "string"
            }
          },
          "includeFiles": {
            "title": "Include files and full metadata",
            "type": "boolean",
            "description": "Add the list of files with direct download links, formats and sizes, plus the full item metadata. One extra request per item.",
            "default": true
          },
          "fileFormats": {
            "title": "File formats to keep",
            "type": "array",
            "description": "Keep only files of these formats or extensions, for example `pdf`, `epub`, `mp3`, `mp4`, `flac`, `jpg`, `zip`. Leave empty for all files.",
            "items": {
              "type": "string"
            }
          },
          "maxFilesPerItem": {
            "title": "Max files per item",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on the number of files listed for one item.",
            "default": 50
          },
          "waybackUrls": {
            "title": "Wayback Machine URLs",
            "type": "array",
            "description": "Web pages or sites to get archived snapshots for, one per line: `https://example.com/pricing`, `example.com`, `example.com/blog/`. The scheme does not matter. Combined with **Match type** below.",
            "items": {
              "type": "string"
            }
          },
          "waybackMatchType": {
            "title": "Match type",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "`exact`: snapshots of that one URL. `prefix`: every archived URL starting with it. `host`: every archived URL on that host. `domain`: the host and all its subdomains.",
            "default": "exact"
          },
          "waybackFrom": {
            "title": "Snapshots from",
            "type": "string",
            "description": "Earliest snapshot to include: `2020`, `2020-06` or `2020-06-15`."
          },
          "waybackTo": {
            "title": "Snapshots to",
            "type": "string",
            "description": "Latest snapshot to include: `2023`, `2023-12` or `2023-12-31`."
          },
          "waybackCollapse": {
            "title": "Thin out snapshots",
            "enum": [
              "none",
              "digest",
              "url",
              "hour",
              "day",
              "month",
              "year"
            ],
            "type": "string",
            "description": "`none`: every capture. `digest`: skip captures whose content did not change. `url`: one row per archived URL (its first capture), the way to list all pages of a site. `hour`, `day`, `month`, `year`: one capture per period.",
            "default": "none"
          },
          "waybackOnlyOk": {
            "title": "Only successful captures (HTTP 200)",
            "type": "boolean",
            "description": "Skip redirects, errors and missing pages.",
            "default": false
          },
          "waybackMimeType": {
            "title": "Only this content type",
            "type": "string",
            "description": "Keep only captures of one MIME type, for example `text/html`, `application/pdf` or `image/jpeg`. Empty keeps all."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of rows saved in the run: library items plus Wayback Machine snapshots together.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}