{
  "openapi": "3.0.1",
  "info": {
    "title": "Internet Archive Scraper",
    "description": "Search and scrape Internet Archive — 40M+ free books, movies, music, software, images, and Wayback Machine web archives. Filter by media type, date, and keyword. Export data as JSON, CSV, Excel, or XML. Great for public domain content, research, and bulk metadata downloads.",
    "version": "0.0",
    "x-build-id": "lobqYay2kfpLNlc54"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/defensible_mat~internet-archive-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-defensible_mat-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/defensible_mat~internet-archive-scraper/runs": {
      "post": {
        "operationId": "runs-sync-defensible_mat-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/defensible_mat~internet-archive-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-defensible_mat-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",
        "required": [
          "searchTerm"
        ],
        "properties": {
          "searchTerm": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword(s) to search for, e.g. \"jazz 1950s\" or \"machine learning\". Supports full Internet Archive query syntax (AND, OR, field:value, etc)."
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "Restrict results to one or more Internet Archive media types. Leave empty to search across all types.",
            "items": {
              "type": "string",
              "enum": [
                "texts",
                "movies",
                "audio",
                "software",
                "image",
                "web",
                "data",
                "collection",
                "etree"
              ],
              "enumTitles": [
                "Texts / Books",
                "Movies & Video",
                "Audio & Music",
                "Software",
                "Images",
                "Web (Wayback)",
                "Data",
                "Collections",
                "Live Music (etree)"
              ]
            },
            "default": [
              "web",
              "movies",
              "image",
              "texts"
            ]
          },
          "dateFrom": {
            "title": "Date from (optional)",
            "type": "string",
            "description": "Only include items published on or after this date. Format: YYYY-MM-DD."
          },
          "dateTo": {
            "title": "Date to (optional)",
            "type": "string",
            "description": "Only include items published on or before this date. Format: YYYY-MM-DD."
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "dateDesc",
              "dateAsc",
              "downloadsDesc",
              "titleAsc"
            ],
            "type": "string",
            "description": "How to order the results returned by the Archive.org search API.",
            "default": "dateDesc"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of items to fetch. Leave at 0 for a reasonable default of 200.",
            "default": 100
          },
          "fetchFullMetadata": {
            "title": "Fetch full metadata per item",
            "type": "boolean",
            "description": "If enabled, makes one extra API call per item to archive.org/metadata/{identifier} to pull full details (all files, full description, licensing info, etc). Slower for large runs.",
            "default": true
          },
          "outputFields": {
            "title": "Fields to include (search results)",
            "type": "array",
            "description": "Which metadata fields to request from the search API for each item. Leave default unless you need something specific.",
            "items": {
              "type": "string",
              "enum": [
                "identifier",
                "title",
                "description",
                "mediatype",
                "creator",
                "date",
                "year",
                "publicdate",
                "downloads",
                "item_size",
                "subject",
                "language",
                "licenseurl",
                "collection",
                "publisher"
              ]
            },
            "default": [
              "identifier",
              "title",
              "description",
              "mediatype",
              "creator",
              "date",
              "downloads",
              "subject",
              "language",
              "licenseurl"
            ]
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}