Get annotations

Highlights and comments made in the PDFs of an item, with color and page.

GET https://cotlet.dev/api/v1/zotero/annotations

read

Returns the annotations of every PDF attached to the item, in page order, each with its text, comment, color and page. Items without a PDF or without annotations return an empty list. It reads annotations only and never changes the PDF.

Parameters

Parameters: get_annotations
NameTypeDescription
library string string 'me' for My Library (default) or a group library ID from list_libraries.
item_key string required string Item key from search_items, 8 characters.

Request

cURL
curl "https://cotlet.dev/api/v1/zotero/annotations?item_key=item+key" \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("zotero", "get_annotations", {"item_key":"item key"})
Node.js
const result = await cotlet.call('zotero', 'get_annotations', {"item_key":"item key"});
CLI
cotlet call zotero get_annotations --data '{"item_key":"item key"}'

Example response

JSON

{
  "item_key": "H6R2VB5D",
  "annotations": [
    {
      "type": "highlight",
      "color": "yellow",
      "page": 4,
      "text": "Attention cost grows linearly with window size.",
      "comment": ""
    },
    {
      "type": "highlight",
      "color": "red",
      "page": 12,
      "text": "Evaluation uses one dataset.",
      "comment": "Check the appendix."
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.