{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF to Excel, Markdown & Text: Extract Tables from PDFs in Bulk",
    "description": "Extract tables from PDFs to Excel/CSV and convert PDF to Markdown or text, in bulk. Ruled and borderless tables (bank statements, reports), multi-page tables joined, real numbers, OCR in 12 languages. $3 per 1,000 PDFs.",
    "version": "1.1",
    "x-build-id": "AozKAUhzSpmaNfWXO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blueberry_rainstorm~pdf-to-text-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blueberry_rainstorm-pdf-to-text-markdown",
        "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/blueberry_rainstorm~pdf-to-text-markdown/runs": {
      "post": {
        "operationId": "runs-sync-blueberry_rainstorm-pdf-to-text-markdown",
        "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/blueberry_rainstorm~pdf-to-text-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-blueberry_rainstorm-pdf-to-text-markdown",
        "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": "Links to PDF files. Add as many as you like.",
            "default": [
              {
                "url": "https://arxiv.org/pdf/1706.03762"
              },
              {
                "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "pdfFile": {
            "title": "Upload a PDF (optional)",
            "type": "string",
            "description": "Upload a PDF from your computer."
          },
          "base64Pdfs": {
            "title": "Base64 PDFs (for API use)",
            "type": "array",
            "description": "List of base64 strings, or objects like {\"name\": \"invoice.pdf\", \"data\": \"<base64>\"}."
          },
          "password": {
            "title": "PDF password (optional)",
            "type": "string",
            "description": "For password-protected PDFs."
          },
          "pageRange": {
            "title": "Pages (optional)",
            "type": "string",
            "description": "e.g. 1-5, 8, 10- or -3 for the last three pages. Empty = all pages."
          },
          "maxPagesPerPdf": {
            "title": "Max pages per PDF",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety limit for very long documents.",
            "default": 1000
          },
          "includeMarkdown": {
            "title": "Markdown (headings, lists, tables)",
            "type": "boolean",
            "description": "LLM/RAG-ready Markdown.",
            "default": true
          },
          "includeText": {
            "title": "Plain text",
            "type": "boolean",
            "description": "Full plain text.",
            "default": true
          },
          "includePages": {
            "title": "Per-page text",
            "type": "boolean",
            "description": "Text of each page separately, with page numbers (for citations).",
            "default": false
          },
          "tableDetection": {
            "title": "Find tables",
            "enum": [
              "all",
              "ruled",
              "off"
            ],
            "type": "string",
            "description": "Borderless detection reads tables from aligned columns of text and numbers, as in bank statements and financial reports.",
            "default": "all"
          },
          "spreadsheetOutput": {
            "title": "Spreadsheet files",
            "enum": [
              "xlsx",
              "csv",
              "both",
              "none"
            ],
            "type": "string",
            "description": "Excel: one workbook per PDF plus tables.xlsx with every table from the run. Links are in each result (excelUrl, csvFiles) and in the run's Storage tab.",
            "default": "xlsx"
          },
          "spreadsheetLayout": {
            "title": "Excel layout",
            "enum": [
              "sheetPerTable",
              "oneSheet"
            ],
            "type": "string",
            "description": "How tables are laid out in the Excel files.",
            "default": "sheetPerTable"
          },
          "mergeMultiPageTables": {
            "title": "Join tables that continue on the next page",
            "type": "boolean",
            "description": "A table split over several pages (same columns) becomes one table, with the repeated header removed.",
            "default": true
          },
          "numbersAsNumbers": {
            "title": "Numbers as real numbers in Excel",
            "type": "boolean",
            "description": "\"$1,250.00\", \"(300)\" and \"12.5%\" become numbers you can sum, keeping their currency, negative and percent format. Codes with leading zeros stay text.",
            "default": true
          },
          "includeTables": {
            "title": "Tables as rows in the results (JSON)",
            "type": "boolean",
            "description": "Add a 'tables' field with each table's header, rows, page and title.",
            "default": true
          },
          "includeLinks": {
            "title": "Links in the PDF",
            "type": "boolean",
            "description": "List the web links embedded in the PDF.",
            "default": false
          },
          "removeHeadersFooters": {
            "title": "Remove repeated headers, footers and page numbers",
            "type": "boolean",
            "description": "Cleaner text for reading and AI.",
            "default": true
          },
          "ocr": {
            "title": "OCR scanned pages",
            "enum": [
              "auto",
              "off",
              "always"
            ],
            "type": "string",
            "description": "Read text from scanned pages and images. OCR pages are charged separately.",
            "default": "auto"
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "type": "array",
            "description": "Languages present in your scanned documents.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "fra",
                "deu",
                "spa",
                "ita",
                "por",
                "nld",
                "ara",
                "chi_sim",
                "jpn",
                "rus",
                "hin"
              ],
              "enumTitles": [
                "English",
                "French",
                "German",
                "Spanish",
                "Italian",
                "Portuguese",
                "Dutch",
                "Arabic",
                "Chinese (simplified)",
                "Japanese",
                "Russian",
                "Hindi"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "maxOcrPagesPerPdf": {
            "title": "Max OCR pages per PDF",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Caps OCR cost on big scanned files.",
            "default": 50
          },
          "chunkSize": {
            "title": "RAG chunk size (tokens, 0 = off)",
            "minimum": 0,
            "maximum": 8000,
            "type": "integer",
            "description": "Also split into chunks split on headings, each with its heading path.",
            "default": 0
          },
          "chunkOverlap": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Overlap between chunks of a long section.",
            "default": 100
          },
          "maxPdfSizeMb": {
            "title": "Max PDF size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Bigger files are skipped (free).",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Parallel PDFs",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many PDFs to process at once.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}