documents.fetch_text_data
Lists stored text and summary chunks for a text namespace (up to 100 items per response). This calls the Moorcheh Fetch Text Data HTTP API (GET .../documents/fetch-text-data). Use it for export, UI, or RAG-style listing.
Parameters
The name of the target text namespace.
Dict[str, Any] — Response keys are snake_case (e.g. status, message, namespace, statistics, items, execution_time). Each item may include id, text, metadata, created_at, is_summary.
Raises: NamespaceNotFound, InvalidInputError, AuthenticationError, APIError.
Example (sync)
Fetch Text Data Example
Example (async)
Fetch Text Data Async Example
Response overview
items: List of chunks; each has at leastidandtext; summaries useis_summary: true when present.statistics: Aggregated counts (e.g.total_items,total_text_chunks,total_summary_chunks,source_counts) when returned by the API.created_at: May be an ISO string or a numeric timestamp depending on backend version; always under the snake_case keycreated_at.
Complete example
Fetch Text Data Full Example
Important Notes
Text namespaces only: Vector-only namespaces are not supported for this route. The API returns an error if the namespace is not text-based.
Pagination: The public API returns at most 100 items per successful response. If you need full history beyond that, coordinate with Moorcheh product/API roadmap for pagination or use Get Documents when you know IDs.
Best practices
- Treat
itemsas read-only chunks for display or export; use Search for similarity queries. - Rely on snake_case keys in Python (
is_summary,created_at, etc.).
Related operations
- Get Documents — Retrieve specific documents by ID
- Search — Semantic search over namespace content
- Fetch Text Data (API) — HTTP reference for the same endpoint