How to use API?

Hello,
I am new for Zotero. I have a project in my mind and want to integrate zotero to my plugin.
But I am a beginner and need to learn lot.
My question is:

How can I extract the bibliographic information from a web site.
Or in other words how to use Read API to get the atom data of an online article.


Thank you very much...
  • Zotero's API currently only allows access to user and group libraries-- it can't yet do anything with the bibliographic data embedded in other websites. That said, it will become possible in the relatively near future to send sites to the API for processing with site translators, much as Zotero (the desktop client) currently parses pages and pulls out bibliographic data.

    But for now, you can only use the API to read and write user and group libraries. If you have specific questions on how to implement Zotero API support in your plugin, try posting to the developer list at http://groups.google.com/group/zotero-dev
  • Thank you ajlyon:
    I am sorry to hear that we are not able to use such a function. However, you mentioned that Zotero (the desktop client) is able to do this. Can't I use/embed/integrate desktop version to my software/addon to extract data from a web site?

    Thank you
  • sure - Zotero's code is licensed under AGPL - you can find information on translators - the tools Zotero uses to extract information from webpages - here:
    http://www.zotero.org/support/dev/translators/documentation
  • If you're developing a piece of desktop software, you may be able to write it as a Firefox plugin and integrate with Zotero that way. Otherwise, the infrastructure for server-side translators, which I referred to, is currently being quite actively developed, and should be available in the next couple of months. You can follow the progress of this and other parts of Zotero by watching http://www.zotero.org/trac/timeline , and post any questions you have to zotero-dev. Note, however, that a program that embeds or otherwise builds on top of Zotero (like a Zotero plugin that reuses pieces of the Zotero codebase) is likely to be bound by the terms of Zotero's license-- that is, it will need to be licensed under the Affero GPL as well. Simple API usage would not ordinarily lead to the same requirement.
  • First of all thanks for your quick replies.
    I think I need to explain my question a bit more detailed.

    I want to write a firefox plugin, which requires to collect bibliographic information from the web page, article. It will store it in a database but not in Zotero. The plugin might be dependent to Zoteor and installation of zotero can be a prerequisite. But can I use any function of zotero in this plugin to extract data.

    For example, Zotero detects if a page contains a translatable article. And if it contains than there will be a small button on adress bar to import the bibliographic data to Zotero. I want to do similar thing but this time when I click a button it would take the bibliographic data then store it in a database with some additional information that I will enter...

    This a project about molecular biology and will be be licensed under the Affero GPL.

    Thanks for your answers.
  • edited July 11, 2011
    Your best bet is probably to look at browser.js (browser interface) and its interaction with translate.js (web/import/export/search translation interface). You will want to create a new instance of Zotero.Translate.Web, set some handlers, call the getTranslators() method to look for translators, and then call translate(false) to run translation without saving the resulting to the Zotero DB. Depending on what you want to do, however, it might be easier to have users save to a Zotero group, and then pull information from the Zotero group to your database using the read API.

    If you have further questions re: this topic, zotero-dev is a better place for them.
This discussion has been closed.