zotero standalone API docs?

101 views
Skip to first unread message

Erik Hetzner

unread,
Apr 2, 2011, 3:47:37 PM4/2/11
to zotero-dev
Hi,

Is there any documentation for the Zotero standalone API, if such a
beast exists? I assume there is a way for Chrome & Safari to
communicate with Zotero standalone.

I ask because I am exploring the possibility of extending zotero-plain
[1] to support standalone.

best, Erik

1. http://e6h.org/~egh/hg/zotero-plain/

Avram Lyon

unread,
Apr 2, 2011, 4:43:28 PM4/2/11
to zoter...@googlegroups.com
2011/4/2 Erik Hetzner <e...@e6h.org>:

> Is there any documentation for the Zotero standalone API, if such a
> beast exists? I assume there is a way for Chrome & Safari to
> communicate with Zotero standalone.

I also have my eyes on this as a useful way of talking with desktop
Zotero. Unless some docs appear from the depths of CHNM, the place to
look is /zotero/chrome/content/zotero/xpcom/connector.js, which has
the details of the web server on the Zotero/Firefox/XULRunner side,
and /connector/common/global_common.js on the Connector side. It's
implemented as server running at http://127.0.0.1:23119/translate/
that accepts POST messages of JSON data. More information on the
messages and responses can be gleaned from these two files.

The interface doesn't expose much data-- it can only be used to get
Zotero to ingest various items at this time (although it could be
exploited to force-feed items to Zotero, if you send it page source
and the translator ID-- that could be useful).

I'd like to see the possibility to read items back out from this
interface, and more, so that we'd have a local read-write interface to
the Zotero library. But that may be simply too much work for now...

Avram

Erik Hetzner

unread,
Apr 3, 2011, 12:18:12 AM4/3/11
to zoter...@googlegroups.com, Avram Lyon
At Sun, 3 Apr 2011 00:43:28 +0400,
Avram Lyon wrote:
>
> […]

>
> I'd like to see the possibility to read items back out from this
> interface, and more, so that we'd have a local read-write interface to
> the Zotero library. But that may be simply too much work for now...

Hi Avram,

Thanks for the information. Yes, it would be great if Zotero supported
this feature (that is, read access). Even better would be if it used
the same API as zotero.org. But I am not prepared to write that at the
moment, so I guess we will have to wait.

best, Erik

Avram Lyon

unread,
Apr 3, 2011, 1:26:25 AM4/3/11
to Erik Hetzner, zoter...@googlegroups.com
2011/4/3 Erik Hetzner <e...@e6h.org>:

> Thanks for the information. Yes, it would be great if Zotero supported
> this feature (that is, read access). Even better would be if it used
> the same API as zotero.org. But I am not prepared to write that at the
> moment, so I guess we will have to wait.

Worth noting, however, that Sebaastian Mathôt's Gnotero[1] includes a
Python library, libzotero,[2] that makes reading from the library
relatively easy. Still not the same as the server API, but still
something. Maybe Sebaastian (or one of us) would be interested in
adding write support to libzotero through the Connector interface.
That would hopefully also include adding a JSON import translator to
Zotero itself that could read the JSON that is quickly becoming the
standard representation of Zotero items.

Avram

_1: http://www.cogsci.nl/software/gnotero
_2: http://www.cogsci.nl/blog/tutorials/97-writing-a-command-line-zotero-client-in-9-lines-of-code

Reply all
Reply to author
Forward
0 new messages