Data Operations
Fetch Text Data
List text and summary chunks from a text namespace with cursor pagination.
GET
Overview
Get text chunks from a text-type namespace. Use this to list stored text and summary chunks for display, export, or bulk RAG context loading. Results are returned one page at a time. Each page returns up to 100 items. When more data exists, the response includespagination.has_more and pagination.next_token — pass that token on the next request to fetch the following page.
Only namespaces with
type === "text" are supported. Vector-only namespaces are not supported.Path parameters
Name of the text namespace (e.g.
my-documents)Query parameters
Maximum number of items to return in this page. Default: 100. Maximum: 100.
Opaque cursor from the previous response’s
pagination.next_token. Omit on the first request.next_token is tied to the requested namespace. Do not reuse a token from a different namespace.Pagination
Next page
Call again with
next_token from the previous response:
GET .../fetch-text-data?limit=100&next_token=<token>Response fields
"success" for 200 responses.Human-readable summary for this page (e.g. “Fetched N text items from namespace ’…’”).
The requested namespace name.
Aggregated counts and timestamps for items in this page only (not the full namespace total).
Number of items in
items on this page.Count of non-summary chunks on this page.
Count of summary chunks on this page.
Earliest item timestamp on this page as ISO 8601.
null when the page is empty.Latest item timestamp on this page as ISO 8601.
null when the page is empty.Map of source name → count on this page.
Text chunks for this page (length ≤
limit, max 100).Item/chunk identifier.
Text content of the chunk.
Arbitrary metadata (e.g.
source, heading, chunk_index).Creation time as ISO 8601.
true for summary chunks, false for regular text chunks.Page size used for this request (≤ 100).
true if additional pages exist after this one.Pass as query param
next_token to fetch the next page. null when has_more is false.Request processing time in seconds.
Example response
Errors
| Status | Message (examples) |
|---|---|
| 400 | Bad Request: Namespace '...' is not a text-based namespace. |
| 400 | Invalid limit: must be a positive integer. |
| 400 | Invalid next_token: token does not match requested namespace. |
| 404 | Namespace '...' not found. |
| 500 | Internal Server Error during namespace validation. |
Related
- Get items by ID — retrieve specific documents by id
- Upload documents — add text documents to a namespace
- Search — semantic search over namespace content