AnnotateTextResponse

The text annotations response message.

Entity RecognitionGoogle CloudMachine LearningNatural Language ProcessingSentiment AnalysisText Analysis

Properties

Name Type Description
categories array Categories identified in the input document.
sentences array Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.
languageSupported boolean Whether the language is officially supported by all requested features. The API may still return a response when the language is not supported, but it is on a best effort basis.
moderationCategories array Harmful and sensitive categories identified in the input document.
languageCode string The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language_code field for more details.
documentSentiment object The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.
entities array Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities .
View JSON Schema on GitHub

JSON Schema

google-cloud-natural-language-annotate-text-response-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-response-schema.json",
  "title": "AnnotateTextResponse",
  "description": "The text annotations response message.",
  "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/AnnotateTextResponse",
  "properties": {
    "categories": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ClassificationCategory"
      },
      "description": "Categories identified in the input document."
    },
    "sentences": {
      "description": "Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.",
      "items": {
        "$ref": "#/$defs/Sentence"
      },
      "type": "array"
    },
    "languageSupported": {
      "type": "boolean",
      "description": "Whether the language is officially supported by all requested features. The API may still return a response when the language is not supported, but it is on a best effort basis."
    },
    "moderationCategories": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ClassificationCategory"
      },
      "description": "Harmful and sensitive categories identified in the input document."
    },
    "languageCode": {
      "type": "string",
      "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language_code field for more details."
    },
    "documentSentiment": {
      "$ref": "#/$defs/Sentiment",
      "description": "The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment."
    },
    "entities": {
      "description": "Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities .",
      "items": {
        "$ref": "#/$defs/Entity"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "ClassificationCategory": {
      "type": "object",
      "description": "Represents a category returned from the text classifier.",
      "properties": {
        "confidence": {
          "description": "The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text.",
          "format": "float",
          "type": "number"
        },
        "name": {
          "description": "The name of the category representing the document.",
          "type": "string"
        },
        "severity": {
          "type": "number",
          "description": "Optional. The classifier's severity of the category. This is only present when the ModerateTextRequest.ModelVersion is set to MODEL_VERSION_2, and the corresponding category has a severity score.",
          "format": "float"
        }
      }
    },
    "Entity": {
      "description": "Represents a phrase in the text that is a known entity, such as a person, an organization, or location. The API associates information, such as probability and mentions, with entities.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The entity type.",
          "enum": [
            "UNKNOWN",
            "PERSON",
            "LOCATION",
            "ORGANIZATION",
            "EVENT",
            "WORK_OF_ART",
            "CONSUMER_GOOD",
            "OTHER",
            "PHONE_NUMBER",
            "ADDRESS",
            "DATE",
            "NUMBER",
            "PRICE"
          ]
        },
        "mentions": {
          "description": "The mentions of this entity in the input document. The API currently supports proper noun mentions.",
          "items": {
            "$ref": "#/$defs/EntityMention"
          },
          "type": "array"
        },
        "name": {
          "description": "The representative name for the entity.",
          "type": "string"
        },
        "sentiment": {
          "$ref": "#/$defs/Sentiment",
          "description": "For calls to AnalyzeEntitySentiment this field will contain the aggregate sentiment expressed for this entity in the provided document."
        },
        "metadata": {
          "description": "Metadata associated with the entity. For the metadata associated with other entity types, see the Type table below.",
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "EntityMention": {
      "properties": {
        "text": {
          "$ref": "#/$defs/TextSpan",
          "description": "The mention text."
        },
        "sentiment": {
          "$ref": "#/$defs/Sentiment",
          "description": "For calls to AnalyzeEntitySentiment this field will contain the sentiment expressed for this mention of the entity in the provided document."
        },
        "type": {
          "type": "string",
          "description": "The type of the entity mention.",
          "enum": [
            "TYPE_UNKNOWN",
            "PROPER",
            "COMMON"
          ]
        },
        "probability": {
          "format": "float",
          "description": "Probability score associated with the entity. The score shows the probability of the entity mention being the entity type. The score is in (0, 1] range.",
          "type": "number"
        }
      },
      "type": "object",
      "description": "Represents a mention for an entity in the text. Currently, proper noun mentions are supported."
    },
    "Sentence": {
      "description": "Represents a sentence in the input document.",
      "type": "object",
      "properties": {
        "sentiment": {
          "$ref": "#/$defs/Sentiment",
          "description": "For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence."
        },
        "text": {
          "$ref": "#/$defs/TextSpan",
          "description": "The sentence text."
        }
      }
    },
    "Sentiment": {
      "properties": {
        "magnitude": {
          "format": "float",
          "type": "number",
          "description": "A non-negative number in the [0, +inf] range, which represents the absolute magnitude of sentiment regardless of score (positive or negative)."
        },
        "score": {
          "format": "float",
          "type": "number",
          "description": "Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment)."
        }
      },
      "description": "Represents the feeling associated with the entire text or entities in the text.",
      "type": "object"
    },
    "TextSpan": {
      "type": "object",
      "properties": {
        "content": {
          "description": "The content of the text span, which is a substring of the document.",
          "type": "string"
        },
        "beginOffset": {
          "type": "integer",
          "description": "The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.",
          "format": "int32"
        }
      },
      "description": "Represents a text span in the input document."
    }
  }
}

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-response"
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.