Budibase Queries API

Execute and search queries.

Operations 4

GET /queries Search for queries #
POST /queries/{id}/execute Execute a query #
POST /queries/{queryId} Execute a query #
POST /queries/search Search for queries #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/budibase:budibase-queries-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

budibase-queries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Budibase Queries API
  version: '1.0'
  description: 'Operations tagged Queries across 2 of this provider''s published API definitions: budibase-openapi.yml, budibase-queries-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://budibase.app/api/public/v1
  description: Budibase Cloud Public API
- url: https://{selfhosted}/api/public/v1
  description: Self-hosted Budibase
  variables:
    selfhosted:
      default: budibase.example.com
      description: Hostname of the self-hosted Budibase instance
tags:
- name: Queries
  description: Execute and search queries.
paths:
  /queries:
    get:
      tags:
      - Queries
      summary: Search for queries
      operationId: searchQueries
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NameSearch'
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Query'
      security:
      - apiKeyAuth: []
    servers:
    - url: https://budibase.app/api/public/v1
      description: Budibase Cloud Public API
    - url: https://{selfhosted}/api/public/v1
      description: Self-hosted Budibase
      variables:
        selfhosted:
          default: budibase.example.com
          description: Hostname of the self-hosted Budibase instance
  /queries/{id}/execute:
    parameters:
    - $ref: '#/components/parameters/IdPath'
    post:
      tags:
      - Queries
      summary: Execute a query
      operationId: executeQuery
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                parameters:
                  type: object
                  additionalProperties: true
                pagination:
                  type: object
      responses:
        '200':
          description: Query result
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
      security:
      - apiKeyAuth: []
    servers:
    - url: https://budibase.app/api/public/v1
      description: Budibase Cloud Public API
    - url: https://{selfhosted}/api/public/v1
      description: Self-hosted Budibase
      variables:
        selfhosted:
          default: budibase.example.com
          description: Hostname of the self-hosted Budibase instance
  /queries/{queryId}:
    servers:
    - url: https://budibase.app/api/public/v1
      description: Budibase Cloud API
      variables:
        apiKey:
          default: <user API key>
          description: The API key of the user to assume for API call.
        appId:
          default: <App ID>
          description: The ID of the app the calls will be executed within the context of, this should start with app_ (production) or app_dev (development).
    post:
      operationId: queryExecute
      summary: Execute a query
      description: Queries which have been created within a Budibase app can be executed using this,
      tags:
      - Queries
      parameters:
      - $ref: '#/components/parameters/queryId'
      - $ref: '#/components/parameters/appId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/executeQuery'
      responses:
        '200':
          description: Returns the result of the query execution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/executeQueryOutput'
              examples:
                REST:
                  $ref: '#/components/examples/restResponse'
                SQL:
                  $ref: '#/components/examples/sqlResponse'
      security:
      - ApiKeyAuth: []
  /queries/search:
    servers:
    - url: https://budibase.app/api/public/v1
      description: Budibase Cloud API
      variables:
        apiKey:
          default: <user API key>
          description: The API key of the user to assume for API call.
        appId:
          default: <App ID>
          description: The ID of the app the calls will be executed within the context of, this should start with app_ (production) or app_dev (development).
    post:
      operationId: querySearch
      summary: Search for queries
      description: Based on query properties (currently only name) search for queries.
      tags:
      - Queries
      parameters:
      - $ref: '#/components/parameters/appId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/nameSearch'
      responses:
        '200':
          description: Returns the queries found based on the search parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/querySearch'
              examples:
                queries:
                  $ref: '#/components/examples/queries'
      security:
      - ApiKeyAuth: []
components:
  schemas:
    Query:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        datasourceId:
          type: string
        queryVerb:
          type: string
        parameters:
          type: array
          items:
            type: object
    NameSearch:
      type: object
      properties:
        name:
          type: string
        paginate:
          type: boolean
        bookmark:
          type: string
        sort:
          type: object
          properties:
            order:
              type: string
              enum:
              - ascending
              - descending
            type:
              type: string
              enum:
              - string
              - number
    querySearch:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              _id:
                description: The ID of the query.
                type: string
              datasourceId:
                description: The ID of the datasource the query belongs to.
                type: string
              parameters:
                description: The bindings which are required to perform this query.
                type: array
                items:
                  type: string
              fields:
                description: The fields that are used to perform this query, e.g. the sql statement
                type: object
              queryVerb:
                description: The verb that describes this query.
                enum:
                - create
                - read
                - update
                - delete
              name:
                description: The name of the query.
                type: string
              schema:
                description: The schema of the data returned when the query is executed.
                type: object
              transformer:
                description: The JavaScript transformer function, applied after the query responds with data.
                type: string
              readable:
                description: Whether the query has readable data.
                type: boolean
            required:
            - name
            - schema
            - _id
      required:
      - data
    executeQueryOutput:
      type: object
      properties:
        data:
          description: The data response from the query.
          type: array
          items:
            type: object
        extra:
          description: Extra information that is not part of the main data, e.g. headers.
          type: object
          properties:
            headers:
              description: If carrying out a REST request, this will contain the response headers.
              type: object
            raw:
              description: The raw query response, as a string.
              type: string
        pagination:
          description: If pagination is supported, this will contain the bookmark/anchor information for it.
          type: object
      required:
      - data
    executeQuery:
      description: The parameters required for executing a query.
      type: object
      properties:
        parameters:
          type: object
          description: This contains the required parameters for the query, this depends on query type, setup and bindings.
          additionalProperties:
            description: Key value properties of any type, depending on the query output schema.
        pagination:
          type: object
          description: For supported query types (currently on REST) pagination can be performed using these properties.
          properties:
            page:
              type: string
              description: The page which has been returned from a previous query.
            limit:
              type: number
              description: The number of rows to return per page.
    nameSearch:
      type: object
      properties:
        name:
          type: string
          description: The name to be used when searching - this will be used in a case insensitive starts with match.
      required:
      - name
  parameters:
    IdPath:
      name: id
      in: path
      required: true
      schema:
        type: string
    queryId:
      in: path
      name: queryId
      required: true
      description: The ID of the query which this request is targeting.
      schema:
        type: string
    appId:
      in: header
      name: x-budibase-app-id
      required: true
      description: The ID of the app which this request is targeting.
      schema:
        default: '{{appId}}'
        type: string
  examples:
    sqlResponse:
      value:
        data:
        - personid: 1
          lastname: Hughes
          firstname: Mike
          address: 123 Fake Street
          city: Belfast
        - personid: 2
          lastname: Smith
          firstname: John
          address: 64 Updown Road
          city: Dublin
    restResponse:
      value:
        data:
        - value: <html lang='en-GB'></html>
        pagination:
          cursor: '2'
        raw: <html lang='en-GB'></html>
        headers:
          content-type: text/html; charset=ISO-8859-1
    queries:
      value:
        data:
        - _id: query_datasource_plus_4d8be0c506b9465daf4bf84d890fdab6_454854487c574d45bc4029b1e153219e
          datasourceId: datasource_plus_4d8be0c506b9465daf4bf84d890fdab6
          parameters: []
          fields:
            sql: select * from persons
          queryVerb: read
          name: Help
          schema:
            personid:
              name: personid
              type: string
            lastname:
              name: lastname
              type: string
            firstname:
              name: firstname
              type: string
            address:
              name: address
              type: string
            city:
              name: city
              type: string
          transformer: return data
          readable: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-budibase-api-key
      description: API key generated from the Budibase portal user dropdown menu.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-budibase-api-key
      description: Your individual API key, this will provide access based on the configured RBAC settings of your user.
x-refined-from:
- budibase-openapi.yml
- budibase-queries-api-openapi.yml