Baidu OCR icon

Baidu OCR

使用百度智能云 OCR API 识别图片和文档中的文字

通用文字识别(标准版)

AI-generated

Summary

Identify text in binary images or URLs using Baidu OCR's standard OCR API.

Inputs

  • inputType — Type of input to provide: either binary image data or a URL.
  • binaryPropertyName — Comma‑separated list of binary property names to look for in the input item; defaults to 'data,data0,data1,data2,data3'.
  • pdfPageRange — Page range of a PDF to process (e.g., 'all', '1', '1-5', '1,3,5'); ignored for URL input.
  • imageUrl — Direct URL of an image to be recognized when inputType is 'url'.

Output shape

an array of processed items, each containing a json field with OCR results

If binary data is used, the JSON includes combined text, file count, and per‑property results; if a URL is used, only the processed response is returned; the operation can continue on failure and may return an empty array when no valid binary properties are found.

Examples

Example 1: Extract text from a binary image passed from a previous node.

Set inputType to 'binaryData' (default), keep binaryPropertyName as default, leave pdfPageRange as default, and ensure operation is '通用文字识别(标准版)'.

Example 2: Recognize text from an image URL.

Set inputType to 'url' and provide the image URL in imageUrl; operation remains default.

Example 3: Process specific pages of a PDF.

Use binaryData input, specify a binaryPropertyName pointing to the PDF attribute, set pdfPageRange to desired page range (e.g., '1-5'), and keep operation as default.

Links

Discussion