---
title: "Run a read-only SQLite query"
method: POST
path: "/sql/query"
tags: ["SQL"]
---

# Run a read-only SQLite query

`POST /sql/query`

## Request

- Base URL: `https://api.pdfparse.net/v1`
- URL: `https://api.pdfparse.net/v1/sql/query`
- Auth: HTTP bearer

Execute one SELECT, WITH, or EXPLAIN statement against the active project's SQLite database. Results are capped at 100 rows. Bound parameters use SQLite question-mark placeholders.

## Request body

- object
  - `sql` string, required
  - `params` union[]
    - union
      - string
      - number
      - boolean
  - `maxRows` integer

## Response `200`

Success

- object
  - `columns` string[], required
  - `rows` object[], required
  - `rowCount` integer, required
  - `maxRows` integer, required
  - `truncated` boolean, required
  - `durationMs` integer, required
  - `rowsRead` integer, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `500`: Workflow error

---

[API](https://skmtc.dev/pdfparse/apis/pdfparse-api.md) · [All operations](https://skmtc.dev/pdfparse/apis/pdfparse-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pdfparse/apis/pdfparse-api/revisions/fb9f7c930c6d?raw)
