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

# Overview

> Execute saved queries programmatically and retrieve results via API.

The **Explorer API** provides an API-friendly way to run queries programmatically and retrieve data from the Allium App in bulk.

Execute saved queries on demand, schedule automated data pulls, and retrieve results in a structured format—all via REST endpoints.

## Creating Queries

You have two options for creating queries:

1. **Via the Allium App** - Create and save queries through the UI ([Learn more](/app/run-queries))
2. **Via the API** - Create queries programmatically using the [Create Query](/api/explorer/create-query) endpoint

Both methods generate a **query ID** that you'll use in subsequent API requests.

## Available Endpoints

### Query Management

<CardGroup cols={3}>
  <Card title="Create Query" icon="plus" href="/api/explorer/create-query">
    Create a new saved query programmatically
  </Card>

  <Card title="Update Query" icon="pen" href="/api/explorer/update-query">
    Modify an existing saved query
  </Card>

  <Card title="Execute Query" icon="play" href="/api/explorer/run-query">
    Create a new query run for a saved query
  </Card>
</CardGroup>

### Query Run Management

<CardGroup cols={3}>
  <Card title="Get Latest Run" icon="clock" href="/api/explorer/fetch-latest-query-run">
    Retrieve the latest query run information
  </Card>

  <Card title="Check Run Status" icon="spinner" href="/api/explorer/fetch-query-run-status">
    Retrieve the status of a query run
  </Card>

  <Card title="Get Results" icon="database" href="/api/explorer/fetch-query-run-results">
    Retrieve the results of a query run
  </Card>

  <Card title="Cancel Run" icon="xmark" href="/api/explorer/cancel-query-run">
    Cancel a running query
  </Card>
</CardGroup>
