{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF to Markdown with Tables for AI Agents",
    "description": "Convert PDF, Word, PowerPoint and Excel files to clean Markdown plus every table as JSON rows and headers, page by page, with OCR for scanned pages. Built for AI agents and RAG: JSON in, JSON out, works through Apify's MCP server. $0.002 per page.",
    "version": "0.1",
    "x-build-id": "Mkqq3iW2IviOyE3na"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fluidfaith~pdf-to-markdown-tables/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fluidfaith-pdf-to-markdown-tables",
        "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/fluidfaith~pdf-to-markdown-tables/runs": {
      "post": {
        "operationId": "runs-sync-fluidfaith-pdf-to-markdown-tables",
        "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/fluidfaith~pdf-to-markdown-tables/run-sync": {
      "post": {
        "operationId": "run-sync-fluidfaith-pdf-to-markdown-tables",
        "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": "Document links",
            "maxItems": 200,
            "type": "array",
            "description": "Public http(s) links to .pdf, .docx, .pptx or .xlsx files, one per line (up to 200). The type is detected from the file content, not the extension. Required unless you give files. Localhost, private networks and internal hosts are refused.",
            "items": {
              "type": "string"
            }
          },
          "files": {
            "title": "Files (base64)",
            "maxItems": 5,
            "type": "array",
            "description": "For agents that already hold the file: a list of {\"name\": \"report.pdf\", \"base64\": \"...\"} objects. Up to 5 files, 10 MB each after decoding.",
            "default": []
          },
          "pages": {
            "title": "Pages",
            "type": "string",
            "description": "Page range for PDFs and PowerPoint slides, for example \"1-5,8\". Empty means all pages.",
            "default": ""
          },
          "maxPagesPerDocument": {
            "title": "Maximum pages per document",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Pages beyond this limit are skipped, listed in pagesSkipped and not charged.",
            "default": 200
          },
          "ocr": {
            "title": "OCR (scanned pages)",
            "enum": [
              "auto",
              "off",
              "force"
            ],
            "type": "string",
            "description": "auto: read only pages with no text layer using OCR. off: never use OCR. force: OCR every page (each is billed as a scanned page).",
            "default": "auto"
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "type": "array",
            "description": "Tesseract language codes used for scanned pages. Shipped: eng, spa, fra, deu, por, ita.",
            "default": [
              "eng"
            ],
            "items": {
              "type": "string"
            }
          },
          "tableMode": {
            "title": "Table mode",
            "enum": [
              "accurate",
              "fast"
            ],
            "type": "string",
            "description": "accurate: best table structure (default). fast: quicker, slightly less precise on complex tables.",
            "default": "accurate"
          },
          "tablesAs": {
            "title": "Table format",
            "enum": [
              "json",
              "markdown",
              "both"
            ],
            "type": "string",
            "description": "Format of each entry in the tables array: json (headers and rows), markdown, or both. Tables always also appear inline in the Markdown.",
            "default": "both"
          },
          "perPage": {
            "title": "Per-page Markdown",
            "type": "boolean",
            "description": "Also return pages[] with each page's Markdown.",
            "default": false
          },
          "chunkTokens": {
            "title": "Chunk size (tokens)",
            "minimum": 0,
            "maximum": 8000,
            "type": "integer",
            "description": "0 = off. Above 0: also return chunks[] of about this many tokens with their page numbers, ready for RAG. 200 to 8000.",
            "default": 0
          },
          "inlineMarkdownMaxChars": {
            "title": "Inline Markdown limit (characters)",
            "minimum": 0,
            "maximum": 2000000,
            "type": "integer",
            "description": "Markdown longer than this is not put in the dataset row; read it from markdownUrl instead. Protects agent context windows.",
            "default": 200000
          },
          "maxConcurrency": {
            "title": "Documents in parallel",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many documents are converted at the same time (1 to 4). Lowered automatically if the run memory is too small.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}