Server-side Zotero translation based on Mozilla xpcshell
JavaScript Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
modules Update submodule Sep 6, 2016

Server-side Zotero translation using xpcshell

Currently supports import, export, and web translation


  1. git clone --recursive

  2. cd translation-server

  3. ./fetch_sdk

  4. ./


  1. Run the server:

    $ build/ 
    zotero(3)(+0000000): HTTP server listening on *:1969
  2. Try a query!

    $ curl -d '{"url":"","sessionid":"abc123"}' \
          --header "Content-Type: application/json" \


Docker Container

  1. docker build -t translation-server -f Dockerfile .
  2. docker run --rm -p 1969:1969 --name translation-server-container translation-server


Supported endpoints are: /web, /import, /export, and /refresh.

Read server_translation.js for more information.

Web Translators

Translates a web page

  • endpoint: /web
  • request method: POST
  • request body: JSON object containing a url and a random sessionid
  • example:
curl -X POST --header 'Content-Type: application/json' -d '{
  "url": "",
  "sessionid": "abc123"
}' 'http://localhost:1969/web'

Import Translators

Converts input in any format Zotero can import (RIS, BibTeX, etc.) to items in Zotero API JSON format

  • endpoint: /import
  • request method: POST
  • request body: item data in a supported format
  • example:
curl -X POST -d 'TY  - JOUR
TI  - Die Grundlage der allgemeinen Relativitätstheorie
AU  - Einstein, Albert
PY  - 1916
SP  - 769
EP  - 822
JO  - Annalen der Physik
VL  - 49
ER  -' 'http://localhost:1969/import'

Export Translators

Converts items in Zotero API JSON format to a supported export format (RIS, BibTeX, etc.)

  • endpoint: /export
  • request method: POST
  • query parameter: format, which must be a supported export format
  • request body: An array of items in Zotero API JSON format


To run the tests, go to the translation-server directory and run:

./build/ -test /path/to/file/output.JSON