{
  "openapi": "3.0.1",
  "info": {
    "title": "Hebrew PDF & OCR Text Extractor (RTL-correct, עברית)",
    "description": "Extract clean Hebrew & English text from PDFs, scans, DOCX, images and web pages. Correct RTL order, OCR (heb+eng), Markdown, per-page. Failed files free.",
    "version": "1.0",
    "x-build-id": "pPJbrSgEJbtwJsrEQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vantum~hebrew-document-reader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vantum-hebrew-document-reader",
        "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/vantum~hebrew-document-reader/runs": {
      "post": {
        "operationId": "runs-sync-vantum-hebrew-document-reader",
        "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/vantum~hebrew-document-reader/run-sync": {
      "post": {
        "operationId": "run-sync-vantum-hebrew-document-reader",
        "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": {
          "documents": {
            "title": "Document URLs",
            "type": "array",
            "description": "Links to PDF (text or scanned), DOCX, images (JPG, PNG, TIFF, WEBP, GIF, BMP), web pages or .txt files. Google Drive, Google Docs, Dropbox and GitHub share links are converted to direct downloads automatically. You can also point to a text file with one URL per line.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "uploadedFiles": {
            "title": "Upload files",
            "type": "array",
            "description": "Upload documents from your computer. They are stored in a key-value store and read from there."
          },
          "keyValueStore": {
            "title": "Read files from a key-value store",
            "type": "string",
            "description": "Pick one of your Apify key-value stores to extract every document stored in it (or only the keys listed below). Handy for files saved by other Actors or uploaded earlier. Read-only access."
          },
          "keyValueStoreKeys": {
            "title": "Only these keys",
            "type": "array",
            "description": "Optional. Record keys to read from the store above. End a key with * to match a prefix, e.g. invoice-*. Leave empty to read all records.",
            "items": {
              "type": "string"
            }
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "enum": [
              "heb+eng",
              "heb",
              "eng",
              "heb+eng+ara",
              "heb+ara",
              "heb+eng+rus",
              "heb+yid",
              "yid",
              "ara",
              "ara+eng",
              "rus",
              "fra",
              "deu",
              "spa",
              "ita",
              "por"
            ],
            "type": "string",
            "description": "Languages for OCR of scanned pages and images (Tesseract codes). Hebrew + English handles most Israeli documents. Pick the smallest set you need; extra languages make OCR slower and less accurate.",
            "default": "heb+eng"
          },
          "ocrMode": {
            "title": "When to use OCR",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "Auto decides page by page, so a PDF that mixes typed and scanned pages is read correctly. Images are always OCRed.",
            "default": "auto"
          },
          "outputFormat": {
            "title": "Text format",
            "enum": [
              "text",
              "markdown"
            ],
            "type": "string",
            "description": "Markdown keeps headings, lists and tables from DOCX and web pages, and joins hard-wrapped PDF lines into paragraphs.",
            "default": "text"
          },
          "maxPagesPerDocument": {
            "title": "Max pages per document",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Only the first N pages of each PDF / multi-page TIFF are read (and charged). Protects you from surprise 900-page files.",
            "default": 50
          },
          "oneItemPerPage": {
            "title": "One dataset row per page",
            "type": "boolean",
            "description": "Off: one row per document. On: one row per page (with page number, method and OCR confidence), ideal for search indexes and RAG chunking.",
            "default": false
          },
          "includePages": {
            "title": "Include a pages array in each document row",
            "type": "boolean",
            "description": "Adds pages[] (number, method, chars, OCR confidence, text) to each document row.",
            "default": false
          },
          "saveTextFiles": {
            "title": "Also save each text as a .txt / .md file",
            "type": "boolean",
            "description": "Saves the full text of each document to the key-value store and adds a download link (textFileUrl). Always done automatically for texts over 1 million characters.",
            "default": false
          },
          "preserveLayout": {
            "title": "Preserve PDF layout (columns, tables)",
            "type": "boolean",
            "description": "Keeps the physical layout of text-layer PDFs with spaces, which helps with tables and forms. Off gives clean reading-order text.",
            "default": false
          },
          "repairLegacyHebrewEncoding": {
            "title": "Repair legacy Hebrew encodings",
            "type": "boolean",
            "description": "Fixes gibberish like 'ùìåí' (Windows-1255 read as Latin-1) and reversed 'visual Hebrew' from old systems.",
            "default": true
          },
          "removeNiqqud": {
            "title": "Remove niqqud and cantillation",
            "type": "boolean",
            "description": "Strips Hebrew vowel points (ניקוד) and Torah cantillation marks so the text is easier to search.",
            "default": false
          },
          "keepBidiControlCharacters": {
            "title": "Keep raw bidi control characters",
            "type": "boolean",
            "description": "Advanced. Off (recommended) removes invisible LRE/RLE/PDF/LRM/RLM marks and repairs punctuation and bracket order. On returns the raw extractor output untouched.",
            "default": false
          },
          "dryRun": {
            "title": "Dry run (count pages and estimate cost, nothing charged)",
            "type": "boolean",
            "description": "Downloads each document, counts text and scanned pages and estimates the price, without extracting or charging anything.",
            "default": false
          },
          "maxDocuments": {
            "title": "Max documents",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety cap on the number of documents read in one run.",
            "default": 1000
          },
          "maxFileSizeMb": {
            "title": "Max file size",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Larger files are skipped with a FILE_TOO_LARGE error (not charged).",
            "default": 50
          },
          "requestTimeoutSecs": {
            "title": "Download timeout",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "How long to wait for each download.",
            "default": 90
          },
          "maxConcurrency": {
            "title": "Documents in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many documents are downloaded and read at the same time. OCR itself uses one worker per CPU core (1 core per 4 GB of run memory).",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Usually not needed. Use it for sites that block foreign visitors: many Israeli government sites (gov.il, knesset.gov.il) only answer Israeli IPs, so choose Residential proxy with country Israel (IL). Proxy traffic is billed per megabyte.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}