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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# List saved queries

> Lists saved APL queries.

`axiom.listSavedQueries` lists saved APL queries. Each result includes its ID, name, query request, metadata, dataset hint, and owner.

```ts automations/axiom-list-saved-queries.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { axiom } from "automate.ax/axiom"

export default automation("List saved queries", () => {
  onHttpRequest({ scope: "automation" })
  axiom.listSavedQueries({})
})
```

## Inputs

This action has no inputs.

## Output

Returns an array of saved APL queries visible to the token. Each item includes `id`, `name`, `kind: "apl"`, string `metadata`, `who`, the complete query request, and an optional dataset hint. No visible saved queries returns `[]`.

## Permission and failures

The API token needs the dataset-level `starredQueries|read` capability. Axiom limits the result to saved queries the token can access. Authentication and permission failures are returned as action errors.
