## Data Access Path

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

1. [Get & Use an API Key](/en/docs/authentication)
2. [Make Your First Query](/en/docs/quickstart)
3. [Keyword & Semantic Search](/en/docs/search)
4. [Users, Topics, Tags & Categories](/en/docs/browse) (optional) ← current page
5. [Read Content & History](/en/docs/documents)
6. [Download Images & Attachments](/en/docs/attachments) (optional)
7. [Limits, Retries & Troubleshooting](/en/docs/production)

**Before You Start**：For author/topic/tag/category reads, prepare actual platform IDs, filter values and field grants; skip this step for search-only use.

# Users, Topics, Tags & Categories

These are external, read-only **Consumer API Key** endpoints. No Collector Key or Admin Token is needed. Configure your environment using [Get & Use an API Key](/en/docs/authentication). For keyword or semantic similarity, use [Keyword & Semantic Search](/en/docs/search).

> Native tag filtering is temporarily paused. Nonempty `tags` on catalog or user-content requests returns `503 catalog_tags_paused`; the filter is never silently ignored. Topics, categories, ordinary reads and storing tags during ingestion are unaffected by this switch. Do not automatically drop the filter and retry; remove it only if unfiltered-by-tag results are acceptable.

## Choose an endpoint

| Goal | Endpoint |
| --- | --- |
| Read an observed platform user | `GET /v1/users/{platform}/{external_author_id}` |
| Read that author's content | `GET /v1/users/{platform}/{external_author_id}/documents` |
| Filter content by topics, native tags or categories | `GET /v1/documents/browse` |
| Discover active category codes for a kind of platform | `GET /v1/classifications?source_platform=...` |
| Read complete bodies, history, metrics or files | Use returned `document.id` with [Documents](/en/docs/documents) and [Attachments](/en/docs/attachments) |

`external_author_id` is the platform's author ID, not an organization user ID, nickname or collection channel ID. An author filter requires exactly one platform.

## Browse content

Use the configured `WHALE_BASE_URL` and `WHALE_API_KEY`:


```bash
curl --fail-with-body --get "$WHALE_BASE_URL/v1/documents/browse" \
  -H "Authorization: Bearer $WHALE_API_KEY" \
  --data-urlencode 'source_platforms=reddit' \
  --data-urlencode 'topics=AI' \
  --data-urlencode 'score_min=10' \
  --data-urlencode 'created_from=2026-10-01T00:00:00Z' \
  --data-urlencode 'created_to=2026-10-02T00:00:00Z' \
  --data-urlencode 'limit=50'
```


Replace the example platform and topic with actual authorized values.

| Parameter | Meaning |
| --- | --- |
| `source_platforms` | Comma-separated platform codes |
| `external_author_id` | Exact author ID; requires exactly one `source_platforms` value |
| `topics` | Comma-separated content topics |
| `tags` | Comma-separated native content tags, not external category names |
| `content_categories` | Comma-separated native platform category values, such as TikTok `Sports` or `Entertainment` labels |
| `classification_codes` | Comma-separated category codes from the registry |
| `score_min` / `score_max` | Inclusive current integer platform-score range; for Reddit this filters the current `score`, including negative values |
| `content_types` | Comma-separated content types |
| `published_from` / `published_to` | Platform publish time; RFC3339, inclusive start/exclusive end |
| `created_from` / `created_to` | First-ingest time; RFC3339, inclusive start/exclusive end; defaults to the last 24 hours, maximum 31 days per window |
| `limit` | 1–200, default 50 |
| `cursor` | Previous `next_cursor`, passed back unchanged |
| `include_snapshot` | `true` includes the latest authorized metric snapshot; default `false` |
| `query` | Exact document ID or original URL; with a platform, also exact platform content ID. Not full-text search. Exact lookup may omit the ingest window |
| `status` | Optional document status filter |

Values within a list are ORed; different dimensions are ANDed. Author IDs, topics, tags, native category values and category codes match stored values exactly and case-sensitively. No aliases, semantic expansion or automatic `#` prefix are applied. Commas are delimiters; labels containing commas cannot currently be queried.

`content_categories` matches current-version or document-level `category` facts where `name=content_category`, using their `value_string`. It reads platform-native categories already reported by collectors and does not require registry mappings or historical backfills. `classification_codes` matches `metadata.label_code` for platform-managed business classifications. Score filters read the current platform `score`; content without a valid integer score does not match. Content without an author/topic/tag/native category does not match the corresponding filter.

### Response and pagination


```json
{
  "documents": [
    {"document": {"id": "doc_example", "dataset_id": "social_media_raw", "source_platform": "reddit", "title": "Example"}}
  ],
  "next_cursor": "...",
  "created_from": "2026-10-01T00:00:00Z",
  "created_to": "2026-10-02T00:00:00Z"
}
```


Results are ordered by first-ingest time descending, then document ID descending. This is the current catalog, not full content or every historical version. Persisted documents may appear here before keyword/vector indexing finishes.

Keep the same application, filters and `limit` on every page and add `cursor`. Default time bounds are pinned inside the cursor; explicit bounds must not change. Omitted `next_cursor` ends pagination. No global count is returned. Concurrent updates/deletions can change results; this is not a frozen snapshot.

For longer backfills, split first-ingest time into windows of at most 31 days. For ongoing synchronization, use [Synchronize Data Changes](/en/docs/change-feed) rather than repeated scans.

## Read users and their content


```bash
curl --fail-with-body --get "$WHALE_BASE_URL/v1/users/reddit/author_example" \
  -H "Authorization: Bearer $WHALE_API_KEY"

curl --fail-with-body --get "$WHALE_BASE_URL/v1/users/reddit/author_example/documents" \
  -H "Authorization: Bearer $WHALE_API_KEY" \
  --data-urlencode 'limit=50'
```


The profile response contains `user.source_platform`, `external_author_id`, `author`, supporting `document_id`, and that document's `observed_at`. `author` includes collected name, avatar, profile URL, bio and counts, but excludes collector `extra_payload`.

It is the author attached to the most recently ingested authorized document in the requested window, not a complete live platform profile. Fields may be empty; the document's last-observed timestamp does not prove each profile field's freshness. The default window is 24 hours; `404 user_not_found` means no authorized sample in that window. Widen it explicitly up to 31 days, use [Live Queries](/en/docs/live-query) to request fresh collection, or [User & Channel Collection](/en/docs/collection-subscriptions) for periodic tracking.

User content accepts catalog filters/pagination. Query parameters cannot override the path's author/platform. Profile reads accept only `created_from/to` and `published_from/to`; no `cursor` or `query`.

## Discover category codes


```bash
curl --fail-with-body --get "$WHALE_BASE_URL/v1/classifications" \
  -H "Authorization: Bearer $WHALE_API_KEY" \
  --data-urlencode 'source_platform=reddit' \
  --data-urlencode 'limit=100'
```


`classifications[]` includes only `code`, `dataset_id` (internal, ignore it), `name`, `description`, `label_schema`. Active entries are ordered by code ascending. Pass `next_after_code` as `after_code`, keeping `source_platform` and limit unchanged, until it is empty. Default/maximum limit is 100.

Use returned codes in `classification_codes`. Registry entries are kept per kind of platform, not proof that matching authorized content exists. Do not assume example codes such as `ai`, `sports` or `tourism` have been registered.

`source_platform` picks which kind of platform's registry to read; an application opened for one kind only may omit it.

## Permissions and errors

Active grants filter platform, language, region and publish time. Author filters/profiles require `author` or `metadata`; topic/tag filters require `metadata`; native-category and registry-classification filters/registry reads require `facts`; score filters require `metrics`. Combined filters must be permitted by the same entitlement branch. Response fields are also redacted.

| HTTP / code | Action |
| --- | --- |
| `200`, `documents=[]` | Check time, exact values and grants; not a global absence claim |
| `400 invalid_document_query` | Fix time bounds, pagination, unknown parameters or author/platform pairing |
| `400 invalid_classification_query` | Check `source_platform`, limit and code cursor |
| `401 unauthorized` | Check Consumer Key |
| `403 entitlement_denied` | Request data/field grants; never probe permissions by writing records |
| `404 user_not_found` | No authorized user observation in this window |
| `429` | Back off according to `Retry-After` |
| `503 catalog_unavailable` | Narrow the window and use exponential backoff |
| `503 catalog_tags_paused` | Native tag filtering is paused; do not retry continuously or automatically remove the filter |

Next, [read content, versions and facts](/en/docs/documents) using the returned IDs.

## Check and Continue

**Completion Check**：Read observed author profiles, discover category codes, and paginate filtered content to obtain document.id for full-content reads.

Previous step：[Keyword & Semantic Search](/en/docs/search)

**Recommended Next Step**：[Read Content & History](/en/docs/documents)