AnnotateTextRequest

The request message for the text annotation API, which can perform multiple analysis types in one call.

Entity RecognitionGoogle CloudMachine LearningNatural Language ProcessingSentiment AnalysisText Analysis

Properties

Name Type Description
features object Required. The enabled features.
document object Required. Input document.
encodingType string The encoding type used by the API to calculate offsets.
View JSON Schema on GitHub

JSON Schema

google-cloud-natural-language-annotate-text-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-natural-language/json-schema/google-cloud-natural-language-annotate-text-request-schema.json",
  "title": "AnnotateTextRequest",
  "description": "The request message for the text annotation API, which can perform multiple analysis types in one call.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-natural-language-documents-api-openapi.yml#/components/schemas/AnnotateTextRequest",
  "type": "object",
  "properties": {
    "features": {
      "$ref": "#/$defs/AnnotateTextRequestFeatures",
      "description": "Required. The enabled features."
    },
    "document": {
      "$ref": "#/$defs/Document",
      "description": "Required. Input document."
    },
    "encodingType": {
      "enum": [
        "NONE",
        "UTF8",
        "UTF16",
        "UTF32"
      ],
      "description": "The encoding type used by the API to calculate offsets.",
      "type": "string"
    }
  },
  "$defs": {
    "AnnotateTextRequestFeatures": {
      "type": "object",
      "properties": {
        "extractEntities": {
          "description": "Optional. Extract entities.",
          "type": "boolean"
        },
        "classifyText": {
          "description": "Optional. Classify the full document into categories.",
          "type": "boolean"
        },
        "extractDocumentSentiment": {
          "description": "Optional. Extract document-level sentiment.",
          "type": "boolean"
        },
        "moderateText": {
          "description": "Optional. Moderate the document for harmful and sensitive categories.",
          "type": "boolean"
        }
      },
      "description": "All available features. Setting each one to true will enable that specific analysis for the input."
    },
    "Document": {
      "properties": {
        "type": {
          "enum": [
            "TYPE_UNSPECIFIED",
            "PLAIN_TEXT",
            "HTML"
          ],
          "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.",
          "type": "string"
        },
        "gcsContentUri": {
          "description": "The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.",
          "type": "string"
        },
        "languageCode": {
          "type": "string",
          "description": "Optional. The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. [Language Support](https://cloud.google.com/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned."
        },
        "content": {
          "type": "string",
          "description": "The content of the input in string format. Cloud audit logging exempt since it is based on user data."
        }
      },
      "description": "Represents the input to API methods.",
      "type": "object"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/google-cloud-natural-language-annotate-text-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.