API access to the last opened page of a pdf

69 views
Skip to first unread message

Folker H.

unread,
Feb 11, 2025, 2:12:46 PM2/11/25
to zotero-dev
Hello,

Is there a possibility to access via the REST API the last opened page of a pdf file?

When I open a document e.g. on my desktop and later on the android app, or on two different desktops, Zotero seems to synchronize my reading position. However, I couldn't find a way to access this position either in the API documentation or while playing around with the PyZotero wrapper.

My usecase would be that I would like to create a reading log, where I save which papers I have read in a week, whether I read them fully or not, and my progress on some larger documents. My idea was to have a script which queries daily for updates in the last opened page and these would correspond to read documents. At least as a first approximation.

Does anyone know whether it is possible to achieve this?

Greetings,
Folker

Abe Jellinek

unread,
Feb 11, 2025, 2:41:07 PM2/11/25
to zoter...@googlegroups.com
These are stored as settings (called SyncedSettings in the client). You can query them at https://api.zotero.org/users/[your user ID]/settings. Add a ?since=[version] parameter for subsequent queries. The keys you want look like lastPageIndex_[library]_[item key], where [library] is “u” for My Library, or “g” followed by the group ID for group libraries, and [item key] is the key of the attachment.

--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/zotero-dev/7b1d9aa2-5986-4555-a2b8-2ac93ddcd547n%40googlegroups.com.

Abe Jellinek

unread,
Feb 11, 2025, 2:44:31 PM2/11/25
to zoter...@googlegroups.com
And you can query directly by key, if you know what item you’re interested in, at https://api.zotero.org/users/[your user id]/settings/lastRead_[library]_[item key]

Folker H.

unread,
Feb 12, 2025, 12:04:36 PM2/12/25
to zotero-dev
Thank you, this was exactly what I was looking for!

Greetings,
Folker

Reply all
Reply to author
Forward
0 new messages