{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Text Extractor - Watch PDFs and Get Only What Changed",
    "description": "For watching published price lists, tariffs, timetables and terms, and for feeding RAG pipelines: PDF links in, text out, one row per PDF with page count, title, author and dates. The IRS W-9 gave 21,855 characters on 2026-09-07. Watch the same URLs and a PDF returns only when its text changed.",
    "version": "0.1",
    "x-build-id": "ZIPrkcyiCoPCHtnkf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~pdf-text-extractor-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-pdf-text-extractor-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/neverempty~pdf-text-extractor-monitor/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-pdf-text-extractor-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/neverempty~pdf-text-extractor-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-pdf-text-extractor-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": {
          "urls": {
            "title": "PDF URLs",
            "type": "array",
            "description": "Direct links to the PDF files you want read. Anything that is not a PDF is reported as such rather than returned as empty text. If this and the paste box below are both left empty, two example PDFs (IRS Form W-9 and arXiv 1706.03762) are read and a free row says so. If the two example PDFs are still here when you paste your own URLs below, they are skipped and not charged.",
            "items": {
              "type": "string"
            }
          },
          "urlsText": {
            "title": "PDF URLs (paste, one per line)",
            "type": "string",
            "description": "The same thing, as a block you can paste. Both fields are merged and duplicates are dropped.",
            "default": ""
          },
          "pdfPassword": {
            "title": "PDF password",
            "type": "string",
            "description": "Password for protected PDFs. A protected PDF with no password is reported as password-required and is not charged.",
            "default": ""
          },
          "pageRange": {
            "title": "Page range",
            "type": "string",
            "description": "Which pages to read, for example 1-5 or 2 or 1-3,7. Empty means every page.",
            "default": ""
          },
          "maxPagesPerPdf": {
            "title": "Maximum pages per PDF",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many pages in each PDF. 0 = no limit.",
            "default": 0
          },
          "maxPdfs": {
            "title": "Maximum PDFs per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many of the given URLs to read in this run.",
            "default": 25
          },
          "maxPdfSizeMb": {
            "title": "Maximum PDF size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "A PDF larger than this is reported with its actual size instead of being downloaded in full.",
            "default": 50
          },
          "timeoutPerPdfSecs": {
            "title": "Timeout per PDF (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Give up on a single PDF after this many seconds. The other PDFs in the run are still returned.",
            "default": 30
          },
          "includeFullText": {
            "title": "Full text",
            "type": "boolean",
            "description": "Return the whole document as one text field.",
            "default": true
          },
          "includePerPageText": {
            "title": "Per-page text",
            "type": "boolean",
            "description": "Also return an array with the text of each page separately.",
            "default": false
          },
          "removeRepeatedLines": {
            "title": "Remove repeated headers and footers",
            "type": "boolean",
            "description": "Drops lines that appear on 70% or more of the pages, which is what a running header or footer looks like. Only applies to documents of 3 pages or more.",
            "default": true
          },
          "minCharCount": {
            "title": "Minimum characters",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Skip a PDF whose extracted text is shorter than this. 0 = keep everything.",
            "default": 0
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep only PDFs whose text, title, subject or author contains these. Empty = keep everything.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "any = contains at least one of them. all = contains every one of them.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop a PDF if its text contains any of these.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "monitoringMode": {
            "title": "Monitoring mode: return a PDF only when it has changed",
            "type": "boolean",
            "description": "Reads the same URLs again and returns a PDF only when its text is different from the last run. The first run returns everything and remembers it. Unchanged PDFs are not returned and not charged, so a daily watch on a price list, a timetable or a set of terms costs nothing on the days nothing moved.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Forget what was already returned",
            "type": "boolean",
            "description": "Clears the memory so the next monitoring run treats every PDF as new.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many PDFs to download at the same time.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}