query_records
List and search records in a record_type. Supports exact filtering, fuzzy text search, sorting, and pagination via the Filter DSL. Use the `search` operator on a field to match approximate values when you don't have the exact stored string (e.g. {"field":"data.car_model","op":"search","value":"honda civic"}); results come back ranked by closeness with a `_search_score`. Combine `search` with exact operators (eq/in/gte/...) in the same filter to narrow first, then rank.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base_id | string | Yes | Target database ID |
record_type | string | Yes | RecordType to query |
external_source | string | No | For a record_type backed by an external source, the source name to list from (rows live in that upstream). Omit for native record_types. |
filter | object | No | Expected the Filter DSL: a condition {"field":"data.<field>","op":"<op>","value":<value>} or an and/or group {"and":[...]} / {"or":[...]}. Operators: eq, neq, gt, gte, lt, lte, in, not_in, like, ilike, search, is_null, is_not_null, has. Example: {"field":"data.specialties","op":"has","value":"Cardiologia"}. Datetimes: pass an ISO-8601 value (e.g. "2026-06-11T13:00:00-03:00", "...Z", or "2026-06-11 13:00:00"). eq/neq/in/not_in and gt/gte/lt/lte match datetimes by instant, so the exact representation (T vs space, with/without offset) does not affect the result; a naive value with no offset is read in the record_type timezone. Use eq for an exact datetime (not like, which is substring-only). Mongo-style filters (e.g. {"data.field":"value"} or {"field":{"$in":[...]}}) are NOT supported. |
sort | array | No | Expected a JSON array of sort terms: [{"field":"data.<field>","direction":"asc"|"desc"}]. Example: [{"field":"data.created_at","direction":"desc"}]. A shorthand string like "data.name:asc" is NOT supported. Omit when using `search` to rank by relevance. |
fields | array | No | Projection — return only these fields (plus _search_score when searching) |
limit | number | No | |
offset | number | No |