{
  "openapi": "3.0.1",
  "info": {
    "title": "Internet Archive Scraper — Search archive.org, Download Links",
    "description": "Search the Internet Archive by text, collection, media type, creator, subject, language and year, and export one row per item with downloads, size, rating, licence and links — plus a row per file with a direct download URL. No API key.",
    "version": "0.1",
    "x-build-id": "Bt54tqCzOFTzlP3SL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/chorelet~internet-archive-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-chorelet-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/chorelet~internet-archive-scraper/runs": {
      "post": {
        "operationId": "runs-sync-chorelet-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/chorelet~internet-archive-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-chorelet-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 terms",
            "type": "array",
            "description": "Plain words or Lucene syntax, one search per line: `apollo 11`, `title:(\"public domain\")`. Leave empty to search by the filters below alone.",
            "items": {
              "type": "string"
            }
          },
          "collections": {
            "title": "Collections",
            "type": "array",
            "description": "archive.org collection ids: `librivoxaudio`, `prelinger`, `nasa`, `opensource_movies`, `gutenberg`.",
            "items": {
              "type": "string"
            }
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "`texts`, `audio`, `movies`, `image`, `software`, `data`, `web`, `etree`, `collection`.",
            "items": {
              "type": "string"
            }
          },
          "creators": {
            "title": "Creators",
            "type": "array",
            "description": "Author, band, studio or agency as the item credits it.",
            "items": {
              "type": "string"
            }
          },
          "subjects": {
            "title": "Subjects",
            "type": "array",
            "description": "Subject tags as archive.org stores them.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "`English`, `French`, `Spanish`…",
            "items": {
              "type": "string"
            }
          },
          "yearFrom": {
            "title": "Year from",
            "type": "string",
            "description": "Year of the work itself, not of the upload."
          },
          "yearTo": {
            "title": "Year to",
            "type": "string",
            "description": "Leave either end empty for an open range."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "most downloaded",
              "newest",
              "oldest",
              "top rated",
              "title",
              "date of work"
            ],
            "type": "string",
            "description": "What comes first.",
            "default": "most downloaded"
          },
          "includeFiles": {
            "title": "Add a row per file, with download links",
            "type": "boolean",
            "description": "Opens each item's file list and returns a direct download URL, format, size and duration for every file. One extra request per item.",
            "default": false
          },
          "maxFilesPerItem": {
            "title": "Max files per item",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "0 = every file. Items can hold hundreds of derivatives.",
            "default": 10
          },
          "fileFormats": {
            "title": "Only these file formats",
            "type": "array",
            "description": "Partial matches against the format: `pdf`, `mp3`, `epub`, `mp4`. Empty keeps all of them.",
            "items": {
              "type": "string"
            }
          },
          "originalFilesOnly": {
            "title": "Skip derivatives",
            "type": "boolean",
            "description": "Drops thumbnails, torrents, checksums and other generated files.",
            "default": true
          },
          "maxResultsPerQuery": {
            "title": "Max items per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "archive.org serves at most 10,000 results for one search; narrow by year or collection to go deeper.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}