{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF to Text & Tables Extractor - Markdown + OCR, $0.40/1K",
    "description": "Convert PDFs to clean text, Markdown and tables (rows + CSV) with metadata. Scanned pages are read with OCR in 28 languages. Paste links or upload a file. $0.40 per 1,000 pages, OCR pages $8 per 1,000.",
    "version": "0.1",
    "x-build-id": "99O6HktpsjCrZ4wMb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plotpointtech~pdf-text-markdown-tables-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plotpointtech-pdf-text-markdown-tables-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/plotpointtech~pdf-text-markdown-tables-extractor/runs": {
      "post": {
        "operationId": "runs-sync-plotpointtech-pdf-text-markdown-tables-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/plotpointtech~pdf-text-markdown-tables-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-plotpointtech-pdf-text-markdown-tables-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": {
          "startUrls": {
            "title": "PDF URLs",
            "type": "array",
            "description": "Direct links to PDF files. You can paste many at once or upload a text file with one URL per line. Links that fail to download or are not PDFs are skipped and not charged.",
            "default": [
              {
                "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"
                }
              }
            }
          },
          "uploadedPdf": {
            "title": "Or upload a PDF",
            "type": "string",
            "description": "Upload a PDF from your computer. It is stored in your Apify key-value store and processed together with any URLs above."
          },
          "pageRange": {
            "title": "Page range",
            "type": "string",
            "description": "Optional. Which pages to process in every PDF, e.g. 1-5, 8, 10- (page 10 to the end). Leave empty for all pages."
          },
          "maxPagesPerPdf": {
            "title": "Maximum pages per PDF",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many pages in each PDF (after applying the page range). Keeps costs predictable for very large files. 0 = no limit.",
            "default": 300
          },
          "ocrMode": {
            "title": "OCR for scanned pages",
            "enum": [
              "auto",
              "always",
              "off"
            ],
            "type": "string",
            "description": "Auto reads only pages that have no text layer (scans, photographed pages) with OCR. Always runs OCR on every page (slower, use for PDFs whose text layer is garbled). Off never runs OCR; scanned pages then come back empty.",
            "default": "auto"
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "type": "array",
            "description": "Languages printed in your scanned documents. Pick one or a few; adding many slows OCR down and can reduce accuracy.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "deu",
                "fra",
                "spa",
                "ita",
                "por",
                "nld",
                "pol",
                "swe",
                "dan",
                "nor",
                "fin",
                "ces",
                "tur",
                "rus",
                "ukr",
                "ell",
                "ara",
                "heb",
                "hin",
                "chi_sim",
                "chi_tra",
                "jpn",
                "kor",
                "vie",
                "ind",
                "ron",
                "hun"
              ],
              "enumTitles": [
                "English",
                "German",
                "French",
                "Spanish",
                "Italian",
                "Portuguese",
                "Dutch",
                "Polish",
                "Swedish",
                "Danish",
                "Norwegian",
                "Finnish",
                "Czech",
                "Turkish",
                "Russian",
                "Ukrainian",
                "Greek",
                "Arabic",
                "Hebrew",
                "Hindi",
                "Chinese (Simplified)",
                "Chinese (Traditional)",
                "Japanese",
                "Korean",
                "Vietnamese",
                "Indonesian",
                "Romanian",
                "Hungarian"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "extractTables": {
            "title": "Extract tables",
            "type": "boolean",
            "description": "Detect tables and return each as rows of cells plus a CSV string. They also appear as Markdown tables in the Markdown output.",
            "default": true
          },
          "tableStrategy": {
            "title": "Table detection",
            "enum": [
              "auto",
              "lines",
              "text"
            ],
            "type": "string",
            "description": "Auto first looks for tables drawn with lines or cell borders and, on pages without any, for borderless tables whose columns are aligned numbers (typical of statistics releases). Ruled lines only is the most conservative. Text alignment only suits PDFs whose tables have no borders at all.",
            "default": "auto"
          },
          "includeText": {
            "title": "Include plain text",
            "type": "boolean",
            "description": "Full plain text of the processed pages.",
            "default": true
          },
          "includeMarkdown": {
            "title": "Include Markdown",
            "type": "boolean",
            "description": "Markdown version with headings, lists, paragraphs and tables, ready for LLMs and RAG.",
            "default": true
          },
          "includePages": {
            "title": "Include per-page output",
            "type": "boolean",
            "description": "Add a list with the text and Markdown of each page separately (useful for citations by page number).",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Larger files are skipped.",
            "default": 100
          },
          "timeoutPerPdfSecs": {
            "title": "Time limit per PDF (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Processing stops after this many seconds for one PDF; pages done so far are still returned and marked incomplete.",
            "default": 900
          },
          "maxConcurrency": {
            "title": "Downloads at once",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many PDFs to download in parallel. PDFs are then processed one after another, which is fastest for this kind of work.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}