{
  "openapi": "3.0.1",
  "info": {
    "title": "Internet Archive Scraper",
    "description": "Internet Archive Scraper is a Python tool designed to extract archived webpages, public domain media, book metadata, and historical snapshots from Archive.org and the Wayback Machine. It exports clean, structured datasets into CSV or JSON formats for digital preservation and web research.",
    "version": "0.0",
    "x-build-id": "PPIeBtkhPSeVUz5TC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zerobreak~Internet-Archive-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zerobreak-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/zerobreak~Internet-Archive-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-zerobreak-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/zerobreak~Internet-Archive-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zerobreak-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "search_with_files",
              "items",
              "count"
            ],
            "type": "string",
            "description": "search lists matching items, search_with_files adds each item's files and download links, items reads identifiers or archive.org URLs, and count returns one total.",
            "default": "search"
          },
          "query": {
            "title": "Query (Lucene syntax)",
            "type": "string",
            "description": "Lucene query, for example title:(climate) AND mediatype:texts AND year:[1900 TO 1950]. Combined with media types and collections."
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "Keep items whose mediatype is one of these. Added to the query as mediatype:(a OR b).",
            "items": {
              "type": "string",
              "enum": [
                "texts",
                "movies",
                "audio",
                "software",
                "image",
                "etree",
                "data",
                "web",
                "collection"
              ],
              "enumTitles": [
                "Texts",
                "Movies",
                "Audio",
                "Software",
                "Image",
                "Live music (etree)",
                "Data",
                "Web",
                "Collection"
              ]
            }
          },
          "collections": {
            "title": "Collections",
            "type": "array",
            "description": "Keep items in these archive.org collections. Added to the query as collection:(x OR y). One collection per line.",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "title": "Fields to return",
            "type": "array",
            "description": "Advanced Search and Scrape API fields. identifier is always requested. One field name per line.",
            "default": [
              "identifier",
              "title",
              "creator",
              "date",
              "mediatype",
              "collection",
              "downloads",
              "description",
              "subject",
              "language",
              "licenseurl"
            ],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "",
              "downloads desc",
              "date desc",
              "date asc",
              "publicdate desc",
              "addeddate desc"
            ],
            "type": "string",
            "description": "Sorting is limited to the first 10,000 results. Leave this empty to use the Scrape API. Deep scraping ignores page-based sorting.",
            "default": ""
          },
          "identifiers": {
            "title": "Identifiers or archive.org URLs (items mode)",
            "type": "array",
            "description": "Item identifiers or URLs such as https://archive.org/details/principleofrelat00eins. Used when mode is items. One per line.",
            "items": {
              "type": "string"
            }
          },
          "fileFormats": {
            "title": "Only files of these formats",
            "type": "array",
            "description": "When file lists are loaded, keep only files whose format matches, for example Text PDF, MPEG4, or VBR MP3. Matching is case-insensitive. One format per line.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Free cap 50,000. More than 10,000 uses the Scrape API automatically.",
            "default": 500
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause between archive.org requests. Minimum 200 ms. Default 500 ms.",
            "default": 500
          },
          "timeoutSecs": {
            "title": "Run timeout (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Stop the run after this many seconds and keep rows already saved.",
            "default": 300
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for one archive.org response before treating it as a timeout.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional proxy for archive.org requests. Leave Apify Proxy off unless your IP is blocked.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}