{
  "openapi": "3.0.1",
  "info": {
    "title": "Image to Text OCR: Searchable PDFs, Scans & Screenshots",
    "description": "Extract text from images, screenshots and scanned PDFs with OCR, and turn scans into searchable PDFs. From URLs or a scraper's dataset; every page turned upright and read in 51 languages, with confidence and line positions. No API key. $1.50 per 1,000 pages; blanks free.",
    "version": "0.1",
    "x-build-id": "HU4G8BCEfRzyX3UeU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pikoulas~image-ocr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pikoulas-image-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/pikoulas~image-ocr/runs": {
      "post": {
        "operationId": "runs-sync-pikoulas-image-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/pikoulas~image-ocr/run-sync": {
      "post": {
        "operationId": "run-sync-pikoulas-image-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Image or PDF URLs",
            "type": "array",
            "description": "The addresses of images, or leave it empty and give a dataset below: (JPEG, PNG, WebP, TIFF, BMP, GIF or AVIF) or scanned PDFs, up to 50 MB each. Each page of a PDF is read; of an animated GIF or a TIFF with several pages, only the first.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Images from a dataset",
            "type": "string",
            "description": "A dataset from your account, such as a social media, product or listing scraper's results: the image addresses of its items are read, from the field below or, without one, from each field named like an image (image, images, photo, thumbnail, logo, icon...)."
          },
          "imageField": {
            "title": "Image field",
            "type": "string",
            "description": "The dataset field the image addresses are in, a dotted path for one inside another: imageUrl, images, post.media. It can hold one address, a list, or objects with a url."
          },
          "maxImages": {
            "title": "Max files",
            "minimum": 1,
            "type": "integer",
            "description": "Read at most this many images or PDFs, from the list and the dataset together. Empty for all."
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "The languages in the images. English alone if left empty. Each one more takes longer, so pick only those you need.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "deu",
                "fra",
                "spa",
                "ita",
                "por",
                "nld",
                "swe",
                "pol",
                "rus",
                "ukr",
                "tur",
                "ara",
                "hin",
                "chi_sim",
                "chi_tra",
                "jpn",
                "kor",
                "ces",
                "dan",
                "fin",
                "nor",
                "hun",
                "ron",
                "ell",
                "heb",
                "vie",
                "tha",
                "ind",
                "ben",
                "tam",
                "urd",
                "fas",
                "bul",
                "hrv",
                "slk",
                "srp",
                "lit",
                "lav",
                "est",
                "slv",
                "cat",
                "msa",
                "tel",
                "mar",
                "guj",
                "kan",
                "mal",
                "fil",
                "swa",
                "afr"
              ],
              "enumTitles": [
                "English",
                "German",
                "French",
                "Spanish",
                "Italian",
                "Portuguese",
                "Dutch",
                "Swedish",
                "Polish",
                "Russian",
                "Ukrainian",
                "Turkish",
                "Arabic",
                "Hindi",
                "Chinese (Simplified)",
                "Chinese (Traditional)",
                "Japanese",
                "Korean",
                "Czech",
                "Danish",
                "Finnish",
                "Norwegian",
                "Hungarian",
                "Romanian",
                "Greek",
                "Hebrew",
                "Vietnamese",
                "Thai",
                "Indonesian",
                "Bengali",
                "Tamil",
                "Urdu",
                "Persian",
                "Bulgarian",
                "Croatian",
                "Slovak",
                "Serbian",
                "Lithuanian",
                "Latvian",
                "Estonian",
                "Slovenian",
                "Catalan",
                "Malay",
                "Telugu",
                "Marathi",
                "Gujarati",
                "Kannada",
                "Malayalam",
                "Filipino",
                "Swahili",
                "Afrikaans"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "autoRotate": {
            "title": "Turn pages upright",
            "type": "boolean",
            "description": "Turns an image or page scanned or photographed on its side, or upside down, before reading it. Off reads it as it is, a little faster.",
            "default": true
          },
          "searchablePdf": {
            "title": "Searchable PDF",
            "type": "boolean",
            "description": "Also makes each image or scanned PDF a searchable PDF: the page as it was scanned, with the text found laid under it, invisible, so it can be searched, selected and copied. Linked from each row as searchablePdfUrl, at no extra cost.",
            "default": false
          },
          "maxPagesPerPdf": {
            "title": "Max pages per PDF",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Pages read from the start of each PDF, each charged as an image.",
            "default": 100
          },
          "includeLines": {
            "title": "Line by line",
            "type": "boolean",
            "description": "Adds each line's text, confidence and position in the image, under lines.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}