---
title: Read Content & Versions
description: Use a document ID to read metadata, the full body, cover images and earlier versions of the body.
type: guide
status: stable
updated: 2026-12-03
url: /en/docs/documents
markdown: /en/docs/documents.md
---

## Data Access Path

Recommended reading order, not a record of completed steps. Optional steps can be skipped.

1. [Get an API Key](/en/docs/authentication)
2. [Make Your First Query in 5 Minutes](/en/docs/quickstart)
3. [Keyword Search](/en/docs/search)
4. [Browse by User, Topic, Tag & Category](/en/docs/browse) (optional)
5. [Read Content & Versions](/en/docs/documents) ← current page
6. [Download Images & Attachments](/en/docs/attachments) (optional)
7. [Production Checklist](/en/docs/production)

**Before You Start**：Obtain an authorized document_id from a search.

# Read Content & Versions

By the end of this page you can read a document's full body from its `document_id`, along with every version it has had.

No `document_id` yet? [Search](/en/docs/search) or [browse](/en/docs/browse) first.

## Read several documents at once [#batch]

Use this for list pages and batch jobs, up to 50 documents per call:


```bash
curl -sS "$WHALE_BASE_URL/v1/documents/batch-get" \
  -H "Authorization: Bearer $WHALE_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"document_ids": ["doc_01J...", "doc_01K..."], "include_content": true}'
```


Each document is returned separately; one failure doesn't affect the others:


```json
{
  "document_id": "doc_01J...",
  "document": {
    "id": "doc_01J...",
    "source_platform": "reddit",
    "external_content_id": "t3_abc123",
    "canonical_url": "https://www.reddit.com/...",
    "content_type": "post",
    "title": "...",
    "published_at": "2026-09-01T08:00:00Z",
    "current_version_id": "ver_01J..."
  },
  "content": {"body": "full body...", "body_format": "plain", "char_count": 712}
}
```


A document that fails carries an `error` whose `code` is `not_found` or `forbidden`.

You can include more in the same call; nothing extra is returned by default:

| Parameter | Adds |
| --- | --- |
| `include_content` | The full body of the current version |
| `include_latest_snapshot` | The latest metrics; see [metrics & snapshots](/en/docs/metrics) |
| `include_affect`, `include_entities`, `include_intents` | Sentiment, entities, intents; see [sentiment, entities & intents](/en/docs/analysis-results) |
| `include_parts`, `include_facts` | Subtitles, OCR and facts; see [transcripts, OCR & facts](/en/docs/transcripts). `parts_limit` defaults to 20, `facts_limit` to 50 |

Every `document` field is described in the [field reference](/en/docs/fields). The ones you'll use most:

- `id`: the MarsYoo document ID, starting with `doc_`.
- `external_content_id`: the original ID on the platform, such as a tweet ID or YouTube video ID.
- `canonical_url`: the link to the original.
- `published_at`: when it was published on the platform.

## Read one document [#single]


```bash
curl -sS "$WHALE_BASE_URL/v1/documents/$DOCUMENT_ID" \
  -H "Authorization: Bearer $WHALE_API_KEY"
```


Returns the `document` object and information about the current version, without the body.

## Read the full body [#content]


```bash
curl -sS "$WHALE_BASE_URL/v1/documents/$DOCUMENT_ID/content" \
  -H "Authorization: Bearer $WHALE_API_KEY"
```



```json
{
  "content": {
    "document_id": "doc_01J...",
    "version_id": "ver_01J...",
    "body": "full body",
    "body_format": "plain",
    "char_count": 712
  }
}
```


- `body` is always complete, never truncated.
- `body_format` is `plain` or `markdown`.
- Add `?version_id=ver_...` to read an earlier version's body.

## See the edit history [#versions]

A new version is created when the title, body, link or subtitles change. Metric changes don't create versions; they're recorded as [snapshots](/en/docs/metrics).


```bash
curl -sS "$WHALE_BASE_URL/v1/documents/$DOCUMENT_ID/versions?limit=100" \
  -H "Authorization: Bearer $WHALE_API_KEY"
```



```json
{
  "versions": [
    {"version_id": "ver_01J...", "char_count": 712, "created_at": "2026-09-01T08:05:00Z"}
  ]
}
```


- Newest first.
- Up to 500, with no pagination.
- To compare two versions, read both bodies and diff them yourself.

## Read several versions at once [#versions-batch]

When following the [change feed](/en/docs/change-feed) for new versions, use this, up to 100 per call:


```json
POST /v1/versions/batch-get

{
  "items": [{"document_id": "doc_01J...", "version_id": "ver_01J..."}],
  "include_body": true
}
```


Each item returns:

- `version`: version information.
- `body`: the body. Requires `include_body: true` and body access.
- `platform_payload`: the raw platform data at ingest for this version. Requires matching access.

A failed item carries its own `error` (`not_found` or `forbidden`).

## Read covers and image links [#assets]

With `metadata` access, `document.metadata.assets` lists links to images, videos and other media. When there's a cover, `document.cover` gives it directly:


```json
"cover": {"media_type": "image", "url": "https://cdn.example.com/cover.jpg", "role": "cover"}
```


`role` for each asset:

| `role` | Meaning |
| --- | --- |
| `cover` | The cover, at most one per document |
| `inline` | An image inside the body |
| `gallery` | One item in a gallery or carousel |
| `media` | The video or audio itself |

- Older data without `role` doesn't appear in `cover`. Don't treat `preview_url` or the first image as the cover.
- These are public platform links. To download files MarsYoo stored, see [download images & attachments](/en/docs/attachments).

## Read raw platform data [#payload]

`document.metadata` doesn't include the platform's raw data. When you need it, read `platform_payload` per version with [read several versions at once](#versions-batch).

## When something fails [#errors]

See [Error codes](/en/docs/errors).

## Check and Continue

**Completion Check**：Read metadata, full content, and the facts you need without treating search snippets as complete bodies.

Previous step：[Browse by User, Topic, Tag & Category](/en/docs/browse)

**Recommended Next Step**：[Download Images & Attachments](/en/docs/attachments) (optional; skip if not needed)

Skip optional steps：[Production Checklist](/en/docs/production)
