To search one object by record name, and page through the results, use the search parameter of List records. To search across objects, use this endpoint.
GET
/search| Parameter | Rules |
|---|---|
q | Required, 1–100 characters. |
object | Optional object slug, to search only that object. |
It matches record names, email fields and phone fields that contain q, without regard to case. Exact name matches come first, then names that start with q, then the most recently updated. It returns at most 20 results and has no paging.
curl --fail-with-body "$JEMERO_URL/search?q=grace" \
-H "Authorization: Bearer $JEMERO_API_KEY"const url = new URL(`${process.env.JEMERO_URL}/search`);
url.search = new URLSearchParams({ q: 'grace' });
const response = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.JEMERO_API_KEY}` },
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log((await response.json()).results);import os
import requests
response = requests.get(
f"{os.environ['JEMERO_URL']}/search",
headers={"Authorization": f"Bearer {os.environ['JEMERO_API_KEY']}"},
params={"q": "grace"},
timeout=30,
)
response.raise_for_status()
print(response.json()["results"]){
"results": [
{
"id": "e1b83a4a-1363-4d45-a755-981a448cb410",
"label": "Grace Hopper",
"matched": null,
"imageUrl": null,
"object": {
"slug": "people",
"singularName": "Person",
"icon": "users",
"iconColor": null
}
}
]
}matched is the email or phone number that matched when the name didn't. Objects hidden from the sidebar aren't searched. To read a result, get the record by its id.