# TextSpan

- [JSON representation](https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/TextSpan#SCHEMA_REPRESENTATION)

Represents a text span in the input document.

| JSON representation |
|---|
| ``` { "content": string, "beginOffset": integer } ``` |

| Fields ||
|---|---|
| `content` | `string` The content of the text span, which is a substring of the document. |
| `beginOffset` | `integer` The API calculates the beginning offset of the content in the original document according to the `https://docs.cloud.google.com/natural-language/docs/reference/rest/v1beta2/EncodingType` specified in the API request. |