{
  "openapi": "3.0.1",
  "info": {
    "title": "Internet Archive Scraper API — Wayback Machine snapshot monitor",
    "description": "Search Internet Archive (archive.org) items by keyword, collection, media type, creator, subject or date, or list Wayback Machine snapshots of a URL or domain, via official APIs. Returns one JSON row per item or capture: metadata and links only, no downloads. Unofficial.",
    "version": "0.1",
    "x-build-id": "lsjxSnSEpNZbXqOtJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brightish_ascent~internet-archive-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brightish_ascent-internet-archive-monitor",
        "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/brightish_ascent~internet-archive-monitor/runs": {
      "post": {
        "operationId": "runs-sync-brightish_ascent-internet-archive-monitor",
        "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/brightish_ascent~internet-archive-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-brightish_ascent-internet-archive-monitor",
        "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",
              "waybackSnapshots"
            ],
            "type": "string",
            "description": "search (default) = find archive.org items with the official advancedsearch API. waybackSnapshots = list Wayback Machine captures of the URL or domain in url with the official CDX API. Search fields are ignored in waybackSnapshots mode, and Wayback fields are ignored in search mode.",
            "default": "search"
          },
          "query": {
            "title": "Search query / keywords",
            "type": "string",
            "description": "Search mode. Keywords or Internet Archive (Lucene) query syntax, e.g. nasa, \"climate change\", title:(apollo) AND year:[1960 TO 1975]. If query and all search filters are empty, the default scope query nasa + mediatype texts is used. Favorites lists (fav-*) are always excluded."
          },
          "collections": {
            "title": "Collections",
            "type": "array",
            "description": "Search mode. Collection identifiers (matches any), e.g. nasa, prelinger, librivoxaudio, americana. The identifier is the last part of https://archive.org/details/<collection>.",
            "items": {
              "type": "string"
            }
          },
          "mediatype": {
            "title": "Media type",
            "enum": [
              "texts",
              "movies",
              "audio",
              "software",
              "image",
              "data",
              "web",
              "collection",
              "etree"
            ],
            "type": "string",
            "description": "Search mode. One media type: texts, movies, audio, software, image, data, web (crawl items), collection or etree (live music). Empty = all media types."
          },
          "creator": {
            "title": "Creator",
            "type": "string",
            "description": "Search mode. Exact phrase in the creator field, e.g. NASA, Prelinger Archives."
          },
          "subject": {
            "title": "Subject",
            "type": "string",
            "description": "Search mode. Exact phrase in the subject/tag field, e.g. astronomy."
          },
          "dateFrom": {
            "title": "Item date from",
            "type": "string",
            "description": "Search mode. Earliest item date (publication/creation date of the item itself): YYYY, YYYY-MM or YYYY-MM-DD, e.g. 1969."
          },
          "dateTo": {
            "title": "Item date to",
            "type": "string",
            "description": "Search mode. Latest item date: YYYY, YYYY-MM or YYYY-MM-DD, e.g. 1975."
          },
          "addedFrom": {
            "title": "Added to archive.org from",
            "type": "string",
            "description": "Search mode. Earliest date the item was added to archive.org (addeddate): YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ, e.g. 2026-10-01."
          },
          "addedTo": {
            "title": "Added to archive.org to",
            "type": "string",
            "description": "Search mode. Latest addeddate: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "addeddate_desc",
              "publicdate_desc",
              "date_desc",
              "downloads_desc"
            ],
            "type": "string",
            "description": "Search mode result order: addeddate_desc (newest added, default), publicdate_desc (newest made public), date_desc (newest item date), downloads_desc (most downloaded). onlyNewSinceLastRun ignores sortBy and tracks date added.",
            "default": "addeddate_desc"
          },
          "descriptionMaxLength": {
            "title": "Description snippet length",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Max characters of the item description, HTML stripped, 0-5000 (default 300). 0 = omit the description. In compact output it is capped at 200 characters (or this value if lower).",
            "default": 300
          },
          "fetchFullMetadata": {
            "title": "Fetch full item metadata",
            "type": "boolean",
            "description": "Search mode. If true, also call the official Item Metadata API for each item and attach fullMetadata, filesCount and itemSize (one extra request per item, slower). Default false. Ignored when outputFormat is compact.",
            "default": false
          },
          "includeAllRecentUploads": {
            "title": "Include all recent uploads (unfiltered)",
            "type": "boolean",
            "description": "Search mode, default false. Only when query and all search filters are empty: return the newest additions across ALL of archive.org from the last ~7 days, including unmoderated community uploads (may contain spam or copyrighted material). Off = default scope nasa + texts.",
            "default": false
          },
          "url": {
            "title": "URL or domain",
            "type": "string",
            "description": "Wayback mode only (required there). A page URL (https://example.com/pricing) or a domain (example.com). Combine with matchType."
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "Wayback mode. exact (default) = captures of exactly this URL, newest first. prefix = all URLs starting with it. host = every page on this host. domain = host plus all subdomains. prefix/host/domain results are ordered by URL, then time.",
            "default": "exact"
          },
          "from": {
            "title": "From (capture date)",
            "type": "string",
            "description": "Wayback mode. Earliest capture: YYYY, YYYYMM, YYYYMMDD, YYYY-MM-DD or a 14-digit timestamp, e.g. 2024-01-01."
          },
          "to": {
            "title": "To (capture date)",
            "type": "string",
            "description": "Wayback mode. Latest capture, same formats as from."
          },
          "collapseDigest": {
            "title": "Only content changes (collapse by digest)",
            "type": "boolean",
            "description": "Wayback mode. If true, skip consecutive captures whose content digest is unchanged, so you get one row per content change. Default false.",
            "default": false
          },
          "statusFilter": {
            "title": "HTTP status filter",
            "type": "string",
            "description": "Wayback mode. Keep only captures with this HTTP status, e.g. 200 or 2xx, or exclude one with !404. Empty = all (including redirects and errors)."
          },
          "mimeTypeFilter": {
            "title": "MIME type filter",
            "type": "string",
            "description": "Wayback mode. Keep only this MIME type, e.g. text/html or application/pdf, or exclude one with !image/jpeg. Empty = all."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum rows (items or snapshots) to return, 1-5000 (default 25). You pay per returned row, so AI agents should usually set 5-20.",
            "default": 25
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "For scheduled runs. If true, returns only rows newer than earlier runs with the same filters returned (search: addeddate; Wayback: capture time), so you are not charged twice. The first run is a baseline. State lives in the key-value store internet-archive-monitor-state in your account, one record per filter set; delete it to reset. Default false.",
            "default": false
          },
          "lookbackHours": {
            "title": "Delta lookback (hours)",
            "minimum": 0,
            "maximum": 720,
            "type": "integer",
            "description": "Only with onlyNewSinceLastRun. Re-checks this many hours before the watermark for late-indexed items, de-duplicated against rows already returned (never re-charged). 0-720, default 24. 0 = strict watermark.",
            "default": 24
          },
          "includeRaw": {
            "title": "Include raw API record",
            "type": "boolean",
            "description": "If true, attach the original search document / CDX row under raw (larger output). Default false. Ignored when outputFormat is compact.",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "full",
              "compact"
            ],
            "type": "string",
            "description": "full (default) = every field. compact = only the key fields per row (search: identifier, title, creator, mediatype, collections, date, addedDate, itemUrl, description; Wayback: capturedAt, originalUrl, statusCode, mimeType, digest, snapshotUrl, urlRedacted), with short texts. For AI agents and LLM context. Same price per row.",
            "default": "full"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}