# Search for research agents

A research agent searches many times and reads what it finds. MillionShort gives it one tool for the web and specialist sources, with levers it can pull between steps.

A research agent takes a question, plans searches, reads the results, and searches again until it can write. This is often called [agentic search](https://millionshort.com/docs/glossary/what-is-agentic-search). Its output is only as wide as the pool it searched.

## The problem

- **Every step returns the same sites.** If each search is answered by the same popular sites, ten steps of research add up to one view repeated ten times.
- **Different questions live in different places.** A paper, a court opinion, a forum thread and a podcast episode are not found by the same web search.
- **The agent cannot tell sources apart.** Without a signal about the site, it treats every link the same.
- **Tool sprawl.** One tool per kind of content means more for the model to choose between, and more to go wrong.

## How MillionShort addresses it

- **One tool, 13 sources.** The agent names up to 5 in `sources`, such as `web`, `news`, `discussions`, `academic` and `law`, and gets one merged list. [The sources](https://millionshort.com/docs/search/sources) lists them all. We call this the [Mixture of Experts](https://millionshort.com/docs/search/mixture-of-experts).
- **A lever for the second search.** When the first pass returns the usual sites, the agent can repeat it with [`remove_top_sites`](https://millionshort.com/docs/search/remove-top-sites) set and see what sits below them. `only_top_sites` does the reverse when it wants the mainstream view.
- **Domain rules it can write itself.** `include_domains` to stay inside sites it trusts, `exclude_domains` to drop ones it has already read, `boost_domains` and `bury_domains` to lean without filtering. See [Lenses](https://millionshort.com/docs/search/lenses).
- **Signals it can reason about.** Each result has `popularity {rank, bucket}` and `risk`. `POST /v1/domain` returns both for up to 25 domains for 1 credit, so the agent can check a site it found elsewhere.
- **Reasons.** `explain: true` adds `why` and `signals` to each result and is free.
- **A known cost per step.** Every response states `usage.credits` and `cost_usd`, so the agent, or the code around it, can keep a budget.

## Two steps of a research loop

A first pass over the web and the research literature:

```bash
curl https://api.millionshort.com/v1/search \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "transformer interpretability",
    "sources": ["web", "academic"],
    "num_results": 10
  }'
```

```python
import os

import requests

r = requests.post(
    "https://api.millionshort.com/v1/search",
    headers={"Authorization": "Bearer " + os.environ["MILLIONSHORT_API_KEY"]},
    json={
        "query": "transformer interpretability",
        "sources": [
            "web",
            "academic"
        ],
        "num_results": 10
    },
    timeout=30,
)
r.raise_for_status()
for hit in r.json()["data"]["results"]:
    print(hit["position"], hit["title"], hit["url"])
```

```ts
const res = await fetch('https://api.millionshort.com/v1/search', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.MILLIONSHORT_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "query": "transformer interpretability",
    "sources": [
      "web",
      "academic"
    ],
    "num_results": 10
  }),
});
if (!res.ok) throw new Error(`POST /v1/search failed: ${res.status}`);
const { data } = (await res.json()) as {
  data: { results: { position: number; title: string; url: string }[] };
};
for (const hit of data.results) console.log(hit.position, hit.title, hit.url);
```

The same call as a tool of the MCP server:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search",
    "arguments": {
      "query": "transformer interpretability",
      "sources": [
        "web",
        "academic"
      ],
      "num_results": 10
    }
  }
}
```

Then a second pass below the most popular sites and in the places people discuss the topic:

```bash
curl https://api.millionshort.com/v1/search \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "transformer interpretability",
    "sources": ["web", "hn", "discussions"],
    "remove_top_sites": 10000,
    "num_results": 10,
    "max_chars_per_result": 1500,
    "explain": true
  }'
```

```python
import os

import requests

r = requests.post(
    "https://api.millionshort.com/v1/search",
    headers={"Authorization": "Bearer " + os.environ["MILLIONSHORT_API_KEY"]},
    json={
        "query": "transformer interpretability",
        "sources": [
            "web",
            "hn",
            "discussions"
        ],
        "remove_top_sites": 10000,
        "num_results": 10,
        "max_chars_per_result": 1500,
        "explain": True
    },
    timeout=30,
)
r.raise_for_status()
for hit in r.json()["data"]["results"]:
    print(hit["position"], hit["title"], hit["url"])
```

```ts
const res = await fetch('https://api.millionshort.com/v1/search', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.MILLIONSHORT_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "query": "transformer interpretability",
    "sources": [
      "web",
      "hn",
      "discussions"
    ],
    "remove_top_sites": 10000,
    "num_results": 10,
    "max_chars_per_result": 1500,
    "explain": true
  }),
});
if (!res.ok) throw new Error(`POST /v1/search failed: ${res.status}`);
const { data } = (await res.json()) as {
  data: { results: { position: number; title: string; url: string }[] };
};
for (const hit of data.results) console.log(hit.position, hit.title, hit.url);
```

The same call as a tool of the MCP server:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search",
    "arguments": {
      "query": "transformer interpretability",
      "sources": [
        "web",
        "hn",
        "discussions"
      ],
      "remove_top_sites": 10000,
      "num_results": 10,
      "max_chars_per_result": 1500,
      "explain": true
    }
  }
}
```

The first call costs 2 credits and the second 3.

## Over MCP

An agent that speaks MCP needs no code. The [hosted MCP server](https://millionshort.com/docs/mcp) at `https://mcp.millionshort.com/mcp` has `search`, `get_domain_info`, `list_sources` and the tools of the other endpoints ([the MCP page](https://millionshort.com/docs/mcp#tools) lists them). The same fields are the tool's arguments. If you write the loop yourself, the [agent tool use guide](https://millionshort.com/docs/search/guides/agent-tool-use) shows how to describe the search tool to a model. Tool packages for LangChain and the Vercel AI SDK exist, as do Python and TypeScript SDKs, but none is published to a package registry yet.

## What it does not do

- **A search does not write the report.** MillionShort returns results and your agent's model does the reading and writing. To have us write it, [Agent](https://millionshort.com/docs/agent) returns a written answer with a checked quote for every statement, as a separate, metered call.
- **No live fetch in a search.** Snippets go up to 2,000 characters, and `include_content: true` adds the page text we hold to `web` and `news` results. That text is as old as the day we captured it. To read a page as it is now, the agent calls [Extract](https://millionshort.com/docs/extract/parameters).
- **No find-similar, and keyword retrieval.** The agent should search with the words it expects on the page, not a description of the idea.
- **No date filter on web pages.** `start_date`, `end_date` and `time_range` work on the dated sources, such as `news`, `hn` and `academic`. Web pages carry no date. The `web` source stores no language: a `language` filter is applied to the language detected from each result's text. A source that cannot apply a filter is named in a `filter_not_applied` warning, so the agent can tell.
- **The web source is not continuously refreshed.** It is refreshed periodically and web results carry no date. For what happened this week, search `news`, `social` or `hn`.

## Read next

- [Agent tool use](https://millionshort.com/docs/search/guides/agent-tool-use) and [Long-tail research](https://millionshort.com/docs/search/guides/long-tail-research), the guides.
- [Research from primary sources](https://millionshort.com/docs/use-cases/primary-source-research), a related use case.
- Glossary: [What is agentic search?](https://millionshort.com/docs/glossary/what-is-agentic-search) and [What is long-tail search?](https://millionshort.com/docs/glossary/what-is-long-tail-search)
