Skip to content
Skip to Content
DevelopersAPI referenceItems

Get where the caller stopped reading an item

GET
/v1/items/{id}/progress

Each reader has their own place: the item's owner, and the owner or accepted members of a list the item is in. Anyone else gets 404, as for a deleted item. An API key needs read access to items.

Authorization

bearer
headerAuthorizationBearer <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.

Path Parameters

id*string

Response Body

The saved place, or offset 0 with nulls when none was saved

application/json
  1. response
item_id*string
offset*integer

Character offset into the item's text. 0 when nothing was saved.

Range0 <= value
anchor*|

A short passage at the offset, to find the place again if the text changes.

Lengthlength <= 500
percent*|
Range0 <= value <= 100
progress*|

How far through the item the reader is, as a fraction. The same measure as percent, kept at full precision; null when the client that saved the place sent neither.

Range0 <= value <= 1
updated_at*|

When it was saved; null when it never was.

Formatdate-time
Example Request
curl -X GET 'https://example.com/v1/items/string/progress'
Example Response
{  "item_id": "string",  "offset": 0,  "anchor": "string",  "percent": 0,  "progress": 0,  "updated_at": "2019-08-24T14:15:22Z"}

Turn a note, quote or highlight into a link and capture its page POST

For a note, quote or highlight that has a `url`. In one step the item becomes a link (`kind` `link`, `card` cleared so the AI classifies the page afresh), its page is crawled (`crawl_status` `pending`) and a screenshot and full-page archive are queued. The text body is moved into `note` (below any existing note, after a blank line), never dropped; the title, description, author, tags, lists, reminders and the rest stay. A link is simply archived, as `archiveItem` does (including its 409 `item.crawl_in_progress` while the crawl is pending, and the no-op for a capture already in flight); `capture_status` is `pending` in the response. 422 `item.not_convertible` for any other kind, or an item with no full http(s) `url`; 422 when the user already has another item with the same page; 402 when the plan has no archives (checked first, so the item is left as it was). Returns at once; `item.updated` and `asset.attached` follow as the crawl and capture finish, and a failure leaves a link with a failed crawl.

Save where the caller stopped reading an item PUT

Replaces the caller's place in the item (the last save wins; `anchor`, `percent` and `progress` left out are cleared). Send `offset`, `progress` or both. `progress` (0 to 1) and `percent` (0 to 100) are one measure: the one you leave out is derived from the other. With `progress` and no `offset`, the offset is that fraction of the item's text, so a client that reads offsets lands in the same place. Clients should debounce saves (a few seconds after scrolling stops). A re-crawl that replaces the item's text clears every reader's place. Allowed while the library is read-only over its plan's limits. An API key needs write access to `items`.