When the Zotero desktop application is running, it exposes a local HTTP server atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/zotero/zotero-connectors/llms.txt
Use this file to discover all available pages before exploring further.
http://127.0.0.1:23119/connector/. Zotero Connectors use this server to save items, transfer snapshots, sync translator lists, and coordinate Google Docs citation integration. All communication is local-only — the server binds exclusively to the loopback interface and is not reachable from other machines.
The connector version of this API is
3, set in connector.js as CONNECTOR_API_VERSION = 3. All requests must include the X-Zotero-Connector-API-Version: 3 header. If the connector and desktop versions are incompatible, the server returns HTTP 412.Base URL
connector.url preference (primarily for testing), but in normal operation is always the address above.
Required Request Headers
Every request to the connector HTTP server must include the following headers:application/json for JSON bodies, multipart/form-data for SingleFile snapshot uploads.The connector’s own version string (e.g.,
5.0.100). The server echoes back the Zotero desktop version in the X-Zotero-Version response header.Must be
3. A mismatch returns HTTP 412.Calling from the Connector
Within the extension source, all HTTP calls to Zotero desktop go throughZotero.Connector.callMethod, which handles header injection, JSON serialization, online state tracking, and error classification automatically:
Endpoints
POST /connector/ping
Checks whether Zotero is running and retrieves current preferences. The connector calls this on startup and periodically to detect when Zotero comes online or goes offline. The request body is always a JSON object (even if empty), socallMethod always issues a POST.
Request body (always sent; activeURL is included only when reportActiveURL pref is true):
200 OK:
Whether Zotero is configured to download associated files (PDFs, etc.) when saving items.
Whether Zotero wants the connector to report the currently active browser tab URL on each ping.
Whether Zotero automatically saves a snapshot when saving a web page item.
Whether the Google Docs “Add Annotation” feature is enabled in Zotero.
Whether the Google Docs Citation Explorer feature is enabled in Zotero.
Whether the running Zotero version supports the attachment upload workflow.
Whether the running Zotero version supports tag autocomplete in the save dialog.
Whether the current Zotero user has permission to add notes.
MD5/SHA hash of Zotero’s current translator set. The connector compares this to its own hash; a mismatch triggers
Translators.updateFromRemote().Sorted variant of
translatorsHash, used when the running Zotero version supports sorted hashing.X-Zotero-Version response header contains the Zotero desktop application version string, which the connector stores as Zotero.Connector.clientVersion.
POST /connector/saveItems
Saves one or more translated bibliographic items to the Zotero library. This is the primary save endpoint invoked after a translator extracts metadata from a webpage. Request body:Array of Zotero item objects in the internal item format. Each object must include at minimum an
itemType field.The URL of the page from which items were saved. Used by Zotero to set up the cookie sandbox for attachment downloads.
Newline-separated cookie strings in the format
name=value;Domain=...;Path=.... Provided by callMethodWithCookies when the connector has cookie access. If present, the cookie field is omitted.Simple cookie string, used when detailed cookies are not available.
201 Created on success (body varies by Zotero version).
POST /connector/saveSnapshot
Saves a snapshot of a webpage to Zotero. Used when the user manually triggers a snapshot save or whenautomaticSnapshots is enabled.
Request body:
The URL of the page being snapshotted.
The full HTML content of the page to save as a snapshot attachment.
Cookie string for the page, used when Zotero fetches related resources.
201 Created on success.
POST /connector/saveSingleFile
Saves a full-page archive captured by the SingleFile library. This endpoint acceptsmultipart/form-data because the snapshot content is binary. It is invoked after SingleFile has compressed the page into a self-contained HTML file.
Request: Content-Type: multipart/form-data
Form fields include the serialized item data and one or more binary-* fields containing binary page content as Blob objects. In the background, Uint8Array data is converted to Blob instances before being appended to FormData.
On Chromium (both MV2 and MV3), SingleFile snapshot content may be chunked via
Zotero.Messaging.sendAsChunks before the message is routed to the background. The background reassembles chunks with Zotero.Messaging.getChunkedPayload before forwarding to Zotero desktop. See the Connector.saveSingleFile message entry for details.201 Created on success.
POST /connector/getTranslatorCode
Returns the JavaScript source code for a specific translator. The translator ID is sent as a JSON body (not a query string), socallMethod issues a POST request.
Request body:
The UUID of the translator whose code should be returned (e.g.,
951c027d-74ac-47d4-a107-9c3069ab7b48).200 OK: The raw JavaScript source of the translator as text/plain or application/javascript.
POST /connector/document/execCommand
Google Docs integration: instructs Zotero to execute a citation-related command within the document context. This is the primary command channel used by the Google Docs content script to invoke Zotero citation operations. Request body:The citation command to execute. Common values include
addEditCitation, addEditBibliography, refresh, complete.The Google Docs document ID from the document URL.
POST /connector/document/respond
Sends a response back to Zotero during an ongoing Google Docs integration operation. Zotero’s document integration is a synchronous request-response protocol: Zotero issues a command, the connector responds, and the cycle continues until Zotero sendscomplete.
Request body:
The response payload varies by the preceding command. It can be a JSON string, an empty string "", or an error object:
complete to signal the operation is finished.
If the Google Docs tab is closed or discarded while an integration operation is in progress, the connector automatically sends a
Tab Not Available Error response and continues draining the command queue until Zotero signals complete, allowing Zotero to clean up gracefully.Error Handling
Status 0 — Zotero Offline
The XHR returned status 0, meaning Zotero is not running or the connection was refused. The connector sets
Zotero.Connector.isOnline = false and throws a CommunicationError.Status 412 — API Version Mismatch
The connector and Zotero desktop versions are incompatible.
Zotero.Connector_Browser.onIncompatibleStandaloneVersion is invoked with both version strings to display a user-facing prompt.Status 4xx/5xx — Method Error
A method-specific failure. The response body (if JSON) is available as
error.value. The method name and status are logged.Timeout
Default timeout is 15,000 ms. Override per-call with
options.timeout. Set timeout: false for operations that may take an indefinite time (e.g., document/respond during integration).CommunicationError
All connector errors are instances ofZotero.Connector.CommunicationError:
Further Reading
Connector HTTP Server
Official Zotero documentation for the connector HTTP server protocol, including details on item formats and the full server-side implementation.
Zotero Web API v3
Reference for the Zotero cloud API used by
Zotero.API methods (createItem, uploadAttachment) when Zotero desktop is not available.