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
| Name | Type | Description |
|---|---|---|
| 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 "https://cotlet.dev/api/v1/zotero/annotations?item_key=item+key" \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("zotero", "get_annotations", {"item_key":"item key"}) const result = await cotlet.call('zotero', 'get_annotations', {"item_key":"item key"}); cotlet call zotero get_annotations --data '{"item_key":"item key"}' Example response
{
"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."
}
]
}