Get the latest sync cursor
One small request for clients that poll: it returns the cursor a full sync would end at. Fetch
/v1/sync only when it differs from the cursor you hold. It follows item changes only (list changes do
not move it).
bearerAuthorizationBearer <token>A personal API key (ga_…), sent as Authorization: Bearer ga_…. A key gets 403 on a resource it has no access to, and on anything that changes data without write access.
The latest cursor ("0" when the user has no items)
application/json- response
cursor*stringcurl -X GET 'https://example.com/v1/sync/head'{ "cursor": "1024"}Get what changed since last time GET
Returns the items changed after `cursor` (oldest first) and the ids of items deleted after it. Save `next_cursor` and call again while `has_more` is true. Start with cursor 0.
Search items GET
Finds items by keywords, by meaning (when embeddings are configured), by exact tag, object and colour matches, and by near-miss title spellings, then merges the results into one ranking. `q` takes free text plus operators. Put `-` in front of an operator to leave out what it matches. - `type:` the kind of item (aliases such as `website` for links and `snippet` for quotes work too); `format:pdf` is `type:pdf` - `tag:`, `domain:`, `object:` a tag, a site, or something the AI saw in an image. `site:youtube`, without a TLD, matches youtube.com, youtube.co.uk and their subdomains - `color:` a colour word such as `blue`, or a hex colour such as `#3b82f6` (finds images with a swatch near it) - `card:` article, product, recipe, book, film, series, music, video, place, ticket or trip - `text:` words that must appear in the text, with no matching by meaning - `"a phrase"` in the free text must appear, as with `text:`, and still counts towards the ranking - `is:favourite`, `is:archived`, and `is:done` or `is:open` for to-dos - `after:`, `before:` and `date:` for when it was saved. `date:` takes YYYY, YYYY-MM, YYYY-MM-DD, today, yesterday, this-week, last-week, this-month, last-month, this-year or last-year (UTC), or a day by its month's name: `date:may-19`, `date:"19th may"`, `date:may-19-2024` (without a year, the most recent one that is not in the future) - `-word` and `-"a phrase"` leave out items that contain it - `a || b` finds what either side finds, in one ranking (`tag:cats || tag:dogs`); up to 4 alternatives, each with its own words and operators A query can use up to 12 operators, exclusions and quoted phrases, over all its alternatives. Without free text, matching items are listed newest first with a score of 0. With a hex colour they are listed closest colour first. See docs/SEARCH.md. With `explain=true` each hit carries `match` (see `Match`): the ranked lists the item came from, the tag, object or colour word that matched, and a plain-text snippet. It is worked out in the ranking query itself, over the page of hits, not with a request per hit. Without free text nothing is ranked, so `match` lists the filters that admitted the item (`tag:`, `object:`, `color:`, `domain:`, `text:`) and is left out when there are none of those.