---
title: "Execute a query"
method: POST
path: "/queries/{queryId}"
tags: ["queries"]
---

# Execute a query

`POST /queries/{queryId}`

Queries which have been created within a Budibase app can be executed using this,

## Path parameters

- `queryId` string, required

## Headers

- `x-budibase-app-id` string, required

## Request body

- ExecuteQuery — The parameters required for executing a query.
  - `parameters` object — This contains the required parameters for the query, this depends on query type, setup and bindings.
  - `pagination` object — For supported query types (currently on REST) pagination can be performed using these properties.
    - `page` string — The page which has been returned from a previous query.
    - `limit` number — The number of rows to return per page.

## Response `200`

Returns the result of the query execution.

- ExecuteQueryOutput
  - `data` object[], required — The data response from the query.
  - `extra` object — Extra information that is not part of the main data, e.g. headers.
    - `headers` object — If carrying out a REST request, this will contain the response headers.
    - `raw` string — The raw query response, as a string.
  - `pagination` object — If pagination is supported, this will contain the bookmark/anchor information for it.

---

[API](https://skmtc.net/budibase/apis/budibase-api.md) · [All operations](https://skmtc.net/budibase/apis/budibase-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/budibase/budibase-api/revisions/9c6f16fc652b/schema)
