Is there a JavaScript API to add a new item by DOI or arXiv ID?

I can add a new item by pasting in a DOI or arXiv ID through the UI, but can I also do this through JavaScript?

Since there is currently no way to update metadata for an item, the current solution is to add a new item by the DOI and then merge it with the previous one. I was thinking if making a plugin that would allow you to select a bunch of items, get the DOI field, and then add them all at once. This would save some time as opposed to copying the DOI fields manually one by one and pasting them in.

Does an API to do this exist? I didn't see one in the docs (https://www.zotero.org/support/dev/client_coding/javascript_api).
  • Also need this type of plugin to update items.
  • Through javascript inside Zotero you mean? This seems to be the incantation.
  • A built in update metadata function is forthcoming
  • @emilianoeheyns Thanks! I want to do this from a plugin, are those JavaScript APIs available in that execution context?

    @bwiernik Yes, I've been reading that for quite a while, but do you have an ETA on the functionality? If not, I don't mind putting together a plugin to make my life easier in the mean time, as long as the necessary APIs exist.

    If the APIs don't exist, I'm thinking of modifying my idea to just copy all the DOIs from the selected in entries in bulk, so I can add them all with one paste instead of individually.
  • I want to do this from a plugin, are those JavaScript APIs available in that execution context?
    Yes.
Sign In or Register to comment.