sourceCatalogUri. The URI is obtained from a Search Sources hit or from a source catalog. Use textKind to control the format of the returned text—plain text, markdown, page regions, or facet-scoped views. Large sources are paginated via cursor and nextCursor.
Endpoint
Path Parameters
The unique identifier of the project that owns the source entity.
Request Body
Content-Type:application/json
Opaque URI identifying the source entity whose text you want to retrieve. Obtain this value from a
sourceCatalogUri field on a search hit or from the source catalog. Must be at least 1 character.Optional review context identifier. When provided, scopes the text retrieval to sources associated with a specific review.
Pagination cursor. Pass the
nextCursor value from a previous response to retrieve the next chunk of text. Omit to start from the beginning.Maximum number of characters to return in a single response. Must be between 1 and 50,000. If the source text exceeds this limit, use
nextCursor to retrieve the remainder.Optional. Scopes the text retrieval to a specific facet within the source (e.g. a particular specification part). Must be a valid
facetId belonging to the referenced source entity.Controls the format and scope of returned text. One of:
| Value | Description |
|---|---|
text | Plain text extracted from the source (default). |
markdown | Text formatted as Markdown, preserving structure where detected. |
page_regions | Text organized by detected page regions. |
facet_source_text | Raw source text scoped to the matched facet. |
facet_match_text | Processed/normalized text for the matched facet, optimized for comparison. |
Response
Returns aSourceTextResponse object.
Status of the text retrieval operation (e.g.
success).Structured object describing the source entity.
The
sourceCatalogUri from the request, echoed back.The retrieved text content, up to
maxChars characters (or the system default). Empty string if no text is available for the requested textKind.The cursor value used for this response (echoed from the request).
Opaque cursor to pass as
cursor in the next request to continue reading. null when there is no more text.Number of characters actually returned in
text for this response.Total character length of the full source text (across all pages). Useful for progress indication.
true if additional text is available beyond what was returned in this response.The
textKind that was applied, echoed back from the request (or the default if none was specified).If a
facetId was specified, this contains the facet metadata associated with the returned text. null if no facet was specified or found.Example Request
Example Response
Paginating Through Long Source Text
WhenhasMore is true, pass nextCursor back as cursor in a subsequent request to read the next chunk:
hasMore is false.
Error Responses
| Status | Description |
|---|---|
400 | Invalid request body — sourceCatalogUri missing or empty, maxChars out of range. |
401 | Missing or invalid Bearer token. |
404 | Project or source entity not found. |