Skip to main content
Predefined queries let you create named queries that can be executed via public endpoints without authentication. Define a query once with optional parameters, then expose it as a public API for frontend apps or third-party consumers.

Creating a Predefined Query

Use client.createQuery() to define a named query with an optional set of parameters.

Parameter Options

Each entry in the parameters array accepts:

Advanced Options

createQuery also supports optional metadata fields for documentation purposes:

Executing a Query

Use client.executeQuery() to run a predefined query. This calls a public endpoint — no authentication is required.
The response follows the QueryDataResponse format:

Public API Endpoint

Under the hood, executeQuery calls:
This endpoint requires no API key, so you can call it directly from a browser or any HTTP client.

Managing Queries

List All Queries

Each QueryDefinition includes:

Get a Single Query

Delete a Query

Use Cases

  • Public API endpoints — Expose curated data from your collections without sharing app keys.
  • Parameterized queries for frontends — Let client-side code fetch data with query parameters, while the server controls the base query shape and accessible fields.
  • Rate-limited data access — Provide controlled read access to third parties without granting full API credentials.
  • Versioned queries — Use the version parameter to maintain backward compatibility when updating query logic.

Next Steps

SQL Interface

Query and insert data using SQL syntax

Query Builder

Fluent query API with type-safe conditions