{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Extractor All-in-One: Text, Tables & OCR",
    "description": "The all-in-one PDF extractor: text in reading order (even multi-column), LLM-ready Markdown, tables, OCR for scanned pages in 20 languages, RAG chunks, images and page images. Passwords, page ranges, links, uploads or base64. Failed PDFs are not charged. Export via API, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "lnxIgrMCHmPl5Nrfp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/t800solutions~pdf-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-t800solutions-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/t800solutions~pdf-extractor/runs": {
      "post": {
        "operationId": "runs-sync-t800solutions-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/t800solutions~pdf-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-t800solutions-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",
        "properties": {
          "urls": {
            "title": "📄 PDF URLs",
            "type": "array",
            "description": "Replace the example link with links to your PDFs, one per line (up to 1,000 per run). Direct links work best, e.g. https://example.com/report.pdf. Images (JPG, PNG, TIFF, WebP) also work when OCR is on. If you also upload a file or add your own links, the example link is skipped automatically.",
            "items": {
              "type": "string"
            }
          },
          "pdf_file": {
            "title": "📎 Upload a PDF or image",
            "type": "string",
            "description": "Upload one PDF from your computer. It is used only to process this run and is deleted right after."
          },
          "pdf_password": {
            "title": "🔑 PDF password",
            "type": "string",
            "description": "Password for protected PDFs. Leave empty if your PDFs are not protected."
          },
          "page_range": {
            "title": "📑 Page range",
            "type": "string",
            "description": "Only these pages, e.g. 1-5, 8, 12- (12- means page 12 to the end). Leave empty for all pages."
          },
          "first_pages": {
            "title": "⏮️ Only the first N pages",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Extract only the first N pages of each PDF (0 or empty = no limit). Can be combined with the last N pages."
          },
          "last_pages": {
            "title": "⏭️ Only the last N pages",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Extract only the last N pages of each PDF (0 or empty = no limit)."
          },
          "output_format": {
            "title": "🧾 Output format",
            "enum": [
              "document",
              "pages",
              "chunks"
            ],
            "type": "string",
            "description": "One row per PDF is the simplest. One row per page helps with long documents. RAG chunks are text pieces with their page numbers, ready for vector databases.",
            "default": "document"
          },
          "include_markdown": {
            "title": "📝 Markdown (LLM-ready)",
            "type": "boolean",
            "description": "Headings, lists and tables rebuilt as clean Markdown, ready for ChatGPT, Claude or any LLM.",
            "default": true
          },
          "include_pages": {
            "title": "📑 Per-page text inside each PDF row",
            "type": "boolean",
            "description": "Adds a pages list (page number, text, tables, OCR yes or no) to each PDF row.",
            "default": false
          },
          "extract_tables": {
            "title": "📊 Extract tables",
            "type": "boolean",
            "description": "Tables come out as rows and columns, and as Markdown tables.",
            "default": true
          },
          "chunk_size": {
            "title": "🧩 RAG chunk size (characters)",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Only for RAG chunks.",
            "default": 1000
          },
          "chunk_overlap": {
            "title": "🔁 RAG chunk overlap (characters)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Only for RAG chunks. Text repeated between neighbour chunks, so no sentence is lost at the border.",
            "default": 150
          },
          "ocr_scanned_pages": {
            "title": "🔍 Add-on: OCR scanned pages",
            "type": "boolean",
            "description": "Reads pages that are images (scans) with OCR. Pages that already have text are not sent to OCR.",
            "default": false
          },
          "ocr_languages": {
            "title": "🌍 OCR languages",
            "type": "array",
            "description": "Languages of your scanned pages (English by default). Pick the right one for the best accuracy; more than one for mixed documents (slower).",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "por",
                "spa",
                "fra",
                "deu",
                "ita",
                "nld",
                "pol",
                "tur",
                "rus",
                "ukr",
                "ara",
                "hin",
                "jpn",
                "kor",
                "chi_sim",
                "chi_tra",
                "vie",
                "ind",
                "tha"
              ],
              "enumTitles": [
                "🇬🇧 English",
                "🇧🇷 Portuguese",
                "🇪🇸 Spanish",
                "🇫🇷 French",
                "🇩🇪 German",
                "🇮🇹 Italian",
                "🇳🇱 Dutch",
                "🇵🇱 Polish",
                "🇹🇷 Turkish",
                "🇷🇺 Russian",
                "🇺🇦 Ukrainian",
                "🇸🇦 Arabic",
                "🇮🇳 Hindi",
                "🇯🇵 Japanese",
                "🇰🇷 Korean",
                "🇨🇳 Chinese (Simplified)",
                "🇹🇼 Chinese (Traditional)",
                "🇻🇳 Vietnamese",
                "🇮🇩 Indonesian",
                "🇹🇭 Thai"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "ocr_max_pages_per_pdf": {
            "title": "🔢 Max OCR pages per PDF",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Pages read by OCR per PDF. Your maximum charge per run (set when you start the run) still protects your budget.",
            "default": 2000
          },
          "export_images": {
            "title": "🖼️ Add-on: Export images",
            "type": "boolean",
            "description": "Exports every image inside the PDF as its own file, cleaned up: tiny icons and lines are skipped, a logo repeated on every page comes out once (with the list of pages), and JPG images keep their original quality. Each row gets the list with page, size, position and download link.",
            "default": false
          },
          "images_min_size_px": {
            "title": "Minimum image size (px)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Images smaller than this on their longest side are skipped (icons, bullets, dots). Not charged.",
            "default": 64
          },
          "images_skip_duplicates": {
            "title": "Skip duplicate images",
            "type": "boolean",
            "description": "The same image on many pages (like a logo) is exported once, with all the pages where it appears.",
            "default": true
          },
          "images_format": {
            "title": "Image format",
            "enum": [
              "original",
              "png",
              "jpg",
              "webp"
            ],
            "type": "string",
            "description": "Original keeps photos exactly as they are in the PDF, with no quality loss.",
            "default": "original"
          },
          "images_max_per_pdf": {
            "title": "Max images per PDF",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Protects your budget on PDFs with thousands of images.",
            "default": 500
          },
          "page_images": {
            "title": "📸 Add-on: Page images",
            "type": "boolean",
            "description": "Turns each page into an image, exactly as it looks (text, tables, charts and layout). Great for AI vision models (GPT-4o, Claude, Gemini), previews and archiving.",
            "default": false
          },
          "page_images_dpi": {
            "title": "Page image resolution (DPI)",
            "minimum": 72,
            "maximum": 600,
            "type": "integer",
            "description": "72 = small preview, 150 = screen (recommended), 200 = AI vision, 300 = print, 600 = maximum.",
            "default": 150
          },
          "page_images_format": {
            "title": "Page image format",
            "enum": [
              "png",
              "jpg",
              "webp"
            ],
            "type": "string",
            "description": "PNG keeps text sharpest; JPG and WebP make smaller files.",
            "default": "png"
          },
          "page_images_quality": {
            "title": "JPG / WebP quality",
            "minimum": 50,
            "maximum": 100,
            "type": "integer",
            "description": "Only for JPG and WebP. 90 is a good balance between sharpness and size.",
            "default": 90
          },
          "page_images_thumbnail": {
            "title": "Thumbnails instead of full size (200 px wide)",
            "type": "boolean",
            "description": "Small preview images instead of full pages.",
            "default": false
          },
          "page_images_max_per_pdf": {
            "title": "Max page images per PDF",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Pages above this number are not turned into images (and not charged).",
            "default": 2000
          },
          "remove_headers_footers": {
            "title": "🧹 Remove repeated headers and footers",
            "type": "boolean",
            "description": "Lines that repeat at the top or bottom of most pages (like a company name or report title) are removed.",
            "default": false
          },
          "remove_page_numbers": {
            "title": "🔢 Remove page number lines",
            "type": "boolean",
            "description": "Removes lines like '12', 'Page 12' or 'Page 12 of 40'.",
            "default": false
          },
          "remove_blank_lines": {
            "title": "↕️ Remove extra blank lines",
            "type": "boolean",
            "description": "Keeps at most one blank line in a row and removes spaces at the end of lines.",
            "default": false
          },
          "skip_empty_pages": {
            "title": "⬜ Skip empty pages",
            "type": "boolean",
            "description": "Pages with no text and no tables are left out of the result.",
            "default": false
          },
          "max_pages_per_pdf": {
            "title": "📏 Max pages per PDF",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Pages above this number are not extracted (and not charged).",
            "default": 2000
          },
          "max_pdf_size_mb": {
            "title": "📦 Max PDF size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Larger files are skipped as failed rows (not charged).",
            "default": 100
          },
          "timeout_per_pdf_secs": {
            "title": "⏱️ Timeout per PDF (seconds)",
            "minimum": 10,
            "maximum": 7200,
            "type": "integer",
            "description": "If a PDF takes longer, the pages already read are delivered and the row gets a note. Long PDFs (hundreds of pages) need minutes, so keep it high.",
            "default": 1800
          },
          "max_concurrency": {
            "title": "⚡ PDFs at the same time",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many PDFs are processed in parallel.",
            "default": 3
          },
          "base64_pdfs": {
            "title": "🧬 Base64 PDFs (for API calls)",
            "type": "array",
            "description": "PDFs as base64 text, for API and automation users. Each item can be a base64 string or {\"name\": \"invoice.pdf\", \"data\": \"<base64>\"}."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}