{
  "openapi": "3.0.1",
  "info": {
    "title": "Internet Archive Scraper: Search, Metadata, Wayback CDX",
    "description": "Internet Archive scraper using only official APIs: search archive.org items, get item metadata with file lists and download links, or list Wayback Machine snapshots (CDX). Metadata and links only, no file downloads. Polite rate limit, retries.",
    "version": "0.1",
    "x-build-id": "yebvfwVICstZEV9sn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/firebrick_zamia~internet-archive-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-firebrick_zamia-internet-archive-search",
        "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/firebrick_zamia~internet-archive-search/runs": {
      "post": {
        "operationId": "runs-sync-firebrick_zamia-internet-archive-search",
        "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/firebrick_zamia~internet-archive-search/run-sync": {
      "post": {
        "operationId": "run-sync-firebrick_zamia-internet-archive-search",
        "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": "Mode",
            "enum": [
              "search",
              "details",
              "snapshots"
            ],
            "type": "string",
            "description": "search: find archive.org items. details: metadata and file list for known identifiers. snapshots: list Wayback Machine captures of URLs.",
            "default": "search"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Search mode: archive.org search query (Lucene syntax is accepted, e.g. creator:nasa AND subject:moon). Leave empty if you set a media type, collection or date filter."
          },
          "mediatype": {
            "title": "Media type",
            "enum": [
              "",
              "texts",
              "movies",
              "audio",
              "software",
              "image",
              "data",
              "web",
              "collection",
              "etree",
              "education"
            ],
            "type": "string",
            "description": "Search mode: restrict to one media type. Empty means any.",
            "default": ""
          },
          "collection": {
            "title": "Collection",
            "type": "string",
            "description": "Search mode: restrict to one collection identifier, for example nasa or prelinger. Empty means any."
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Search mode: earliest item date, YYYY or YYYY-MM-DD. Snapshots mode: earliest capture date, YYYY, YYYY-MM or YYYY-MM-DD."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Search mode: latest item date, YYYY or YYYY-MM-DD. Snapshots mode: latest capture date, YYYY, YYYY-MM or YYYY-MM-DD."
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "",
              "downloads desc",
              "date desc",
              "date asc",
              "publicdate desc",
              "addeddate desc"
            ],
            "type": "string",
            "description": "Search mode: sort order of results. Relevance is the default of archive.org.",
            "default": ""
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Search mode: maximum number of items to return (1 to 10,000). Each item is one billed result.",
            "default": 50
          },
          "identifiers": {
            "title": "Item identifiers",
            "type": "array",
            "description": "Details mode: archive.org identifiers or item URLs (https://archive.org/details/...), one per line, up to 500.",
            "items": {
              "type": "string"
            }
          },
          "includeFiles": {
            "title": "Include file list",
            "type": "boolean",
            "description": "Details mode: add the list of files with sizes, checksums and download URLs. Files are never downloaded, only linked.",
            "default": true
          },
          "includeDerivatives": {
            "title": "Include derivative files",
            "type": "boolean",
            "description": "Details mode: also list files generated by archive.org (thumbnails, OCR text, conversions). Off lists only original uploads.",
            "default": false
          },
          "urls": {
            "title": "URLs to look up",
            "type": "array",
            "description": "Snapshots mode: URLs, domains or URL prefixes to list Wayback Machine captures for, one per line, up to 100.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "URL match type",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "Snapshots mode: exact matches the URL only, prefix matches everything below the path, host matches one host, domain includes subdomains.",
            "default": "exact"
          },
          "collapseByDigest": {
            "title": "Collapse identical captures",
            "type": "boolean",
            "description": "Snapshots mode: skip a capture when its content is identical to the previous one (same digest), so you only see changes.",
            "default": true
          },
          "statusCodeFilter": {
            "title": "HTTP status filter",
            "type": "string",
            "description": "Snapshots mode: keep only captures with this HTTP status code, for example 200. Empty means any.",
            "default": "200"
          },
          "mimeTypeFilter": {
            "title": "MIME type filter",
            "type": "string",
            "description": "Snapshots mode: keep only captures with this MIME type, for example text/html. Empty means any."
          },
          "maxSnapshots": {
            "title": "Maximum snapshots per URL",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Snapshots mode: maximum captures returned for each URL (1 to 10,000). Each snapshot is one billed result.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}