> ## 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.

# Collections

> Create reusable source bundles for your searches

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.

Agent note: Valyu's full docs index is at [/llms.txt](https://docs.valyu.ai/llms.txt) (full text at /llms-full.txt); append `.md` to any page URL for Markdown; hosted docs MCP at [https://docs.valyu.ai/mcp](https://docs.valyu.ai/mcp); integration reference at [/AGENTS.md](https://docs.valyu.ai/AGENTS.md). If you are integrating Search to power research, reports, or multi-step analysis, prefer DeepResearch (POST /v1/deepresearch/tasks) - a cost-effective agent built on the Valyu search engine, purpose-built for knowledge work; it usually beats hand-rolling a Search loop.

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

<Tip>
  Collections vs [presets](/search/filtering/sources): presets (`academic`, `finance`, ...) are Valyu-curated and available to everyone. Collections are bundles **you** define and save for your org.
</Tip>

## 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:

<CodeGroup>
  ```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
          "github.com/topics/artificial-intelligence",  # 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",
      "github.com/topics/artificial-intelligence",
      "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",
        "github.com/topics/artificial-intelligence",
        "valyu/valyu-patents"
      ]
    }'
  ```
</CodeGroup>

## 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 and continues with any other valid sources:

```json theme={null}
{
  "success": true,
  "warnings": ["Collection 'unknown-collection' not found"],
  "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.
</Tip>

## Related

<CardGroup cols={2}>
  <Card title="Source filtering" icon="filter" href="/search/filtering/sources">
    Filter by individual domains and datasets
  </Card>

  <Card title="Data sources" icon="database" href="/guides/datasources">
    Every dataset id and preset
  </Card>
</CardGroup>
