{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Table Extractor: PDF Tables to Excel, CSV & JSON (OCR)",
    "description": "Extract every table from PDFs (native or scanned), Word, PowerPoint and web pages into Excel (.xlsx, one sheet per table), CSV and JSON. Handles multi-page tables, academic-paper tables and optional borderless detection. OCR for scans. No API key; pay per document.",
    "version": "1.0",
    "x-build-id": "q2kboTLOIrtvXGrE8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fguiraud~pdf-table-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fguiraud-pdf-table-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/fguiraud~pdf-table-extractor/runs": {
      "post": {
        "operationId": "runs-sync-fguiraud-pdf-table-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/fguiraud~pdf-table-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-fguiraud-pdf-table-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": {
          "sources": {
            "title": "PDF and document URLs",
            "type": "array",
            "description": "PDF (native or scanned), Word, PowerPoint, Excel, HTML pages or images with tables. Share links from Google Drive, Dropbox, OneDrive and GitHub work too (shared as 'Anyone with the link').",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "saveFiles": {
            "title": "Save Excel and CSV files",
            "type": "boolean",
            "description": "Save all tables of each document as an Excel workbook (.xlsx, one sheet per table) and each table as a .csv file; the result includes their download links.",
            "default": true
          },
          "tableDetection": {
            "title": "PDF table detection",
            "enum": [
              "lines",
              "text"
            ],
            "type": "string",
            "description": "'lines': detect tables drawn with borders/grid lines (precise, recommended). 'text': also detect borderless tables by aligning text columns (experimental: finds more tables, but columns can be split imperfectly).",
            "default": "lines"
          },
          "followDocumentLinks": {
            "title": "Also process documents linked from web pages",
            "type": "boolean",
            "description": "If a source URL is a web page, find links to PDF/DOCX/XLSX/XLS/PPTX/CSV files on it and convert those documents instead (e.g. a reports, filings or publications page). The page itself is not billed.",
            "default": false
          },
          "maxLinkedDocuments": {
            "title": "Max linked documents per page",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Limit for 'Also process documents linked from web pages'.",
            "default": 20
          },
          "ocr": {
            "title": "OCR mode",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "'auto': run OCR only on scanned pages that contain no text (recommended). 'always': OCR every page, even if it has a text layer. 'never': no OCR (images and scanned pages return no text). OCR pages are billed separately.",
            "default": "auto"
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "type": "array",
            "description": "Languages of the scanned text. Adding more languages is slightly slower.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "spa",
                "deu",
                "fra",
                "por",
                "ita",
                "nld"
              ],
              "enumTitles": [
                "English",
                "Spanish",
                "German",
                "French",
                "Portuguese",
                "Italian",
                "Dutch"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "pageRange": {
            "title": "Page range",
            "type": "string",
            "description": "Pages to process, e.g. '1-5, 8'. Applies to PDF pages, PowerPoint slides and Excel sheets. Leave empty for all."
          },
          "maxPages": {
            "title": "Max pages per document",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety limit on pages processed per document.",
            "default": 500
          },
          "pdfPassword": {
            "title": "PDF password",
            "type": "string",
            "description": "Password for encrypted PDFs (applies to all PDFs in the run)."
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Documents larger than this are skipped (not billed).",
            "default": 50
          },
          "base64Files": {
            "title": "Files as base64 (optional)",
            "type": "array",
            "description": "For files that are not reachable by URL, e.g. from an AI agent or a local script: a list of objects {\"fileName\": \"report.pdf\", \"content\": \"<base64>\"}. A data: URI is also accepted as content. Keep the total input under ~9 MB; use URLs for bigger files."
          },
          "failOnError": {
            "title": "Fail the run if any document fails",
            "type": "boolean",
            "description": "Mark the run as FAILED when a document cannot be processed or yields no text. Useful for pipelines and monitoring. Successfully processed documents are still returned (and billed).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max parallel documents",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many documents are processed at the same time.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}