{
  "openapi": "3.0.1",
  "info": {
    "title": "Image to Text OCR — Images & Scanned PDFs, 40+ Languages",
    "description": "Extract text from images, screenshots, photos of documents and scanned PDFs with OCR in 40+ languages. Plain text, Markdown, confidence, lines and words with boxes. PDF text layers read for less.",
    "version": "0.0",
    "x-build-id": "B0axnd8SaazDQaj0R"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/saliga~image-to-text-ocr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-saliga-image-to-text-ocr",
        "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/saliga~image-to-text-ocr/runs": {
      "post": {
        "operationId": "runs-sync-saliga-image-to-text-ocr",
        "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/saliga~image-to-text-ocr/run-sync": {
      "post": {
        "operationId": "run-sync-saliga-image-to-text-ocr",
        "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": {
          "imageUrls": {
            "title": "Image or PDF URLs",
            "type": "array",
            "description": "Links to images (PNG, JPEG, TIFF, WebP, GIF, BMP) or PDFs. One result per image, per frame of a multi-page TIFF, and per PDF page.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages",
            "type": "string",
            "description": "Language(s) of the text. Combine with + or commas, for example eng+tur or \"en, de\". Codes: eng, deu, fra, spa, ita, por, nld, tur, pol, swe, rus, ukr, ara, chi_sim, chi_tra, jpn, kor, hin, vie, ind, ces, ron, hun, dan, nor, fin, ell, heb, tha, bul, hrv, slk, slv, lit, lav, est, msa, ben, tam, fas, urd, srp, cat. Two-letter codes and English names also work.",
            "default": "eng"
          },
          "outputDetail": {
            "title": "Layout detail",
            "enum": [
              "text",
              "lines",
              "words"
            ],
            "type": "string",
            "description": "Text: text and Markdown only. Lines: also every line with its confidence and box. Words: also every word with its confidence and box (x, y, w, h in pixels of the original image; for PDF pages, of the page rendered at the PDF DPI).",
            "default": "text"
          },
          "layout": {
            "title": "Page layout",
            "enum": [
              "auto",
              "sparse_text",
              "single_block",
              "single_line"
            ],
            "type": "string",
            "description": "How the text is arranged. Auto suits documents and screenshots. Sparse text finds scattered text (labels, signs, receipts). Single block for one column of text, single line for a one-line crop.",
            "default": "auto"
          },
          "minConfidence": {
            "title": "Minimum word confidence (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop recognised words below this confidence from the text. 0 keeps everything. Every page still reports its average confidence and a lowConfidence flag (under 60).",
            "default": 0
          },
          "preprocess": {
            "title": "Image clean-up",
            "enum": [
              "auto",
              "none"
            ],
            "type": "string",
            "description": "Auto: grayscale, enlarge small images and stretch contrast before OCR (better on screenshots and thumbnails). None: use the image as it is.",
            "default": "auto"
          },
          "pdfMode": {
            "title": "PDF pages",
            "enum": [
              "auto",
              "ocr",
              "text"
            ],
            "type": "string",
            "description": "Auto: read a page from its text layer when it has one (exact and cheaper), otherwise with OCR. OCR: OCR every page. Text: text layer only, no OCR.",
            "default": "auto"
          },
          "pdfDpi": {
            "title": "PDF render resolution (DPI)",
            "minimum": 72,
            "maximum": 600,
            "type": "integer",
            "description": "Resolution used to render scanned PDF pages for OCR. 300 is right for most scans; lower is faster.",
            "default": 300
          },
          "maxPagesPerFile": {
            "title": "Max pages per file",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many pages or frames of each file (0 = all). Caps the cost of long PDFs.",
            "default": 0
          },
          "datasetId": {
            "title": "Dataset ID",
            "type": "string",
            "description": "ID of an Apify dataset, for example the output of a scraper run."
          },
          "urlField": {
            "title": "Link field",
            "type": "string",
            "description": "Field with the image or PDF link in each dataset item. Use dots for nested fields (image.url). A list of links is read too.",
            "default": "url"
          },
          "maxDatasetItems": {
            "title": "Max dataset items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Read at most this many items from the dataset.",
            "default": 1000
          },
          "requestHeaders": {
            "title": "Request headers",
            "type": "object",
            "description": "Extra HTTP headers for downloading, for example {\"Authorization\": \"Bearer …\"} for files behind a token. Sent only to the host of each URL, never to a redirect on another host. They are stored with the run input, so prefer short-lived tokens or pre-signed URLs."
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Files larger than this are skipped with an error (free).",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Files at a time",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many files are downloaded and read in parallel. Raise it together with memory for big batches.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}