Skip to content
Go to Micro
Using the API

Querying

How to filter, sort, select, and paginate with the Micro API

All data in Micro is queried through a single endpoint:

POST /v2/prism/query/{teamId}/{objectType}

The request body contains a query object that describes what to fetch.

select is required. Pass an array of property slugs to return.

{
"query": {
"select": ["full_name", "email", "title"]
}
}

Use dot notation to traverse relationships:

{
"query": {
"select": ["full_name", "company.name", "company.primary_domain"]
}
}

filter is an array of conditions. Each condition is { slug: { operator: value } }.

{
"query": {
"select": ["full_name", "email"],
"filter": [
{ "labels": { "in": ["investor"] } },
{ "last_interaction_date": { ">=": "2024-01-01" } }
]
}
}
OperatorTypesDescription
=allExact match
!=allNot equal
< > <= >=number, dateComparison
instring, selectValue is in the array
not_instring, selectValue is not in the array
begins_withstringStarts with value
ends_withstringEnds with value
like_regexstringMatches regex pattern
not_containsstringDoes not contain value
existsanyField has a value
not_existsanyField has no value

By default filters are combined with AND. Use combinator to switch to OR:

{
"query": {
"select": ["full_name"],
"filter": [
{ "labels": { "in": ["investor"] } },
{ "labels": { "in": ["founder"] } }
],
"combinator": "OR"
}
}

sort is an array of { slug: direction } objects. Earlier items in the array take priority.

{
"query": {
"select": ["full_name", "last_interaction_date"],
"sort": [
{ "last_interaction_date": "desc" },
{ "full_name": "asc" }
]
}
}

Use limit to set page size (default: 25, max: 250) and page to paginate.

{
"query": {
"select": ["full_name"],
"limit": 100,
"page": 2
}
}

The response is an array. Use page to fetch the next set of results:

[
{
"id": "c1a2b3c4-...",
"properties": {
"full_name": "Sarah Chen",
"email": "sarah@example.com"
}
}
]

Pass crm_id to scope results to a specific CRM app (e.g. your fundraising pipeline vs. your investor network):

{
"query": {
"select": ["full_name", "stage"],
"crm_id": "your-crm-uuid"
}
}