# Cloud Natural Language API

Provides natural language understanding technologies, such as sentiment analysis, entity recognition, entity sentiment analysis, and other text annotations, to developers.

- [REST Resource: v2.documents](https://docs.cloud.google.com/natural-language/docs/reference/rest#v2.documents)
- [REST Resource: v1beta2.documents](https://docs.cloud.google.com/natural-language/docs/reference/rest#v1beta2.documents)
- [REST Resource: v1.documents](https://docs.cloud.google.com/natural-language/docs/reference/rest#v1.documents)

## Service: language.googleapis.com

To call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

### Discovery document

A [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery documents:

- <https://language.googleapis.com/$discovery/rest?version=v2>
- <https://language.googleapis.com/$discovery/rest?version=v1>
- <https://language.googleapis.com/$discovery/rest?version=v1beta2>

### Service endpoint

A [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

- `https://language.googleapis.com`

## REST Resource: [v2.documents](https://docs.cloud.google.com/natural-language/docs/reference/rest/v2/documents)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v2/documents/analyzeEntities` | `POST /v2/documents:analyzeEntities` Finds named entities (currently proper names and common nouns) in the text along with entity types, probability, mentions for each entity, and other properties. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v2/documents/analyzeSentiment` | `POST /v2/documents:analyzeSentiment` Analyzes the sentiment of the provided text. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v2/documents/annotateText` | `POST /v2/documents:annotateText` A convenience method that provides all features in one call. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v2/documents/classifyText` | `POST /v2/documents:classifyText` Classifies a document into categories. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v2/documents/moderateText` | `POST /v2/documents:moderateText` Moderates a document for harmful and sensitive categories. |

## REST Resource: [v1beta2.documents](https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/documents)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/documents/analyzeEntities` | `POST /v1beta2/documents:analyzeEntities` Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/documents/analyzeEntitySentiment` | `POST /v1beta2/documents:analyzeEntitySentiment` Finds entities, similar to `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/documents/analyzeEntities#google.cloud.language.v1beta2.LanguageService.AnalyzeEntities` in the text and analyzes sentiment associated with each entity and its mentions. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/documents/analyzeSentiment` | `POST /v1beta2/documents:analyzeSentiment` Analyzes the sentiment of the provided text. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/documents/analyzeSyntax` | `POST /v1beta2/documents:analyzeSyntax` Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/documents/annotateText` | `POST /v1beta2/documents:annotateText` A convenience method that provides all syntax, sentiment, entity, and classification features in one call. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/documents/classifyText` | `POST /v1beta2/documents:classifyText` Classifies a document into categories. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/documents/moderateText` | `POST /v1beta2/documents:moderateText` Moderates a document for harmful and sensitive categories. |

## REST Resource: [v1.documents](https://docs.cloud.google.com/natural-language/docs/reference/rest/v1/documents)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeEntities` | `POST /v1/documents:analyzeEntities` Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeEntitySentiment` | `POST /v1/documents:analyzeEntitySentiment` Finds entities, similar to `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeEntities#google.cloud.language.v1.LanguageService.AnalyzeEntities` in the text and analyzes sentiment associated with each entity and its mentions. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeSentiment` | `POST /v1/documents:analyzeSentiment` Analyzes the sentiment of the provided text. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeSyntax` | `POST /v1/documents:analyzeSyntax` Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1/documents/annotateText` | `POST /v1/documents:annotateText` A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1/documents/classifyText` | `POST /v1/documents:classifyText` Classifies a document into categories. |
| `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1/documents/moderateText` | `POST /v1/documents:moderateText` Moderates a document for harmful and sensitive categories. |