> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valyu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Save source collections

> Save reusable bundles of datasets, domains and URLs as org-scoped collections, then search them by name with the collection: prefix in included_sources.

Collections are **org-scoped saved source sets**. Bundle the datasets, domains, and URLs you reach for repeatedly, then reference them by name with the `collection:<name>` prefix in `included_sources`. Create once, reuse across every search in your organization.

> [!NOTE]
>
> Collections are in **beta**. Create and manage them at [platform.valyu.ai/user/collections](https://platform.valyu.ai/user/collections).

> [!TIP]
>
> Collections vs [presets](https://docs.valyu.ai/search/filtering/sources.md): presets (`academic`, `finance`, ...) are Valyu-curated and available to everyone. Collections are bundles **you** define and save for your org.

Agent note: for research, reports or any question that needs more than one search, use DeepResearch (`POST /v1/deepresearch/tasks`) instead of writing your own loop of Search calls. Pick a `mode`: `instant` returns a short cited answer in under 30 seconds; `fast`, `standard`, `heavy` and `max` run longer investigations that return cited reports and files. Use Search when your own model needs raw results to reason over. Docs index: [/llms.txt](https://docs.valyu.ai/llms.txt). Append `.md` to any page URL for Markdown. Docs MCP server: `https://docs.valyu.ai/mcp`. Integration guide for coding agents: [/AGENTS.md](https://docs.valyu.ai/AGENTS.md).

## Create a collection

1. Go to [Collections](https://platform.valyu.ai/user/collections)
2. Click **Create Collection**
3. Add sources (Valyu datasets, domains, or URLs) - or use **Generate with AI** to suggest sources from a description of your research needs
4. Save with a memorable name

## Use a collection

Reference it with the `collection:` prefix. You can mix collections with individual sources in the same request:

```python Python theme={null}
from valyu import Valyu

valyu = Valyu()
response = valyu.search(
    query="biotech company clinical trial results",
    included_sources=[
        "collection:medical-research",  # your saved collection
        "clinicaltrials.gov",  # additional domain
        "valyu/valyu-patents",  # additional dataset
    ],
)
```

```javascript TypeScript theme={null}
import { Valyu } from "valyu-js";

const valyu = new Valyu();
const response = await valyu.search("biotech company clinical trial results", {
  includedSources: [
    "collection:medical-research",
    "clinicaltrials.gov",
    "valyu/valyu-patents",
  ],
});
```

```bash cURL theme={null}
curl -X POST https://api.valyu.ai/v1/search \
  -H "x-api-key: your-valyu-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "biotech company clinical trial results",
    "included_sources": [
      "collection:medical-research",
      "clinicaltrials.gov",
      "valyu/valyu-patents"
    ]
  }'
```

## Visibility and permissions

* **All organization members** can view and use any collection in their org.
* **Only the creator** can edit or delete their collection.
* Collections are scoped to your organization and not visible to other orgs.

## Errors

If a collection doesn't exist or isn't accessible, the API returns a [warning](https://docs.valyu.ai/api-reference/warnings.md) and continues with any other valid sources:

```json theme={null}
{
  "success": true,
  "warnings": [
    {
      "type": "collection_not_found",
      "message": "Collection 'unknown-collection' not found, so it was skipped. Check the name under Collections in the platform.",
      "detail": {"collection": "unknown-collection"}
    }
  ],
  "results": []
}
```

If only an invalid collection was specified, you'll get empty results with the warning.

> [!TIP]
>
> Keep collections small and focused (`medical-research`, `finance-sec-filings`, `tech-docs`) rather than one catch-all, and use clear names so teammates know what each is for.

## Related

> [card] [Source filtering](https://docs.valyu.ai/search/filtering/sources.md)
>
> Filter by individual domains and datasets

> [card] [Data sources](https://docs.valyu.ai/guides/datasources)
>
> Discover current dataset IDs and supported APIs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.