# Drillr SQL Query Runner

> Drillr SQL Query Runner is a paid API for AI agents from gateway.drillr.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Executes a read-only SELECT SQL query against Drillr's dataset and returns the query results.

## Facts

- Endpoint: POST https://gateway.drillr.ai/api/x402/data/run_sql
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/drillr-sql-query-runner-f48f302f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jxi-XDUqtS5PfyrxJKgsP

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability drillr-sql-query-runner-f48f302f -d '<json body>'
```

Example prompt: Run this SQL query against Drillr's data for me: SELECT company_name, revenue FROM companies WHERE industry = 'technology' AND revenue > 1000000 ORDER BY revenue DESC LIMIT 20.

## When to prefer this

Use this endpoint when you need flexible, ad-hoc access to Drillr's underlying data via custom SQL — especially when the sibling search/list endpoints don't expose the specific filtering, joining, or aggregation logic you need. Ideal for analytical queries, data exploration, or building derived views from Drillr company or trading signal data.

## Known failure modes

- Invalid or non-SELECT SQL statement (write queries rejected as read-only only)
- Malformed SQL syntax returns a parse error
- Query references tables or columns that don't exist in Drillr's schema
- Payment failure if USDC balance insufficient
- Timeout for very large or complex queries
- Network or gateway error returning 5xx

## How this service works

Execute read-only SQL against drillr financial database (90+ tables)

## Output

Returns the rows and columns resulting from the SELECT query executed against Drillr's dataset — typically structured tabular data including company records, trading signals, or related financial data matching the query criteria.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "sql": {
   "type": "string",
   "description": "Read-only SELECT statement"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/drillr-sql-query-runner-f48f302f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.drillr.ai](https://www.zero.xyz/host/gateway.drillr.ai/llms.txt)
