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

# How to run Advanced Audience Search with the CLI

> Use the Landbase CLI Advanced Dataset Creator to propose and run custom audience queries.

# How to run Advanced Audience Search with the CLI

Use the `advanced_dataset_creator` agent when a standard search cannot express the logic you need: custom SQL-backed audience builds, aggregations, exact filters, or output columns.

For the capability model and interface-neutral examples, see [Advanced Audience Search](https://www.landbase.com/docs/overview/capabilities/advanced-audience-search.md).

## Run a custom audience search

Advanced Dataset Creator runs in two steps. First, ask for the audience and reuse a session label:

```bash theme={null}
landbase-cli search --agent=advanced_dataset_creator --session=sales-ratio \
  "Find companies where the AE-to-SDR ratio is between 1.5 and 3.0. Return company name, website, AE count, SDR count, and ratio."
```

Review the proposed query and confirmation request. Then confirm it in the same session:

```bash theme={null}
landbase-cli search --agent=advanced_dataset_creator --session=sales-ratio "yes, run it" --download=sales-ratio.jsonl
```

## Request custom output columns

Specify the fields you need in the original prompt so the result is useful for the next step in your workflow:

```bash theme={null}
landbase-cli search --agent=advanced_dataset_creator --session=security-gap \
  "Find CISOs at companies where Security headcount is under 2 but Engineering headcount is at least 200. Return company name, website, engineering headcount, security headcount, CISO name, and CISO LinkedIn URL."
```

Confirm and download the result:

```bash theme={null}
landbase-cli search --agent=advanced_dataset_creator --session=security-gap "yes, run it" --download=security-gap.jsonl
```

## When to use another path

Use standard CLI search when your criteria use existing company or contact attributes such as industry, location, employee count, job title, or funding stage.

Use Advanced Dataset Creator when you need to calculate a new attribute, compare groups, analyze historical changes, or combine information across datasets.

## Related

* [Advanced Audience Search](https://www.landbase.com/docs/overview/capabilities/advanced-audience-search.md)
* [CLI search reference](https://www.landbase.com/docs/reference/cli/search.md)
* [CLI sessions guide](https://www.landbase.com/docs/guides/cli/use-sessions.md)


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