{
  "openapi": "3.0.1",
  "info": {
    "title": "Website PDF Finder & Text Extractor",
    "description": "Find every PDF on a website and extract clean text, markdown, metadata and RAG-ready chunks. Also takes direct PDF links and Google Drive or Dropbox shares. Tracks new, changed and removed PDFs between runs. Scanned PDFs without text are free.",
    "version": "1.0",
    "x-build-id": "QCexCT9Ceee7Wi85d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/metallic_pastry~website-pdf-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-metallic_pastry-website-pdf-extractor",
        "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/metallic_pastry~website-pdf-extractor/runs": {
      "post": {
        "operationId": "runs-sync-metallic_pastry-website-pdf-extractor",
        "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/metallic_pastry~website-pdf-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-metallic_pastry-website-pdf-extractor",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Websites, pages or PDF links",
            "type": "array",
            "description": "One per line. A web page or website (\"https://www.example.com/investors\") is crawled for PDF links; a direct PDF link is extracted as is. Google Drive and Dropbox share links are turned into direct downloads. Duplicates are removed; invalid lines get a free error row.",
            "items": {
              "type": "string"
            }
          },
          "extractText": {
            "title": "Extract text",
            "type": "boolean",
            "description": "On: download every PDF and return its text, metadata and page count. Off: only list the PDFs found (URL, link text, source page, size, SHA-256) at the much lower listing price, for example to build an inventory first.",
            "default": true
          },
          "textFormat": {
            "title": "Text format",
            "enum": [
              "markdown",
              "plain"
            ],
            "type": "string",
            "description": "Markdown keeps headings (#, ##, ###, detected from font size) and bullet lists, which works well for LLMs and RAG. Plain text has the same paragraphs without markup.",
            "default": "markdown"
          },
          "chunkSize": {
            "title": "RAG chunk size (characters)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "0 = off. Otherwise also return a chunks list split at headings and paragraphs, each with its page range and heading path (\"Annual report > Risks > Climate\"). 1000 to 2000 suits most embedding models. Minimum 200.",
            "default": 0
          },
          "includePages": {
            "title": "Include text per page",
            "type": "boolean",
            "description": "Also return a pages list with the text of each page, for citations or page-level search.",
            "default": false
          },
          "removeHeadersFooters": {
            "title": "Remove running headers, footers and page numbers",
            "type": "boolean",
            "description": "Drops lines that repeat at the top or bottom of most pages (company name, report title, confidentiality notes) and page numbers, so they do not pollute the text or the chunks.",
            "default": true
          },
          "crawlDepth": {
            "title": "Crawl depth",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "How many clicks away from each start page to look for PDF links. 0 = only the start page, 1 = the start page and the pages it links to on the same site. Pages that look like reports, downloads, publications or investors are visited first.",
            "default": 1
          },
          "maxPagesPerSite": {
            "title": "Max web pages per start URL",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper limit on HTML pages fetched while looking for PDFs. Crawling is never charged.",
            "default": 25
          },
          "maxPdfsPerSite": {
            "title": "Max PDFs per start URL",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit on PDFs taken from one start URL. Use the keyword filters to get the right ones first.",
            "default": 50
          },
          "includeKeywords": {
            "title": "Only PDFs matching these words",
            "type": "array",
            "description": "Keep only PDFs whose URL or link text contains at least one of these words (case-insensitive), for example \"annual\", \"2025\", \"datasheet\". Pages whose links contain them are also crawled first.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Skip PDFs matching these words",
            "type": "array",
            "description": "Skip PDFs whose URL or link text contains any of these words, for example \"cookie\", \"privacy\", \"terms\".",
            "items": {
              "type": "string"
            }
          },
          "allowOtherHosts": {
            "title": "Include PDFs hosted on other domains",
            "type": "boolean",
            "description": "Many sites keep their PDFs on a CDN or document host (for example a separate investor-relations domain). Off = only PDFs on the start URL's own domain. Web pages are always crawled on the same site only.",
            "default": true
          },
          "maxPagesPerPdf": {
            "title": "Max pages per PDF",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop reading a PDF after this many pages. The first 50 pages are included in the per-PDF price; each page beyond that is charged as an extra page.",
            "default": 500
          },
          "maxPdfSizeMb": {
            "title": "Max PDF size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Larger files are skipped (free row with status too_large). Raise memory to 2048 MB or more for files above 100 MB.",
            "default": 50
          },
          "concurrency": {
            "title": "Start URLs in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many start URLs are processed at the same time. Requests to one host are always spaced out.",
            "default": 5
          },
          "trackChanges": {
            "title": "Track new, changed and removed PDFs",
            "type": "boolean",
            "description": "Remember every PDF (by SHA-256) in a named key-value store and mark each one new, changed or unchanged on the next run. PDFs that disappeared from a fully crawled site get a free removed row. Schedule the Actor to monitor document libraries, tenders, policies or price lists.",
            "default": false
          },
          "onlyNewOrChanged": {
            "title": "Skip text of unchanged PDFs",
            "type": "boolean",
            "description": "With change tracking on: unchanged PDFs are returned as a short unchanged row at the listing price instead of being extracted again.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "pattern": "^[a-zA-Z0-9_-]{0,40}$",
            "type": "string",
            "description": "Keeps separate change history for separate schedules (letters, digits, - and _). Leave empty for the default history."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}