Axsync API v2

Search

Full-text search over titles, bodies and tags with typo tolerance and highlighted snippets.

The search object

FieldTypeDescription
querystringSearch text.
hitsobject[]Matching notes with snippets.
totalintegerTotal matches.
took_msintegerServer 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.

Required scope: notes:read

Body parameters

FieldTypeDescription
querystringSearch text.
hitsobject[]Matching notes with snippets.
totalintegerTotal matches.
took_msintegerServer 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.

Required scope: notes:read

Query parameters

FieldTypeDescription
limitintegerPage size, 1–100. Default 25.
cursorstringCursor from the previous page.
sortstringField to sort by, prefix - for descending.
filterstringFilter 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
}