---
title: Make Your First Query in 5 Minutes
description: Search stored documents with your API key, then read the full body of one of them.
type: tutorial
status: stable
updated: 2026-12-03
url: /en/docs/quickstart
markdown: /en/docs/quickstart.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) ← current page
3. [Keyword Search](/en/docs/search)
4. [Browse by User, Topic, Tag & Category](/en/docs/browse) (optional)
5. [Read Content & Versions](/en/docs/documents)
6. [Download Images & Attachments](/en/docs/attachments) (optional)
7. [Production Checklist](/en/docs/production)

**Before You Start**：Configure your Consumer API Key and have Bash, curl, and jq available.

# Make Your First Query in 5 Minutes

By the end of this page you will have searched a set of documents with your API key and read the full body of one of them.

## Before you start [#prepare]

- An API key. If you don't have one, see [Get an API key](/en/docs/authentication).
- A terminal with `curl` and `jq`.

Set the address and key as environment variables; the commands below use them:


```bash
export WHALE_BASE_URL="https://www.marsyoo.com"
export WHALE_API_KEY="your API key"
```


## Step 1: Search [#search]

Search documents published in the last 30 days that mention "artificial intelligence", and take the first 10:


```bash
curl -sS "$WHALE_BASE_URL/v1/search/history" \
  -H "Authorization: Bearer $WHALE_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"mode": "keyword", "query": "artificial intelligence", "limit": 10}' \
  | tee result.json \
  | jq '.results[] | {document_id, source_platform, title}'
```


You're done with this step when you see results with a `document_id`:


```json
{
  "document_id": "doc_01J...",
  "source_platform": "reddit",
  "title": "..."
}
```


> Note: An empty result is not an error. Usually the keyword has no recent data within your access. Try a more common word.

## Step 2: Read the full body [#read]

The `body` in a search result is only the matching snippet. Use the `document_id` to read the whole text:


```bash
DOCUMENT_ID=$(jq -r '.results[0].document_id // empty' result.json)
: "${DOCUMENT_ID:?No results; try another keyword}"

curl -sS "$WHALE_BASE_URL/v1/documents/$DOCUMENT_ID/content" \
  -H "Authorization: Bearer $WHALE_API_KEY" \
  | jq -r '.content.body'
```


When the terminal prints the document's full text, you're done.

## Next steps [#next]

- Filter by platform and time, and page through more results: [Keyword search](/en/docs/search)
- Read authors, metrics and analysis results: [Read content & versions](/en/docs/documents)
- Collect fresh data from a platform: [Live queries](/en/docs/live-query)
- A request returned an error: [Error codes](/en/docs/errors)

## Check and Continue

**Completion Check**：Obtain a document_id and read its content; for empty results, check the query and effective access without automatically requesting collection.

Previous step：[Get an API Key](/en/docs/authentication)

**Recommended Next Step**：[Keyword Search](/en/docs/search)
