{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Text Extractor – Bulk PDF to Text from URLs",
    "description": "PDF text extractor: PDF to text in bulk from PDF URLs, or every PDF linked on a page. Text, page count, per-page text and metadata. No OCR, no browser.",
    "version": "1.0",
    "x-build-id": "KPJx1ZkUzj8R1mRbT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/innovative_cookie~pdf-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-innovative_cookie-pdf-text-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/innovative_cookie~pdf-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-innovative_cookie-pdf-text-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/innovative_cookie~pdf-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-innovative_cookie-pdf-text-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",
        "properties": {
          "pdfUrls": {
            "title": "PDF URLs",
            "type": "array",
            "description": "Public http(s) links to PDF files, one per line. A scheme is added if missing.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Web pages that link to PDFs",
            "type": "array",
            "description": "Optional. Public web pages to scan for PDF links (links ending in .pdf, and embedded PDFs). Every PDF found is extracted. One level only: the Actor does not crawl further.",
            "items": {
              "type": "string"
            }
          },
          "sameSiteOnly": {
            "title": "Only PDFs on the same site as the page",
            "type": "boolean",
            "description": "When scanning web pages, keep only PDF links on the same host as the page (www ignored).",
            "default": true
          },
          "maxPdfsPerPage": {
            "title": "Max PDFs per web page",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stop collecting PDF links from one web page after this many.",
            "default": 20
          },
          "maxPdfs": {
            "title": "Max PDFs in total",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on the number of PDF files requested in this run.",
            "default": 100
          },
          "maxPagesPerPdf": {
            "title": "Max pages read per PDF",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Only the first N pages of each PDF are read. The total page count is always reported.",
            "default": 500
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "PDFs larger than this are not downloaded completely and are reported as too_large.",
            "default": 50
          },
          "maxCharsPerPdf": {
            "title": "Max characters of text per PDF",
            "minimum": 1000,
            "maximum": 2000000,
            "type": "integer",
            "description": "Longer text is cut (textTruncated = true). Keeps every result under the 9 MB dataset item limit.",
            "default": 1000000
          },
          "includePages": {
            "title": "Include per-page text",
            "type": "boolean",
            "description": "Also return a 'pages' array with the text of each page (useful for citations, RAG chunking or page-level search).",
            "default": false
          },
          "redactContactDetails": {
            "title": "Remove e-mail addresses and phone numbers",
            "type": "boolean",
            "description": "Replace e-mail addresses and phone-like numbers found in the text with [email removed] / [phone removed]. On by default; also applied to the title, subject and keywords metadata. The document author field is never returned. If you turn this off, you are responsible for any personal data in the output.",
            "default": true
          },
          "maxRedirects": {
            "title": "Max redirects per file",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Stop following a redirect chain after this many hops.",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "PDFs processed in parallel. Requests to the same host are always spaced out.",
            "default": 3
          },
          "requestDelayMs": {
            "title": "Delay between requests to the same host (ms)",
            "minimum": 250,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum pause between two requests to the same host (at least 250 ms). A larger robots.txt Crawl-delay is honoured.",
            "default": 500
          },
          "maxCrawlDelaySecs": {
            "title": "Max honoured Crawl-delay (s)",
            "minimum": 30,
            "maximum": 60,
            "type": "integer",
            "description": "Longest robots.txt Crawl-delay this Actor will wait between requests (30 to 60 s). Hosts asking for a longer delay are skipped, never requested faster.",
            "default": 30
          },
          "requestTimeoutSecs": {
            "title": "Download timeout (s)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "A file that does not finish downloading within this time is reported as an error.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}