Triplit · Schema

Triplit Collection Query

A query object used to fetch entities from a Triplit collection

DatabaseReal-TimeSyncLocal-FirstDeveloper ToolsTypeScriptOpen-Source

Properties

Name Type Description
collectionName string The name of the collection to query
select array Fields to include in the result. If omitted, all fields are returned.
where array Filter conditions. Each item is a [field, operator, value] triple.
order array Sort order. Each item is a [field, direction] pair.
limit integer Maximum number of results to return
after array Pagination cursor. Contains the values of the last order-by fields.
View JSON Schema on GitHub

JSON Schema

triplit-collection-query-schema.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.triplit.dev/schemas/collection-query",
  "title": "Triplit Collection Query",
  "description": "A query object used to fetch entities from a Triplit collection",
  "type": "object",
  "required": ["collectionName"],
  "properties": {
    "collectionName": {
      "type": "string",
      "description": "The name of the collection to query",
      "example": "todos"
    },
    "select": {
      "type": "array",
      "description": "Fields to include in the result. If omitted, all fields are returned.",
      "items": {
        "type": "string"
      },
      "example": ["id", "text", "completed"]
    },
    "where": {
      "type": "array",
      "description": "Filter conditions. Each item is a [field, operator, value] triple.",
      "items": {
        "type": "array",
        "minItems": 3,
        "maxItems": 3,
        "prefixItems": [
          { "type": "string", "description": "Field name" },
          {
            "type": "string",
            "description": "Comparison operator",
            "enum": ["=", "!=", "<", "<=", ">", ">=", "like", "nlike", "in", "nin", "has", "!has", "isDefined"]
          },
          { "description": "Comparison value" }
        ]
      },
      "example": [["completed", "=", false]]
    },
    "order": {
      "type": "array",
      "description": "Sort order. Each item is a [field, direction] pair.",
      "items": {
        "type": "array",
        "minItems": 2,
        "maxItems": 2,
        "prefixItems": [
          { "type": "string", "description": "Field name" },
          { "type": "string", "enum": ["ASC", "DESC"], "description": "Sort direction" }
        ]
      },
      "example": [["createdAt", "DESC"]]
    },
    "limit": {
      "type": "integer",
      "description": "Maximum number of results to return",
      "minimum": 1,
      "example": 20
    },
    "after": {
      "type": "array",
      "description": "Pagination cursor. Contains the values of the last order-by fields.",
      "items": {}
    }
  },
  "additionalProperties": false
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/triplit-collection-query"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

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

Get an API key

Free tier, no email required.

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