{
  "openapi": "3.0.1",
  "info": {
    "title": "Image to Text OCR - Images, Carousels & Scanned PDFs",
    "description": "Image to text OCR for images, screenshots, scanned PDFs and every slide of Instagram carousels and TikTok slideshows from your scraper dataset. One clean row per input: full text, per-page text, lines, confidence. $2 per 1,000 images with text; no-text images and failures free.",
    "version": "1.0",
    "x-build-id": "79cLm5XdR7Dh0k7bd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kantolabs~image-to-text-ocr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kantolabs-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/kantolabs~image-to-text-ocr/runs": {
      "post": {
        "operationId": "runs-sync-kantolabs-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/kantolabs~image-to-text-ocr/run-sync": {
      "post": {
        "operationId": "run-sync-kantolabs-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": "Direct links to image files (JPG, PNG, WEBP, GIF, BMP, TIFF, HEIC, AVIF) or PDFs, one per line. Each link = one output row. Scanned PDFs are read page by page; digital PDFs use their own text layer. Leave empty when you use a scraper dataset below. Use file links, not web pages (right-click an image -> Copy image address).",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Scraper dataset (optional)",
            "type": "string",
            "description": "Pick the dataset of a TikTok, Instagram, Facebook Ads / Meta Ad Library scraper (or any dataset with image links). Every slide of each Instagram carousel, every photo of each TikTok slideshow and every ad image is read; one row per post, in order, with the post id, link, author and caption in flat upstream* columns. Video posts are free rows. In n8n / Make / an integration pass {{resource.defaultDatasetId}}."
          },
          "datasetItems": {
            "title": "Dataset rows (optional)",
            "type": "array",
            "description": "Or paste scraper rows as JSON, e.g. [{\"imageUrl\": \"https://...\"}] or rows exported from a TikTok / Instagram scraper. Same handling as \"Scraper dataset\"."
          },
          "maxItems": {
            "title": "Max inputs",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many inputs that have images (links + dataset rows). Rows without an image do not count and are free.",
            "default": 1000
          },
          "maxImagesPerPost": {
            "title": "Max images per post",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For carousels, slideshows and multi-image rows: read at most this many images per post (Instagram carousels hold up to 20).",
            "default": 20
          },
          "includeVideoCovers": {
            "title": "Also read video cover images",
            "type": "boolean",
            "description": "For video posts in a scraper dataset (TikTok videos, Instagram reels, video ads, YouTube): read the text on the cover / thumbnail picture. Off = video posts are free skipped rows (use Video OCR for the text inside the video).",
            "default": false
          },
          "language": {
            "title": "Text language / script",
            "enum": [
              "en",
              "japanese",
              "latin",
              "cyrillic",
              "korean",
              "arabic",
              "devanagari",
              "greek",
              "thai"
            ],
            "type": "string",
            "description": "\"English + Chinese\" also reads digits and most Western European text. Pick Japanese for kana, or another script for Spanish/French/German/Portuguese accents (Latin), Russian/Ukrainian (Cyrillic), Korean, Arabic, Hindi (Devanagari), Greek or Thai.",
            "default": "en"
          },
          "minConfidence": {
            "title": "Minimum confidence (0.1-0.99)",
            "minimum": 0.1,
            "maximum": 0.99,
            "type": "number",
            "description": "Text lines read with lower confidence are dropped. 0.5 removes most noise; lower it (0.3) for poor photos, raise it (0.8) for only clean text.",
            "default": 0.5
          },
          "includeLines": {
            "title": "Include text lines with boxes",
            "type": "boolean",
            "description": "Add every text line with its confidence and pixel box [x0, y0, x1, y1] to each page in \"pages\". Turn off for text only (smaller rows).",
            "default": true
          },
          "pdfMode": {
            "title": "PDF mode",
            "enum": [
              "auto",
              "ocr"
            ],
            "type": "string",
            "description": "\"auto\" uses a PDF page's own text layer when it has one (exact, fast) and runs OCR only on scanned pages. \"ocr\" always runs OCR on every page. Both are billed as one image per page with text.",
            "default": "auto"
          },
          "maxPdfPages": {
            "title": "Max pages per PDF / TIFF",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Only the first N pages of each PDF or multi-page TIFF are read.",
            "default": 50
          },
          "pdfDpi": {
            "title": "PDF render resolution (DPI)",
            "minimum": 72,
            "maximum": 400,
            "type": "integer",
            "description": "Resolution for scanned PDF pages before OCR. 200 suits normal documents; 300 for small print.",
            "default": 200
          },
          "onlyNew": {
            "title": "Only new inputs (watch mode)",
            "type": "boolean",
            "description": "For scheduled runs: inputs already read by an earlier run with the same watchlist are left out (free). The memory is a named key-value store in your own Apify account (kanto-image-ocr-watch-<name>).",
            "default": false
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Name of the watch-mode memory. Use one name per schedule (e.g. competitor-carousels).",
            "default": "default"
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Larger files are skipped (free).",
            "default": 30
          },
          "requestTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Give up on a file that does not download within this time (free).",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}