{
  "openapi": "3.0.1",
  "info": {
    "title": "Archive.org Scraper: Items, Metadata, Wayback Captures",
    "description": "Three modes in one actor: search Internet Archive items, pull full metadata and file lists for given identifiers, or list Wayback Machine captures for any URL or domain. One flat dataset, CSV or Excel ready, no account or key. $0.80 per 1,000 rows plus $0.05 per run.",
    "version": "1.1",
    "x-build-id": "p7xrBxz4SoDEz10EI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/capable_coach~internet-archive-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-capable_coach-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/capable_coach~internet-archive-scraper/runs": {
      "post": {
        "operationId": "runs-sync-capable_coach-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/capable_coach~internet-archive-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-capable_coach-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": {
          "mode": {
            "title": "What to collect",
            "enum": [
              "search",
              "item",
              "wayback"
            ],
            "type": "string",
            "description": "Search runs a query and returns item rows. Item returns the full metadata of the identifiers you list. Wayback lists the archived captures of the URLs you list.",
            "default": "search"
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Search mode only. One row set per query, run one after another. Any query the archive.org advanced search understands works: keywords, field searches such as `subject:librarianship`, `mediatype:texts`, `collection:nasa`, and AND/OR/NOT with quotes.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Search mode only. Rows per query, 1 to 5000. The archive caps paging at 10000 rows per query; above that the run stops with a clear message.",
            "default": 50
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "downloads desc",
              "week desc",
              "addeddate desc",
              "publicdate desc",
              "title asc",
              "identifier asc"
            ],
            "type": "string",
            "description": "Search mode only. `downloads desc` puts the most consulted items first; `addeddate desc` puts the freshest uploads first.",
            "default": "downloads desc"
          },
          "identifiers": {
            "title": "Item identifiers",
            "type": "array",
            "description": "Item mode only. Archive identifiers, the last segment of an item page such as `goody` in archive.org/details/goody. A missing identifier fails that item with a clear message and the other identifiers still run.",
            "items": {
              "type": "string"
            }
          },
          "includeFiles": {
            "title": "Include the file list",
            "type": "boolean",
            "description": "Item mode only. Adds a `files` array to each item: name, format, size, sha1, md5 and download URL.",
            "default": false
          },
          "maxFiles": {
            "title": "Max files per item",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Item mode only, used when the file list is included. Some items carry thousands of files; the row keeps the first N and `filesCount` always reports the real total.",
            "default": 200
          },
          "urls": {
            "title": "URLs or domains",
            "type": "array",
            "description": "Wayback mode only. A domain (`example.com`) returns every archived URL under it, a page (`example.com/about`) only that page, and a trailing `*` opens the prefix (`example.com/*`).",
            "items": {
              "type": "string"
            }
          },
          "limit": {
            "title": "Max captures per URL",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Wayback mode only. Captures kept per URL, oldest first.",
            "default": 100
          },
          "from": {
            "title": "Captured from",
            "type": "string",
            "description": "Wayback mode only, optional. Year, year-month or full date: `2024`, `2024-06`, `2024-06-15`. Empty means no lower bound."
          },
          "to": {
            "title": "Captured to",
            "type": "string",
            "description": "Wayback mode only, optional, same format as `from`. Empty means no upper bound."
          },
          "collapse": {
            "title": "Duplicate handling",
            "enum": [
              "digest",
              "urlkey",
              "timestamp",
              "none"
            ],
            "type": "string",
            "description": "Wayback mode only. `digest` drops identical re-captures of the same content, which is the shortest useful list; `none` returns every capture.",
            "default": "digest"
          },
          "filterStatus": {
            "title": "HTTP status filter",
            "type": "string",
            "description": "Wayback mode only. A three-digit status such as `200` keeps only those answers, `all` keeps every capture including redirects and errors.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}