Querying & Filtering

All Rekord API endpoints that return resources support a standard set of querying capabilities. List endpoints support the full set; single-resource GETs support expand, include, and select.

Filtering

Use the filter query parameter to narrow results. The syntax is:

?filter[field][operator]=value

Operators

Operator
Description
Example

eq

Equals

?filter[status][eq]=active

neq

Not equals

?filter[status][neq]=archived

gt

Greater than

?filter[createdAt][gt]=2026-01-01T00:00:00Z

gte

Greater than or equal

?filter[annualIncome][gte]=50000

lt

Less than

?filter[annualIncome][lt]=100000

lte

Less than or equal

?filter[updatedAt][lte]=2026-06-30T23:59:59Z

in

In a set of values

?filter[status][in]=active,completed

contains

Contains substring

?filter[name][contains]=Jones

Filtering on dynamic fields

Records contain a data object with customer-defined fields. You can filter on these fields using the same syntax:

?filter[data.annualIncome][gte]=50000

The server validates that the referenced field exists in the model and that the operator is compatible with the field's type. For example, gt is valid on a number field but not on a boolean.

Operator compatibility by field type

Not all operators work with all field types. The table below shows which operators are valid for each type:

Operator

text

number / currency

boolean

date / datetime

enum

eq

neq

gt

gte

lt

lte

in

contains

Using an unsupported operator for a field type returns 422 Unprocessable Entity.

Combining filters

Multiple filters are combined with AND logic:

Expansion

Use expand to embed related resources in the response instead of making separate requests:

For example, expanding relationships on a record embeds the related records directly in the response.

Include

Use include to add metadata objects to the response. Unlike expand (which embeds related resources), include adds supplementary data about the resource itself.

Available include values:

Value
Description

modelContext

Adds field descriptions, types, resolution policies, contributor counts, and relationship topology. Useful for LLM consumers and UIs that need to understand the data shape.

version

Adds the monotonic version integer to the response body. Always available via the ETag header regardless.

Values can be combined: ?include=modelContext,version

Field selection

Use select to return a subset of fields, reducing response size:

Only the specified fields are included in the response. System fields like recordId and createdAt can be selected alongside data fields.

Last updated