---
search:
  tags:
    - Data
    - POST
seo:
  description: >-
    Runs statements on the host that holds the app's database.… Reference for
    the POST /v1/apps/{project}/d1/{binding}/query endpoint in the Sproutboat
    Cloud API.
sidebar:
  label: Query D1
  badge: POST
title: Query D1
type: openapi-operation
---
Runs `statements` on the host that holds the app's database. With only `data:read` the database is opened
read-only (a write is refused); changing data needs `data:write`. Up to 100 statements, 4 MiB of SQL, 100 bound
parameters per statement. `transaction` defaults to true (all or nothing). A first-filter guard refuses
`ATTACH`, `PRAGMA` (except introspection), `load_extension` and transaction control. This route is audited
(no SQL text is stored) and counts against the data-route limits.

`POST /v1/apps/{project}/d1/{binding}/query`
