Search
Full-text search over titles, bodies and tags with typo tolerance and highlighted snippets.
The search object
| Field | Type | Description |
|---|---|---|
query | string | Search text. |
hits | object[] | Matching notes with snippets. |
total | integer | Total matches. |
took_ms | integer | Server processing time. |
Example
{
"query": "sync beta",
"hits": [],
"total": 7,
"took_ms": 11
}POST /search
Search notes. Runs a search with optional filters on notebook, tags, and date range.
Body parameters
| Field | Type | Description |
|---|---|---|
query | string | Search text. |
hits | object[] | Matching notes with snippets. |
total | integer | Total matches. |
took_ms | integer | Server processing time. |
Request
curl -X POST "https://api.axnode.net/v2/search" \
-H "Authorization: Bearer $AXSYNC_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query": "sync beta", "hits": []}'const res = await fetch('https://api.axnode.net/v2/search', {
method: 'POST',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"query": "sync beta", "hits": []})
});
const data = await res.json();import requests
res = requests.post(
'https://api.axnode.net/v2/search',
headers={'Authorization': f'Bearer {token}'}, json={"query": "sync beta", "hits": []},
)
data = res.json()Response 201
{
"query": "sync beta",
"hits": [],
"total": 7,
"took_ms": 11
}GET /search/suggest
Suggest completions. Returns up to ten tag and title completions for a prefix.
Query parameters
| Field | Type | Description |
|---|---|---|
limit | integer | Page size, 1–100. Default 25. |
cursor | string | Cursor from the previous page. |
sort | string | Field to sort by, prefix - for descending. |
filter | string | Filter expression, see Filtering and sorting. |
Request
curl -X GET "https://api.axnode.net/v2/search/suggest" \
-H "Authorization: Bearer $AXSYNC_TOKEN"const res = await fetch('https://api.axnode.net/v2/search/suggest', {
method: 'GET',
headers: { Authorization: `Bearer ${token}` }
});
const data = await res.json();import requests
res = requests.get(
'https://api.axnode.net/v2/search/suggest',
headers={'Authorization': f'Bearer {token}'},
)
data = res.json()Response 200
{
"data": [
{
"query": "sync beta",
"hits": [],
"total": 7,
"took_ms": 11
}
],
"has_more": false,
"next_cursor": null
}