content: read source text by doc_id
Read full article text in chunks by doc_id.
Overview
The content API reads full article text by doc_id. doc_id usually comes from agentic-search or meta-search, making it useful for detail pages, citation checks, and batched long-document loading. Use offset and limit to page through long documents.
Use cases
- · Use the doc_id returned by agentic-search to fetch source text for secondary summarization.
- · Read long documents in segments to avoid exceeding context limits.
- · Use next_offset and more for multi-step streaming reads.
Not for
- · Do not use it to search by topic; first obtain a doc_id through agentic-search or meta-search.
- · Do not use it to download images or binary attachments; use resource.
- · Do not use it as a final-answer generation or fact-judgment endpoint.
Capability boundaries
- · content reads source text or context by doc_id with character offset/limit slicing.
- · offset and limit are Unicode character counts; long documents should be read in slices using next_offset.
- · Not every record has readable full text, so callers must handle 404 or empty content.
- · Returned text should be used as citation-verification source material, not as an unsourced conclusion.
Authentication
Use API key Bearer token authentication for all requests. Add this HTTP header:
Authorization: Bearer YOUR_API_TOKEN
Request example
curl -G https://api.sciverse.space/content \
-H "Authorization: Bearer YOUR_API_TOKEN" \
--data-urlencode "doc_id=YOUR_DOC_ID" \
--data-urlencode "offset=0" \
--data-urlencode "limit=700"Request parameters (URL query)
| Field | Type | Required | Description |
|---|---|---|---|
| doc_id | string | Required | Document ID returned by agentic-search or meta-search. |
| offset | integer | Optional | Character offset (Unicode code points); returns full text when omitted. Range ≥ 0 |
| limit | integer | Optional | Maximum characters per request (Unicode code points), default 700; applies only when offset is set. Default 700 |
Response structure
| Field | Type | Description |
|---|---|---|
| text | string | Text content (Markdown or plain text). |
| chars_returned | integer | Characters returned in this response (Unicode code points). |
| next_offset | integer | Character offset for the next segment. |
| more | bool | Whether more content is available. |
Errors
| Code | Message | Description |
|---|---|---|
| 400 | INVALID_REQUEST | doc_id is missing or parameters are invalid. |
| 401 | UNAUTHORIZED | Authentication failed. |
| 404 | NOT_FOUND | Document not found. |
| 405 | METHOD_NOT_ALLOWED | Only GET is supported. |
| 429 | RATE_LIMITED | Account quota limit reached. |
| 502/503 | UPSTREAM_UNAVAILABLE | Service temporarily unavailable. |
See the Errors section for shared error codes.
Parameter bounds
| Limit | Value |
|---|---|
| offset | Character offset (Unicode code points); returns full text when omitted. |
| limit | Maximum characters per request (Unicode code points), default 700; applies only when offset is set. |
Retry guidance
- · Retry recommended: 502 / 503
- · Do not retry: 400 / 401 / 405
FAQ
Where does doc_id come from?
doc_id usually comes from an agentic-search hit or a meta-search result.
What units do offset and limit use?
They use Unicode characters, not bytes, which avoids cutting through multi-byte characters.
Can content read a full long paper in one request?
It may, but sliced reads with more/next_offset are recommended to reduce timeout and payload risk.
Can I show the returned text directly to users?
You can show snippets, but keep doc_id, offset ranges, and source metadata for verification.
Need an API key?
Create one in Console > Tokens.The same API key works for enabled Sciverse, DianShi, and Skills capabilities, with starter quota available according to account permissions.