Google Cloud Vision

App · 5 actions

Extract text, labels and other annotations from images and documents.

Actions

ActionWhat it does
Annotate an imageRead text or detect objects and other features.
Annotate document pagesExtract document text from up to five pages of a Cloud Storage file.
Annotate image URLsApply the same detection features to a batch of image URLs.
Get extraction statusRead progress for an asynchronous Vision job.
Start document text extractionStart extracting text and write the output to Cloud Storage.

Annotate an image

Read text or detect objects and other features.

Inputs

Image URLimage_urltextRequired
An HTTPS image URL or a Cloud Storage URI.
FeaturesfeatureslistRequired
Choose the types of annotations to return.One or more of: FACE_DETECTION (Face detection), LANDMARK_DETECTION (Landmark detection), LOGO_DETECTION (Logo detection), LABEL_DETECTION (Label detection), TEXT_DETECTION (Text detection), DOCUMENT_TEXT_DETECTION (Document text detection), SAFE_SEARCH_DETECTION (Safe search detection), IMAGE_PROPERTIES (Image properties), CROP_HINTS (Crop hints), WEB_DETECTION (Web detection), OBJECT_LOCALIZATION (Object localization).
Language hintslanguage_hintslist
Language codes to help text recognition.
Max resultsmax_resultsnumber
Maximum results per supported annotation type.At least 1.

Outputs

dataobject
The response from Google Cloud Vision.
Example output
{
  "data": {
    "responses": [
      {
        "cropHintsAnnotation": {},
        "error": {},
        "faceAnnotations": [
          {}
        ],
        "fullTextAnnotation": {},
        "imagePropertiesAnnotation": {},
        "labelAnnotations": [
          {}
        ],
        "landmarkAnnotations": [
          {}
        ],
        "localizedObjectAnnotations": [
          {}
        ],
        "logoAnnotations": [
          {}
        ],
        "safeSearchAnnotation": {},
        "textAnnotations": [
          {}
        ],
        "webDetection": {}
      }
    ]
  }
}

Annotate document pages

Extract document text from up to five pages of a Cloud Storage file.

Inputs

SourcesourcetextRequired
The gs:// URI of a file in Cloud Storage.
Mime typemime_typetextRequired
The file format.One of: application/pdf, image/tiff, image/gif.
Pagespageslist
Page numbers to read. Leave empty to read the first five pages.

Outputs

dataobject
The response from Google Cloud Vision.
Example output
{
  "data": {
    "responses": [
      {
        "responses": [
          {
            "cropHintsAnnotation": {},
            "error": {},
            "faceAnnotations": [
              {}
            ],
            "fullTextAnnotation": {},
            "imagePropertiesAnnotation": {},
            "labelAnnotations": [
              {}
            ],
            "landmarkAnnotations": [
              {}
            ],
            "localizedObjectAnnotations": [
              {}
            ],
            "logoAnnotations": [
              {}
            ],
            "safeSearchAnnotation": {},
            "textAnnotations": [
              {}
            ],
            "webDetection": {}
          }
        ],
        "totalPages": 1
      }
    ]
  }
}

Annotate image URLs

Apply the same detection features to a batch of image URLs.

Inputs

Image URLsimage_urlslistRequired
Up to 16 HTTPS image URLs or Cloud Storage URIs.
FeaturesfeatureslistRequired
Choose the types of annotations to return.One or more of: FACE_DETECTION (Face detection), LANDMARK_DETECTION (Landmark detection), LOGO_DETECTION (Logo detection), LABEL_DETECTION (Label detection), TEXT_DETECTION (Text detection), DOCUMENT_TEXT_DETECTION (Document text detection), SAFE_SEARCH_DETECTION (Safe search detection), IMAGE_PROPERTIES (Image properties), CROP_HINTS (Crop hints), WEB_DETECTION (Web detection), OBJECT_LOCALIZATION (Object localization).
Language hintslanguage_hintslist
Language codes to help text recognition.
Max resultsmax_resultsnumber
Maximum results per supported annotation type.At least 1.

Outputs

dataobject
The response from Google Cloud Vision.
Example output
{
  "data": {
    "responses": [
      {
        "cropHintsAnnotation": {},
        "error": {},
        "faceAnnotations": [
          {}
        ],
        "fullTextAnnotation": {},
        "imagePropertiesAnnotation": {},
        "labelAnnotations": [
          {}
        ],
        "landmarkAnnotations": [
          {}
        ],
        "localizedObjectAnnotations": [
          {}
        ],
        "logoAnnotations": [
          {}
        ],
        "safeSearchAnnotation": {},
        "textAnnotations": [
          {}
        ],
        "webDetection": {}
      }
    ]
  }
}

Get extraction status

Read progress for an asynchronous Vision job.

Inputs

Operation IDoperation_idtextRequired
The full operation name from the extraction step or its ID.

Outputs

dataobject
The response from Google Cloud Vision.
Example output
{
  "data": {
    "done": true,
    "error": {},
    "metadata": {},
    "name": "example",
    "response": {}
  }
}

Start document text extraction

Start extracting text and write the output to Cloud Storage.

Inputs

SourcesourcetextRequired
The gs:// URI of the input file.
Mime typemime_typetextRequired
The file format.One of: application/pdf, image/tiff.
DestinationdestinationtextRequired
The gs:// folder for the output JSON files.

Outputs

dataobject
The response from Google Cloud Vision.
Example output
{
  "data": {
    "done": true,
    "error": {},
    "metadata": {},
    "name": "example",
    "response": {}
  }
}

On this page