{
  "openapi": "3.0.1",
  "info": {
    "title": "Image OCR: Text from Images and Scanned PDFs",
    "description": "Read text from images (PNG, JPEG, WebP, TIFF) and PDFs: one row per image or page with text, lines, confidence and positions. 11 script families, with Arabic in right-to-left order. PDF pages that already have text cost $1 per 1,000. No login or API key.",
    "version": "0.1",
    "x-build-id": "CZHzVGdmTt7NeZK8u"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cyrus_1~image-ocr-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cyrus_1-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/cyrus_1~image-ocr-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-cyrus_1-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/cyrus_1~image-ocr-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-cyrus_1-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": {
          "urls": {
            "title": "Image or PDF URLs",
            "type": "array",
            "description": "Public http or https links to PNG, JPEG, WebP or TIFF images, to PDFs (each page is read), or to ZIP archives of them. Google Drive and Dropbox share links work. Links are one way to give files; the other ways are below. If you give no file at all, a public IRS form is read as an example.",
            "items": {
              "type": "string"
            }
          },
          "base64Files": {
            "title": "Files as base64",
            "type": "array",
            "description": "Files sent as base64 text, for callers that have the bytes but no link (n8n, Make, your own code). Each entry is the base64 string or a data: URI, or an object like {\"name\": \"invoice.pdf\", \"data\": \"<base64>\"}. The data is never copied into the output. A ZIP sent this way is expanded."
          },
          "keyValueStoreId": {
            "title": "Key-value store",
            "type": "string",
            "description": "The key-value store that holds your files (pick one of yours). Leave empty to read from this run's own default store. Used with Record keys below."
          },
          "keyValueStoreKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Keys of the records to read from the key-value store. Each record must be a file stored with its own content type, for example application/pdf, not JSON or text. A ZIP record is expanded. Keys may contain letters, digits and !-_.'() only.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset with links",
            "type": "string",
            "description": "A dataset of yours whose items hold a link to a file, for example the output of another actor. Pick it here, then name the field below."
          },
          "datasetField": {
            "title": "Dataset field",
            "type": "string",
            "description": "The field of each dataset item that holds the link, for example pdfUrl or media.url (a dot goes one level deeper). The value can be one link, a list of links, or an object with a url. Required with Dataset with links."
          },
          "datasetLimit": {
            "title": "Max dataset items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Read at most this many items from the dataset.",
            "default": 1000
          },
          "urlListUrls": {
            "title": "Links to a CSV or TXT list of links",
            "type": "array",
            "description": "Links to text files that list links to read: a TXT file with one link per line, or a CSV file. For a CSV the column is found by its header (url, link, pdf, file, ...) or by the first column that holds links, or you name it below. Up to 5,000 links per list.",
            "items": {
              "type": "string"
            }
          },
          "urlListColumn": {
            "title": "CSV column name",
            "type": "string",
            "description": "The header of the CSV column that holds the links, when it is not named url, link or similar. Leave empty to find it automatically."
          },
          "followPdfLinks": {
            "title": "Follow PDF links on web pages",
            "type": "boolean",
            "description": "When a link returns a web page, read the page for links to PDF files (links ending in .pdf, citation_pdf_url and alternate PDF links) and read those PDFs, one level deep. Without this a web page gives a free error row.",
            "default": false
          },
          "maxLinksPerPage": {
            "title": "Max PDF links per web page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "No more than this many PDF links are followed from one web page.",
            "default": 20
          },
          "maxFilesPerZip": {
            "title": "Max files per ZIP",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "No more than this many readable files are taken from one ZIP archive. Other entries are left out.",
            "default": 200
          },
          "maxZipUncompressedMb": {
            "title": "Max ZIP size when unpacked (MB)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "A ZIP whose files add up to more than this when unpacked is stopped (protection against zip bombs). Files are unpacked in memory, one at a time, never written to disk.",
            "default": 500
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "ch",
              "japan",
              "korean",
              "arabic",
              "cyrillic",
              "devanagari",
              "th",
              "el",
              "ta",
              "te"
            ],
            "type": "string",
            "description": "Which recogniser to use. English also reads French, German, Spanish and other Latin-script languages. The others read their own script and usually English words too.",
            "default": "en"
          },
          "quality": {
            "title": "Quality",
            "enum": [
              "fast",
              "accurate"
            ],
            "type": "string",
            "description": "fast uses a smaller model (cheapest to run, good on clean text). accurate uses the larger model, about 4 times slower, and is charged extra (accurate-page events). Only changes English, Chinese and Japanese.",
            "default": "fast"
          },
          "usePdfTextLayer": {
            "title": "Use the PDF text layer when a page has one",
            "type": "boolean",
            "description": "For PDFs, a page that already contains its own text (at least 40 letters or digits) is read from that text and not OCRed. It costs $0.001 (text-layer-page) instead of $0.004 and has no boxes or confidence. Turn off to OCR every page, for example when a scan carries a poor hidden text layer. Pages with no text layer are always OCRed.",
            "default": true
          },
          "pages": {
            "title": "PDF pages",
            "type": "string",
            "description": "Which PDF pages to read, for example 1-3,5 or 4-. Empty means all pages (up to the max below). Applies to PDFs only."
          },
          "minConfidence": {
            "title": "Minimum confidence",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Lines the engine is less sure of than this (0 to 1) are dropped.",
            "default": 0.5
          },
          "includeWordBoxes": {
            "title": "Include word boxes",
            "type": "boolean",
            "description": "Add the position and confidence of each word inside every line. Slower and larger rows.",
            "default": false
          },
          "includeLines": {
            "title": "Include lines",
            "type": "boolean",
            "description": "Add every line with its text, confidence and position. Turn off to get only the joined text.",
            "default": true
          },
          "maxPagesPerPdf": {
            "title": "Max pages per PDF or TIFF",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "No more than this many pages are read from one file.",
            "default": 500
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Larger files are skipped with an error row and are not charged.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}