{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Table Extractor: PDF to Excel & CSV Converter with OCR",
    "description": "Use this to extract every table from PDF files into Excel and CSV (PDF to Excel converter, OCR for scans). Input: PDF URLs or uploads plus optional page ranges. Output: one row per table with pages, header, row and column counts and cell data, plus Excel and CSV files.",
    "version": "0.1",
    "x-build-id": "zlPKebbvs0Ulx2sUb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pandadad0214~pdf-table-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pandadad0214-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/pandadad0214~pdf-table-extractor/runs": {
      "post": {
        "operationId": "runs-sync-pandadad0214-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/pandadad0214~pdf-table-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-pandadad0214-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": {
          "pdfUrls": {
            "title": "PDF URLs",
            "type": "array",
            "description": "Direct links to PDF files. Google Drive and Dropbox share links are converted to direct downloads automatically. Up to 150 MB per file.",
            "items": {
              "type": "string"
            }
          },
          "pdfFiles": {
            "title": "Upload PDFs",
            "type": "array",
            "description": "Or upload PDFs from your computer. They are stored in a key-value store in your Apify account."
          },
          "pdfStore": {
            "title": "Key-value store with PDFs",
            "type": "string",
            "description": "Optional. Pick a key-value store in your account that holds PDFs. The Actor gets read access to this store only."
          },
          "pdfStoreKeys": {
            "title": "Record keys in that store",
            "type": "array",
            "description": "Optional. Keys of the PDFs to process (e.g. REPORT.pdf). Leave empty to process every PDF record in the store (up to 50).",
            "items": {
              "type": "string"
            }
          },
          "pages": {
            "title": "Pages",
            "type": "string",
            "description": "Optional. Only these pages, e.g. 1-5, 8, 12-end. Leave empty for all pages (up to the page limit below)."
          },
          "maxPagesPerPdf": {
            "title": "Maximum pages per PDF",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Caps cost and run time on very long documents. You pay per page analysed. Whole number, 1 to 2,000 pages; default 100.",
            "default": 100
          },
          "detection": {
            "title": "Table detection",
            "enum": [
              "auto",
              "lattice",
              "stream"
            ],
            "type": "string",
            "description": "Auto tries ruled-grid detection first and switches to whitespace (column alignment) detection when that recovers more of the table. Pick one mode if you know your PDF's style.",
            "default": "auto"
          },
          "headerDetection": {
            "title": "Header row",
            "enum": [
              "auto",
              "firstRow",
              "none"
            ],
            "type": "string",
            "description": "Auto finds header rows above the first data row (multi-line headers are joined). First row = always use row 1. None = generic Column 1, Column 2… names.",
            "default": "auto"
          },
          "mergeWrappedRows": {
            "title": "Merge wrapped rows",
            "type": "boolean",
            "description": "Join labels that wrap onto a second line back into one row, so numbers stay on the right line. Default: on.",
            "default": true
          },
          "mergeAcrossPages": {
            "title": "Join tables that continue on the next page",
            "type": "boolean",
            "description": "When a table carries on over a page break with the same columns, output it as one table with a page range. Default: on.",
            "default": true
          },
          "numbersAsNumbers": {
            "title": "Numbers as numbers in Excel",
            "type": "boolean",
            "description": "Write 1,234 / (56) / 4.2% as real Excel numbers (parentheses = negative) so you can sum and chart them. CSV and dataset keep the text exactly as printed. Default: on.",
            "default": true
          },
          "ocrScannedPages": {
            "title": "OCR scanned pages (beta)",
            "type": "boolean",
            "description": "Pages with no text layer (scans, photos) are always detected. Off (default): they are skipped, listed in SUMMARY and on the Index sheet, and cost nothing. On: they are read with Tesseract OCR (English) and their tables are marked 'verify'. OCR is slow (about a minute per page) and can misread digits and dot leaders, so use it for clean scans and check the numbers.",
            "default": false
          },
          "maxOcrPagesPerPdf": {
            "title": "Maximum OCR pages per PDF",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "OCR has its own cap because it is slow and priced per page. Extra scanned pages are flagged, not charged. Whole number, 0 to 100 pages; default 10.",
            "default": 10
          },
          "pdfPassword": {
            "title": "PDF password",
            "type": "string",
            "description": "Optional. Only for password-protected PDFs you are allowed to open."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}