{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF & Image Text Extractor: Markdown, OCR, RAG Chunks",
    "description": "Extract text, Markdown and metadata from PDF files and images, with OCR for scanned pages. Paste PDF links, image links or web pages: PDFs linked on a page are found for you. Page-by-page text, AI-ready chunks, page ranges. No browser.",
    "version": "1.0",
    "x-build-id": "UCSnzO68e5JzfYl1C"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hydrocore~pdf-image-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hydrocore-pdf-image-text-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/hydrocore~pdf-image-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-hydrocore-pdf-image-text-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/hydrocore~pdf-image-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-hydrocore-pdf-image-text-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": "Files or pages",
            "type": "array",
            "description": "Links to PDF files (.pdf), images (PNG, JPG, WebP, BMP, GIF, TIFF) or web pages. If a link is a web page, the PDFs it links to are collected (see \"Find PDF links on web pages\"). One link per line.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset ID (optional)",
            "type": "string",
            "description": "Read links from an Apify dataset, for example the output of another scraper. Use it with \"URL field in dataset\"."
          },
          "datasetUrlField": {
            "title": "URL field in dataset",
            "type": "string",
            "description": "Name of the dataset field that holds the link. The field can also hold a list of links.",
            "default": "url"
          },
          "findPdfLinks": {
            "title": "Find PDF links on web pages",
            "type": "boolean",
            "description": "When a link is a web page instead of a file, read the page and extract every PDF it links to. Only links in the page's HTML are found; links added later by JavaScript are not.",
            "default": true
          },
          "pdfLinkKeywords": {
            "title": "Only PDFs whose link contains",
            "type": "array",
            "description": "Optional. Keep only PDF links whose address or link text contains one of these words, e.g. \"annual report\" or \"2025\". Not case-sensitive.",
            "items": {
              "type": "string"
            }
          },
          "maxPdfsPerPage": {
            "title": "Max PDFs per web page",
            "minimum": 0,
            "type": "integer",
            "description": "Upper limit of PDF links taken from one web page. 0 means no limit.",
            "default": 25
          },
          "outputFormat": {
            "title": "Text format",
            "enum": [
              "markdown",
              "text",
              "both"
            ],
            "type": "string",
            "description": "Markdown keeps the document structure and works well with ChatGPT and other AI tools. Plain text keeps the original line breaks.",
            "default": "markdown"
          },
          "includePages": {
            "title": "Include text page by page",
            "type": "boolean",
            "description": "Add a \"pages\" list with the text of each page, and whether that page was read with OCR.",
            "default": false
          },
          "chunkSize": {
            "title": "AI chunk size (characters)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Split each document into chunks for RAG or vector databases, with page numbers on every chunk. About 1,000-2,000 characters works well. 0 turns chunking off.",
            "default": 0
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Characters repeated from the end of one chunk at the start of the next, so sentences are not cut off without context.",
            "default": 200
          },
          "pageRange": {
            "title": "Pages to read",
            "type": "string",
            "description": "Optional. For example \"1-3, 7, 10-\" (\"10-\" means page 10 to the end). Empty means all pages."
          },
          "maxPages": {
            "title": "Max pages per document",
            "minimum": 0,
            "type": "integer",
            "description": "Read at most this many pages of each PDF. 0 means no limit. Useful to keep costs down when you only need the first pages of long scanned files.",
            "default": 0
          },
          "ocrMode": {
            "title": "OCR (scanned pages and images)",
            "enum": [
              "auto",
              "always",
              "off"
            ],
            "type": "string",
            "description": "Auto reads normal PDFs directly and uses OCR only on pages that have no text (scanned pages). Images always need OCR. OCR pages are billed separately, see Pricing.",
            "default": "auto"
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "type": "array",
            "description": "Languages printed in your scanned documents. Pick 1 or 2; more languages make OCR slower and less accurate.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "deu",
                "fra",
                "spa",
                "ita",
                "por",
                "nld",
                "pol",
                "ces",
                "slk",
                "swe",
                "dan",
                "nor",
                "fin",
                "hun",
                "ron",
                "ell",
                "tur",
                "rus",
                "ukr",
                "ara",
                "heb",
                "hin",
                "ind",
                "vie",
                "tha",
                "jpn",
                "kor",
                "chi_sim",
                "chi_tra"
              ],
              "enumTitles": [
                "English",
                "German",
                "French",
                "Spanish",
                "Italian",
                "Portuguese",
                "Dutch",
                "Polish",
                "Czech",
                "Slovak",
                "Swedish",
                "Danish",
                "Norwegian",
                "Finnish",
                "Hungarian",
                "Romanian",
                "Greek",
                "Turkish",
                "Russian",
                "Ukrainian",
                "Arabic",
                "Hebrew",
                "Hindi",
                "Indonesian",
                "Vietnamese",
                "Thai",
                "Japanese",
                "Korean",
                "Chinese (Simplified)",
                "Chinese (Traditional)"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "minTextCharsPerPage": {
            "title": "Scanned page threshold (characters)",
            "minimum": 0,
            "type": "integer",
            "description": "In Auto mode, a page with fewer text characters than this is treated as scanned and read with OCR.",
            "default": 25
          },
          "ocrDpi": {
            "title": "OCR resolution (DPI)",
            "minimum": 72,
            "maximum": 400,
            "type": "integer",
            "description": "Resolution used to render scanned PDF pages for OCR. 200 is a good balance; use 300 for very small print.",
            "default": 200
          },
          "password": {
            "title": "PDF password",
            "type": "string",
            "description": "Password for protected PDFs. The same password is tried on every PDF in the run."
          },
          "maxFileSizeMb": {
            "title": "Max file size",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Larger files are skipped and reported as errors (no charge). For files over 50 MB, give the run 1 GB of memory or more.",
            "default": 50
          },
          "maxDocuments": {
            "title": "Max documents",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many files. 0 means no limit.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many files are downloaded and processed at the same time.",
            "default": 2
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip links that the website's robots.txt asks bots not to fetch. Turn off only for files you own or have permission to download.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}