{
  "openapi": "3.0.1",
  "info": {
    "title": "Internet Archive Scraper & API - archive.org Books & Media",
    "description": "Use this to search archive.org (Internet Archive): books, video, audio, software. Input: queries or item IDs, optional media type, collection, year filters. One result = one item: title, creator, year, media type, collections, license, downloads, URL, optional file links. $1.00 per 1,000 results.",
    "version": "1.0",
    "x-build-id": "dCbSf4f1jSVTDfcCr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rel8ble~internet-archive-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rel8ble-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/rel8ble~internet-archive-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rel8ble-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/rel8ble~internet-archive-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rel8ble-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": "Optional. List of archive.org searches. Plain words must all match (\"apollo 11\" = apollo AND 11). Advanced syntax works: title:(moby dick), creator:\"Mark Twain\", subject:jazz, collection:gutenberg. Omit and set collection or mediaTypes to list a whole collection. Give queries, collection or identifiers.",
            "items": {
              "type": "string"
            }
          },
          "searchIn": {
            "title": "Search in",
            "enum": [
              "metadata",
              "title",
              "everything"
            ],
            "type": "string",
            "description": "Optional. Where plain words must match: \"metadata\" (default: title, subjects, creator; precise), \"title\" (title only) or \"everything\" (full text incl. descriptions and OCR; broad and noisy). field:value queries are used as written.",
            "default": "metadata"
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "Optional. Only these item types, list of: \"texts\", \"movies\", \"audio\", \"software\", \"image\", \"data\", \"web\", \"collection\", \"etree\" (live concerts). Omit for all types.",
            "items": {
              "type": "string",
              "enum": [
                "texts",
                "movies",
                "audio",
                "software",
                "image",
                "data",
                "web",
                "collection",
                "etree"
              ],
              "enumTitles": [
                "Texts (books, papers, magazines)",
                "Movies & video",
                "Audio & music",
                "Software",
                "Images",
                "Data sets",
                "Web crawls",
                "Collections",
                "Live music concerts (etree)"
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "downloads",
              "downloadsThisWeek",
              "newestUploads",
              "oldestUploads",
              "dateNewest",
              "dateOldest",
              "titleAZ",
              "rating"
            ],
            "type": "string",
            "description": "Optional. Result order: \"relevance\" (default), \"downloads\" (all time), \"downloadsThisWeek\", \"newestUploads\", \"oldestUploads\", \"dateNewest\", \"dateOldest\" (publication date), \"titleAZ\" or \"rating\".",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Max results per query",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional. Maximum items per query, integer 0-10000. Default 100; 0 = up to 10,000 (the API limit). You pay per item, so use 10-20 for a quick answer.",
            "default": 100
          },
          "collection": {
            "title": "Collection",
            "type": "string",
            "description": "Optional. Only items from this archive.org collection ID (from the collection URL), e.g. \"gutenberg\", \"prelinger\", \"nasa\". Several: comma-separated."
          },
          "yearFrom": {
            "title": "Year from",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional. Only items published in or after this year, integer 0-2100, e.g. 1950."
          },
          "yearTo": {
            "title": "Year to",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional. Only items published in or before this year, integer 0-2100, e.g. 1999."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Optional. Only items in this language as archive.org stores it: usually a 3-letter code (\"eng\", \"fre\", \"ger\", \"spa\") or a name (\"English\"). Several: comma-separated."
          },
          "includeFiles": {
            "title": "Include file list and download links (slower)",
            "type": "boolean",
            "description": "Optional boolean. true = add every file in each item (PDF, EPUB, MP3, MP4...) with format, size, MD5 and direct download URL, plus the full description; one extra request per item. Default false.",
            "default": false
          },
          "fileFormats": {
            "title": "Only these file formats",
            "type": "array",
            "description": "Optional, used with includeFiles. Keep only files whose format or extension matches, e.g. [\"pdf\", \"epub\", \"mp3\", \"h.264\"]. Omit for all files.",
            "items": {
              "type": "string"
            }
          },
          "identifiers": {
            "title": "Item identifiers or URLs",
            "type": "array",
            "description": "Optional. Look up specific items instead of searching: list of archive.org identifiers (\"Apollo11Audio\") or item URLs (\"https://archive.org/details/Apollo11Audio\"). Always includes the file list.",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Optional, advanced. Number of parallel requests, integer 1-20. Default 10. Leave unset unless the run is very large.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Optional, advanced. Retries per failed or blocked request, integer 0-20; each retry uses a new proxy session. Default 5. Leave unset.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional, advanced. Apify Proxy settings object. Default {\"useApifyProxy\": false}: no proxy is needed for this public API. Leave unset.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}