{
  "openapi": "3.0.1",
  "info": {
    "title": "Image to Text OCR",
    "description": "Read the text in images from their web addresses with the Tesseract OCR engine. For each image you get the text, a confidence score, line and word counts and, if you want, every word with its position. 35 languages. Receipts, screenshots, scans and labels.",
    "version": "1.0",
    "x-build-id": "BfxAV9rlz2L8eidMj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cyber1nj3ct0r~image-to-text-ocr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cyber1nj3ct0r-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/cyber1nj3ct0r~image-to-text-ocr/runs": {
      "post": {
        "operationId": "runs-sync-cyber1nj3ct0r-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/cyber1nj3ct0r~image-to-text-ocr/run-sync": {
      "post": {
        "operationId": "run-sync-cyber1nj3ct0r-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",
        "required": [
          "imageUrls"
        ],
        "properties": {
          "imageUrls": {
            "title": "Image addresses",
            "minItems": 1,
            "type": "array",
            "description": "The addresses of the images to read, for example <code>https://www.example.com/receipt.jpg</code>. Add them one by one, paste many at once with <b>Bulk edit</b>, or link a text file (or a Google Sheet published as CSV) that holds them. PNG, JPEG, GIF, BMP, TIFF, WebP and PBM/PGM/PPM images work. Only these addresses are downloaded. Duplicates are read once.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "languages": {
            "title": "Languages",
            "minItems": 1,
            "maxItems": 5,
            "uniqueItems": true,
            "type": "array",
            "description": "The language or languages of the text in your images. English is built in; every other language is downloaded at the start of the run, which takes a few seconds each. Pick only the languages that really occur: each extra one slows the reading down and can change the result. Up to 5.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "spa",
                "fra",
                "deu",
                "ita",
                "por",
                "nld",
                "swe",
                "dan",
                "nor",
                "fin",
                "pol",
                "ces",
                "slk",
                "hun",
                "ron",
                "bul",
                "hrv",
                "srp",
                "ukr",
                "rus",
                "ell",
                "tur",
                "heb",
                "ara",
                "fas",
                "hin",
                "ben",
                "tha",
                "vie",
                "ind",
                "chi_sim",
                "chi_tra",
                "jpn",
                "kor"
              ],
              "enumTitles": [
                "English",
                "Spanish",
                "French",
                "German",
                "Italian",
                "Portuguese",
                "Dutch",
                "Swedish",
                "Danish",
                "Norwegian",
                "Finnish",
                "Polish",
                "Czech",
                "Slovak",
                "Hungarian",
                "Romanian",
                "Bulgarian",
                "Croatian",
                "Serbian",
                "Ukrainian",
                "Russian",
                "Greek",
                "Turkish",
                "Hebrew",
                "Arabic",
                "Persian",
                "Hindi",
                "Bengali",
                "Thai",
                "Vietnamese",
                "Indonesian",
                "Chinese (Simplified)",
                "Chinese (Traditional)",
                "Japanese",
                "Korean"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "pageLayout": {
            "title": "Page layout",
            "enum": [
              "AUTO",
              "SINGLE_BLOCK",
              "SINGLE_LINE",
              "SPARSE_TEXT"
            ],
            "type": "string",
            "description": "How the text is laid out in your images. <b>Automatic</b> suits pages with paragraphs and columns, and screenshots. <b>One block</b> suits a single paragraph, a label or a sign. <b>One line</b> suits a cropped line such as a number plate or a caption. <b>Scattered text</b> finds as much loose text as possible, for example on photos, product packaging or diagrams.",
            "default": "AUTO"
          },
          "includeWords": {
            "title": "Include words with confidence and position",
            "type": "boolean",
            "description": "Add a list of every word to each result: the word, how sure the reader is about it (0 to 100) and its box in the image in pixels. Useful for highlighting text, filtering doubtful words or building searchable documents. Makes the results larger.",
            "default": false
          },
          "maxImages": {
            "title": "Maximum number of images",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Read at most this many images, in the order of your list; the rest are skipped and not charged. Use it to cap the cost of a run.",
            "default": 1000
          },
          "maxImageSizeMb": {
            "title": "Maximum image file size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Images whose file is larger than this are not read; their result holds the error <code>FILE_TOO_LARGE</code>. Pictures with more than 50 megapixels are never read, whatever the file size.",
            "default": 20
          },
          "requestTimeoutSecs": {
            "title": "Time limit per download",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for one image to download before giving up on it.",
            "default": 30
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "The name the tool sends with each download. Leave empty to use the tool's own name, which tells site owners what is visiting. Set your own only for sites you run or have permission to use."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}