{
  "openapi": "3.0.1",
  "info": {
    "title": "Image to Text OCR API: Extract Text from Images in Bulk",
    "description": "Read the text in images given by link or found on web pages, with a local OCR engine and no third-party API. Cleaned text, confidence and image size per row, robots.txt obeyed, and you pay only for images where text was found.",
    "version": "1.0",
    "x-build-id": "EMCpO9KvTxqtDdKoc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rowcraft~image-ocr-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rowcraft-image-ocr-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/rowcraft~image-ocr-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-rowcraft-image-ocr-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/rowcraft~image-ocr-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-rowcraft-image-ocr-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": {
          "startUrls": {
            "title": "Image or page URLs",
            "type": "array",
            "description": "One address per line. A link to an image file (PNG, JPEG, GIF, WebP, BMP, TIFF) is read directly. A link to a web page is searched for the images it shows (img, srcset, picture, og:image) and each image is read. Duplicates and invalid entries are skipped and never charged.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages in the images",
            "type": "array",
            "description": "The languages of the text. Pick every language that appears: the engine then reads them together (for example English and German on the same sign). More languages make a run a little slower. Default: English.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "deu",
                "fra",
                "spa",
                "ita",
                "por",
                "nld",
                "pol",
                "ron",
                "swe",
                "ces",
                "tur",
                "rus",
                "ukr",
                "chi_sim",
                "jpn"
              ],
              "enumTitles": [
                "English",
                "German",
                "French",
                "Spanish",
                "Italian",
                "Portuguese",
                "Dutch",
                "Polish",
                "Romanian",
                "Swedish",
                "Czech",
                "Turkish",
                "Russian",
                "Ukrainian",
                "Chinese (simplified)",
                "Japanese"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "maxItems": {
            "title": "Maximum images",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many images with text were delivered in the whole run. Images without text are delivered free and do not count. 0 = no limit.",
            "default": 500
          },
          "minWidth": {
            "title": "Minimum width (px)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Images narrower than this are skipped and not charged: icons, tracking pixels, spacers. Text in very small images is rarely readable. 0 = no limit.",
            "default": 80
          },
          "minHeight": {
            "title": "Minimum height (px)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Images lower than this are skipped and not charged. 0 = no limit.",
            "default": 80
          },
          "maxImagesPerPage": {
            "title": "Maximum images per page",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For a web page address: stop after this many images were read from that page (with or without text). The rest are listed as not read in COVERAGE. Direct image links are not limited by this.",
            "default": 20
          },
          "maxImageMegabytes": {
            "title": "Largest file (MB)",
            "minimum": 0.05,
            "maximum": 30,
            "type": "number",
            "description": "Files bigger than this are skipped and not charged; a file that announces its size is not even downloaded. Images above 40 megapixels are never read. Maximum 30.",
            "default": 15
          },
          "pageSegmentationMode": {
            "title": "Layout of the text",
            "enum": [
              "auto",
              "single_column",
              "single_block",
              "single_line",
              "sparse_text"
            ],
            "type": "string",
            "description": "How the engine expects the text to be laid out. Automatic suits documents, signs and screenshots. Use a single block for one paragraph, a single line for a cropped line, and sparse text for scattered words (labels on a diagram, a map).",
            "default": "auto"
          },
          "minConfidence": {
            "title": "Minimum confidence (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "An image counts as \"text found\" (and is charged) when the engine's mean confidence is at least this value. Photos without text usually score below 30; clear text scores 80 to 95. Lower it for faint or low-quality scans, raise it to be stricter.",
            "default": 40
          },
          "includeLines": {
            "title": "Add the confidence of each line",
            "type": "boolean",
            "description": "Off (default): only the text and the mean confidence. On: the column `lines` lists every line of text with its own confidence as plain text (`92 | OPEN DAILY 9 AM TO 6 PM`), one line per row of the picture.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new rows since the last run",
            "type": "boolean",
            "description": "Remember the rows already delivered to you (in a key-value store in your Apify account) and deliver only rows that appeared since the last run with the same state key. The first run delivers everything that matches; later runs cost only the new rows. Ideal for schedules.",
            "default": false
          },
          "stateName": {
            "title": "State name",
            "type": "string",
            "description": "Name of the memory used by \"Only new rows\". Use a different name for each schedule or search (for example `stockholm-python`) so they do not share one memory.",
            "default": "default"
          },
          "notifyUrl": {
            "title": "Notify this URL when the run ends",
            "type": "string",
            "description": "A webhook address that receives one JSON POST with the number of new rows and links to the dataset: a Slack or Discord incoming webhook, a Make, n8n or Zapier catch hook, or your own endpoint. The message is also in the `text` (Slack) and `content` (Discord) fields."
          },
          "notifyWhenEmpty": {
            "title": "Notify also when there are no new rows",
            "type": "boolean",
            "description": "By default the notification is sent only when at least one row was delivered.",
            "default": false
          },
          "requestIntervalMs": {
            "title": "Delay between requests (ms)",
            "minimum": 250,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause between two requests to the same host (a page and its image server are separate hosts). Default 1000 ms; minimum 250. A longer Crawl-delay in a site's robots.txt is applied instead, up to 10 s.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}