{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Text Extractor – PDF, DOCX & PPTX to Markdown",
    "description": "Turn PDF, Word (DOCX) and PowerPoint (PPTX) files into clean text and Markdown. Give URLs or uploads and get one row per document, page or RAG-ready chunk, with metadata and a status per file.",
    "version": "1.0",
    "x-build-id": "rkpLTBRPnbCXR61h6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/openfeeds~pdf-to-text-markdown-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-openfeeds-pdf-to-text-markdown-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/openfeeds~pdf-to-text-markdown-extractor/runs": {
      "post": {
        "operationId": "runs-sync-openfeeds-pdf-to-text-markdown-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/openfeeds~pdf-to-text-markdown-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-openfeeds-pdf-to-text-markdown-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": {
          "urls": {
            "title": "Document URLs",
            "maxItems": 10000,
            "type": "array",
            "description": "Direct links to PDF, Word (DOCX) or PowerPoint (PPTX) files, one per line, starting with http:// or https://. Each unique URL gets its own result row with a status, so one bad link never stops the run: a malformed link gets status `invalid_url`. A URL listed twice is processed once (the run's SUMMARY counts it under `duplicatesSkipped`). Links to Google Drive and other unsupported platforms are skipped; share pages that return a web page are reported as `unsupported_format`. Exception: once your maximum charge per run is used up, the files not yet started get no row and are listed as `charge_limit_reached` in the SUMMARY record.",
            "items": {
              "type": "string"
            }
          },
          "uploadedFiles": {
            "title": "Upload files",
            "maxItems": 1000,
            "type": "array",
            "description": "Upload PDF, Word (DOCX) or PowerPoint (PPTX) files from your computer (they are stored in your Apify key-value store), or paste file links. Processed exactly like document URLs.",
            "default": []
          },
          "outputMode": {
            "title": "Output rows",
            "enum": [
              "documents",
              "pages",
              "chunks"
            ],
            "type": "string",
            "description": "How results are split into dataset rows: one row per file (`documents`), one row per PDF page or PowerPoint slide (`pages`; a Word file gives one row), or one row per text chunk for RAG and embeddings (`chunks`). Files that fail always produce one status row.",
            "default": "documents"
          },
          "includeText": {
            "title": "Include plain text",
            "type": "boolean",
            "description": "Adds the `text` field: reading-order plain text with paragraphs separated by blank lines.",
            "default": true
          },
          "includeMarkdown": {
            "title": "Include Markdown",
            "type": "boolean",
            "description": "Adds the `markdown` field: headings, lists, tables (Word and PowerPoint) and reflowed paragraphs.",
            "default": true
          },
          "removeHeadersFooters": {
            "title": "Remove repeated headers and footers",
            "type": "boolean",
            "description": "PDF: drops lines that repeat at the top or bottom of most pages (running titles, page numbers). PowerPoint footer, date and slide-number boxes are always skipped, and Word headers and footers are never included.",
            "default": true
          },
          "pageMarkers": {
            "title": "Page and slide markers in Markdown",
            "type": "boolean",
            "description": "In `documents` mode, inserts `<!-- page N -->` (PDF) or `<!-- slide N -->` (PowerPoint) before each page or slide so you can cite them.",
            "default": true
          },
          "includeSpeakerNotes": {
            "title": "Include PowerPoint speaker notes",
            "type": "boolean",
            "description": "Adds each slide's speaker notes under the slide as a 'Speaker notes' block.",
            "default": true
          },
          "pageRange": {
            "title": "Pages or slides to extract",
            "pattern": "^\\s*$|^\\s*\\d+\\s*(-\\s*\\d*)?\\s*(,\\s*\\d+\\s*(-\\s*\\d*)?\\s*)*$",
            "type": "string",
            "description": "Page or slide numbers and ranges, for example `1-5, 8, 10-`. Leave empty for all. Applies to every PDF and PowerPoint file; ignored for Word files.",
            "default": ""
          },
          "maxPagesPerDocument": {
            "title": "Max pages or slides per file",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stops after this many pages or slides of each file (after the page selection). Larger files are charged per started 100 pages or slides (see Pricing).",
            "default": 500
          },
          "maxFileSizeMb": {
            "title": "Max file size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Larger files are skipped with status `too_large` and are not charged.",
            "default": 50
          },
          "maxCharsPerDocument": {
            "title": "Max characters per row",
            "minimum": 1000,
            "maximum": 2000000,
            "type": "integer",
            "description": "In `documents` mode, longer text or Markdown is cut at a paragraph boundary and the full version is saved to the run's key-value store (see `fullTextUrl` / `fullMarkdownUrl`).",
            "default": 300000
          },
          "chunkSize": {
            "title": "Chunk size",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Target length of each chunk in `chunks` mode. About 4 characters ≈ 1 token.",
            "default": 2000
          },
          "chunkOverlap": {
            "title": "Chunk overlap",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Characters repeated from the end of the previous chunk, so context is not lost at boundaries.",
            "default": 200
          },
          "pdfPassword": {
            "title": "PDF password",
            "type": "string",
            "description": "Password for encrypted PDFs, if you have it. Tried on every PDF that asks for one; PDFs that open without a password (for example, ones that only restrict printing or editing) are read as they are. Password-protected Word and PowerPoint files are not supported. Stored encrypted; never logged."
          },
          "respectOptOuts": {
            "title": "Respect publisher opt-outs",
            "type": "boolean",
            "description": "Skips files whose publisher reserved text and data mining (TDMRep header, `/.well-known/tdmrep.json` or PDF metadata) or that robots.txt disallows. Skipped files are not charged. Turn off only for files you own or are licensed to process.",
            "default": true
          },
          "userAgent": {
            "title": "Custom User-Agent",
            "maxLength": 300,
            "type": "string",
            "description": "Optional. Some publishers require you to identify yourself (for example with your organisation name and a contact address). Leave empty for the default.",
            "default": ""
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many files are downloaded at the same time. At most 2 run against the same website, to stay polite.",
            "default": 4
          },
          "timeoutPerDocumentSecs": {
            "title": "Timeout per file",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Limit for downloading and, separately, for parsing each file. Time spent waiting for a turn on the same website (at most 2 parallel downloads per site, plus any robots.txt Crawl-delay) does not count. Files that take longer get status `timeout` and are not charged.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}