{
  "openapi": "3.0.1",
  "info": {
    "title": "Internet Archive & Wayback Machine Scraper - Snapshots & Search",
    "description": "List Wayback Machine snapshots of any URL or site with date, status and change filters and optional page text, or search archive.org item metadata. Official APIs, no key, $0.50 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "ouR6THYCHIhldYYHJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/skillmerc~internet-archive-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-skillmerc-internet-archive-search-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/skillmerc~internet-archive-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-skillmerc-internet-archive-search-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/skillmerc~internet-archive-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-skillmerc-internet-archive-search-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": "Mode",
            "enum": [
              "search",
              "wayback"
            ],
            "type": "string",
            "description": "\"search\" exports archive.org item metadata (books, audio, video, software). \"wayback\" lists Wayback Machine snapshots of the URLs or sites you enter below.",
            "default": "search"
          },
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Archive.org search query (Lucene syntax). Examples: \"subject:jazz AND mediatype:audio\", \"creator:tolkien\", \"collection:librivoxaudio\"",
            "default": "mediatype:texts AND subject:python"
          },
          "mediatype": {
            "title": "Media Type Filter",
            "type": "string",
            "description": "Narrow results to a specific media type: texts, audio, movies, software, image, web, data. Leave blank to search all types.",
            "default": ""
          },
          "sort": {
            "title": "Sort Order",
            "type": "string",
            "description": "Sort results. Examples: \"downloads desc\", \"date desc\", \"titleSorter asc\"",
            "default": "downloads desc"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of items to return. Hard cap at 10,000.",
            "default": 100
          },
          "includeFiles": {
            "title": "Include File List",
            "type": "boolean",
            "description": "Fetch the file manifest for each item. Makes one extra API request per item, so large result sets run much slower.",
            "default": false
          },
          "urls": {
            "title": "URLs or domains",
            "type": "array",
            "description": "Pages or sites to look up in the Wayback Machine, for example \"example.com\" or \"https://www.python.org/about/\". Used in wayback mode only.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Match type",
            "enum": [
              "exact",
              "prefix",
              "host",
              "domain"
            ],
            "type": "string",
            "description": "exact: only this URL. prefix: every archived URL that starts with it (a folder). host: every page on this host. domain: every page on the domain and its subdomains.",
            "default": "exact"
          },
          "from": {
            "title": "From date",
            "type": "string",
            "description": "Earliest capture to include, as YYYY, YYYY-MM or YYYY-MM-DD. Leave empty for no limit."
          },
          "to": {
            "title": "To date",
            "type": "string",
            "description": "Latest capture to include, as YYYY, YYYY-MM or YYYY-MM-DD. Leave empty for no limit."
          },
          "collapse": {
            "title": "Collapse",
            "enum": [
              "none",
              "day",
              "month",
              "year",
              "digest"
            ],
            "type": "string",
            "description": "Thin out the results. day, month or year: at most one capture per URL per period. digest: changes only, skipping captures whose content is identical to the one before.",
            "default": "none"
          },
          "statusFilter": {
            "title": "HTTP status filter",
            "type": "string",
            "description": "Only captures with this status code. Accepts a regular expression, for example 200 or 3.. for redirects. Leave empty for all."
          },
          "mimeFilter": {
            "title": "MIME type filter",
            "type": "string",
            "description": "Only captures of this type, for example text/html or application/pdf. Accepts a regular expression. Leave empty for all."
          },
          "maxSnapshotsPerUrl": {
            "title": "Max snapshots per URL",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many snapshots for each URL or domain.",
            "default": 100
          },
          "fetchContent": {
            "title": "Download page text",
            "type": "boolean",
            "description": "Download each archived page and add its title and cleaned text. One extra request per snapshot, about 1.5 seconds each, so use it with a small limit or a collapse setting.",
            "default": false
          },
          "maxContentChars": {
            "title": "Max text characters",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Cut the downloaded text to this many characters (0 means no cut). The full length is still reported in text_length.",
            "default": 20000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}