2026-03-07 17:11:15 -06:00
2026-03-07 17:11:15 -06:00
2026-03-07 17:11:15 -06:00
2026-03-07 17:11:15 -06:00

Zotero JS Bridge

A Zotero plugin that exposes Zotero's internal JavaScript API as an HTTP API. This allows an external program to easily call and automate tasks like "Find Full Text", "Export file", reading items, and modifying collections directly from outside Zotero.

Caution

SECURITY WARNING: The /execute endpoint provided by this plugin allows for the execution of arbitrary JavaScript code within Zotero's internal environment.

Because Zotero's HTTP server does not currently provide authentication mechanisms, any application or script running locally on your machine can execute code and access, modify, or delete your Zotero data. This plugin is intended strictly for local development, automation, and specific integrations in trusted environments. Do not expose your local Zotero HTTP port to untrusted networks.

Endpoints

By default, Zotero's built-in HTTP server runs on port 23119. You can make POST requests to the following endpoints:

/zotero-js-bridge/execute

Executes arbitrary JavaScript within Zotero's context.

Request: POST http://127.0.0.1:23119/zotero-js-bridge/execute Body:

{
  "code": "return await Zotero.Items.getAll();"
}

/zotero-js-bridge/findPDFsForItems

A specialized endpoint to trigger Zotero's "Find Available PDFs" feature for a specific list of item IDs.

Request: POST http://127.0.0.1:23119/zotero-js-bridge/findPDFsForItems Body:

{
  "itemIds": [123, 124, 125]
}

Development

  • manifest.json: Zotero plugin manifest.
  • bootstrap.js: Handles plugin lifecycle and endpoint registration.
Description
No description provided
Readme 27 KiB