Keen Saved Queries API

The Keen Saved Queries API enables developers to create and manage reusable query definitions. Saved queries store query parameters as named resources that can be retrieved and executed later, enabling consistent analytics across applications and simplifying the management of complex query configurations.

Operations 5

GET /projects/{projectId}/queries/saved Keen List saved queries #
GET /projects/{projectId}/queries/saved/{queryName} Keen Get a saved query #
PUT /projects/{projectId}/queries/saved/{queryName} Keen Create or update a saved query #
DELETE /projects/{projectId}/queries/saved/{queryName} Keen Delete a saved query #
GET /projects/{projectId}/queries/saved/{queryName}/result Keen Run a saved query #

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/saved-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

keen-saved-queries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keen Cached Queries Saved Queries API
  description: The Keen Cached Queries API allows developers to create, manage, and retrieve pre-defined queries that are automatically refreshed on a schedule. Cached queries improve performance for frequently accessed analytics by storing pre-computed results, making them ideal for powering dashboards and embedded analytics experiences without incurring per-request rate limits.
  version: '3.0'
  contact:
    name: Keen Support
    url: https://keen.io/support
  license:
    name: Proprietary
    url: https://keen.io/terms-of-service
servers:
- url: https://api.keen.io/3.0
  description: Keen production API
security:
- masterKey: []
- readKey: []
tags:
- name: Saved Queries
  description: Create, manage, and execute reusable saved queries.
paths:
  /projects/{projectId}/queries/saved:
    parameters:
    - $ref: '#/components/parameters/projectId'
    get:
      operationId: listSavedQueries
      summary: Keen List saved queries
      description: Returns the list of saved queries defined for the project. Requires a Master Key.
      tags:
      - Saved Queries
      responses:
        '200':
          description: List of saved query metadata.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SavedQuery'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /projects/{projectId}/queries/saved/{queryName}:
    parameters:
    - $ref: '#/components/parameters/projectId'
    - $ref: '#/components/parameters/queryName'
    get:
      operationId: getSavedQuery
      summary: Keen Get a saved query
      description: Returns the definition of a single saved query.
      tags:
      - Saved Queries
      responses:
        '200':
          description: Saved query definition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedQuery'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Saved query not found.
    put:
      operationId: createOrUpdateSavedQuery
      summary: Keen Create or update a saved query
      description: Creates a new saved query or updates an existing one with the given name. Requires a Master Key.
      tags:
      - Saved Queries
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavedQueryDefinition'
      responses:
        '201':
          description: Saved query created or updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedQuery'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: deleteSavedQuery
      summary: Keen Delete a saved query
      description: Removes a saved query from the project. Requires a Master Key.
      tags:
      - Saved Queries
      responses:
        '204':
          description: Saved query deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /projects/{projectId}/queries/saved/{queryName}/result:
    parameters:
    - $ref: '#/components/parameters/projectId'
    - $ref: '#/components/parameters/queryName'
    get:
      operationId: runSavedQuery
      summary: Keen Run a saved query
      description: Executes the saved query and returns its result. Requires a Read Key.
      tags:
      - Saved Queries
      responses:
        '200':
          description: Saved query result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result: {}
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SavedQueryDefinition:
      type: object
      required:
      - query
      properties:
        query:
          type: object
          additionalProperties: true
          description: Underlying query definition (analysis type and parameters).
        metadata:
          type: object
          additionalProperties: true
          description: Optional metadata for the saved query.
    Error:
      type: object
      properties:
        error_code:
          type: string
        message:
          type: string
    SavedQuery:
      allOf:
      - $ref: '#/components/schemas/SavedQueryDefinition'
      - type: object
        properties:
          query_name:
            type: string
          last_modified_date:
            type: string
            format: date-time
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    queryName:
      name: queryName
      in: path
      required: true
      schema:
        type: string
      description: Name of the saved query.
    projectId:
      name: projectId
      in: path
      required: true
      schema:
        type: string
      description: Keen project identifier.
  securitySchemes:
    masterKey:
      type: apiKey
      in: header
      name: Authorization
      description: Keen Master Key for management endpoints.
    readKey:
      type: apiKey
      in: header
      name: Authorization
      description: Keen Read Key for retrieving cached results.
externalDocs:
  description: Keen Cached Queries API Documentation
  url: https://keen.io/docs/api/#cached-queries