No description
  • JavaScript 89.3%
  • HTML 4.6%
  • CSS 2.9%
  • Python 2.6%
  • Fluent 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Luca Zanussi 6c624548de Zotero Citations 1.2.0: clean up for publication
- Rename to Zotero Citations (plugin id zotero-citations@lck.sh) and
  enable automatic updates through updates.json in this repository.
- Split a run into one method per source; one result shape for all
  lookups; drop unused code.
- Tests: offline by default, --live for the real APIs; no personal data.
- build.py writes dist/ and records the build's SHA-256 in updates.json.
- README, CHANGELOG and MIT license.
2026-11-16 22:27:36 +01:00
content Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00
locale/en-US Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00
test Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00
.gitattributes Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00
.gitignore Citation Counts 1.1.0 2026-11-16 22:20:52 +01:00
bootstrap.js Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00
build.py Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00
CHANGELOG.md Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00
LICENSE Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00
manifest.json Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00
prefs.js Citation Counts 1.1.0 2026-11-16 22:20:52 +01:00
README.md Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00
updates.json Zotero Citations 1.2.0: clean up for publication 2026-11-16 22:27:36 +01:00

Zotero Citations

A Zotero plugin that fetches citation counts from Crossref, Semantic Scholar and (optionally) OpenAlex, stores them in each item's Extra field and shows them in a column.

  • Runs only when you ask: for selected items, a collection or a whole library.
  • Writes the same lines as Citation Tally, so existing counts, columns and searches keep working, and leaves every other line of Extra alone.
  • Reports every failed lookup with its HTTP status, and logs it to the Error Console.
  • Works with Zotero 7 to 11. It sends only paper identifiers, with the User-Agent zotero-citations/<version>.

Install

  1. Download zotero-citations-<version>.xpi from the latest release.
  2. In Zotero, open Tools › Plugins, click the gear icon, then Install Plugin From File…, and pick the file.

Zotero checks this repository for updates and offers new versions in the same window.

Use

To update… Do this
selected items Right-click them › Update citation counts (an attachment or note counts as its parent)
a collection Right-click it › Update citation counts for this collection
a library or group Right-click it in the left pane › Update citation counts for this library, or Tools › Update citation counts for “…”

Crossref is queried at one request per second, so 100 items take about two minutes; Semantic Scholar answers up to 500 items per request and OpenAlex 50. Each item is saved as soon as its counts are known. Large runs ask for confirmation first, and Stop updating citation counts (item context menu or Tools menu) stops a run at any time.

While a run is going, a notification in the bottom-right corner shows the progress. At the end it shows a summary (380 updated · 3 failed · 40 without identifier) and a Show report link. The report window lists failures with their HTTP status, items without an identifier, items not found in each source, and updated items. You can filter it, copy it as text, and click a title to select that item. Tools › Show last citation count report reopens it.

To see the counts, right-click a column header in the item list and enable Citations (CR | S2). It shows e.g. 198 | 313, with a dash where a source has no count; hovering shows each count with its date. The first click on the header sorts from highest to lowest.

Papers without a DOI

The plugin finds a DOI in the DOI field, in a DOI: … line in Extra or in a doi.org URL, and an arXiv id in Archive ID, Extra, an arxiv.org URL or a 10.48550/arXiv.… DOI.

For papers with neither (USENIX papers, for example), add one of these lines to Extra:

Semantic Scholar: CorpusId:196810567
OpenAlex: W2956461999

S2: …, a bare number, a 40-character Semantic Scholar paper id, or a semanticscholar.org or openalex.org URL in the URL field work too. The plugin never changes these lines.

Settings

Settings › Zotero Citations:

  • Sources: Crossref and Semantic Scholar are on, OpenAlex is off by default.
  • Semantic Scholar API key (optional). Without one, Semantic Scholar often answers HTTP 429; the plugin then waits and retries six times (2 to 60 s, or what the server asks) before reporting a failure. A free key is available at https://www.semanticscholar.org/product/api.
  • OpenAlex API key (optional). Without one, OpenAlex gives a small daily budget shared by everyone on your network.
  • Sort the column by the highest shown count, or by one source.

The settings are Zotero preferences under extensions.zotero.citationcounts.*.

What is written to Extra

Citations: 198 (Crossref) [2026-11-16]
Citations: 313 (SemanticScholar) [2026-11-16]
Citations: 296 (OpenAlex) [2026-11-16]
  • For each source that returned a count, the plugin replaces that source's previous lines, in this format or an older one (Citation Count: n (Crossref) [date], Citations (Crossref): n, n citations (Crossref), n citations (Crossref/DOI) [date], and the same with Semantic Scholar/DOI or Semantic Scholar/arXiv).
  • If a source fails or doesn't know the paper, its previous line stays.
  • Every other line stays exactly as it was: notes, tex.*, older GSCC: … lines and so on.
  • New lines go just before a Better BibTeX Citation Key: line, otherwise at the end.
  • An item is saved only when Extra changes, and its "Date Modified" is left as it was.

Development

The plugin is plain JavaScript with no dependencies or build step:

bootstrap.js              startup and shutdown
content/core.js           identifiers, Extra rewriting, API client (no Zotero dependencies)
content/plugin.js         menus, column, settings pane, runs, report data
content/report.*          report window
content/preferences.xhtml settings pane
locale/en-US/             menu labels
prefs.js                  default settings
test/test.js              tests
build.py                  builds the .xpi and updates updates.json
updates.json              update manifest read by Zotero

Run the tests with Node 18 or later. --live also calls the real APIs:

node test/test.js
node test/test.js --live

To release a new version:

  1. Set version in manifest.json and add an entry to CHANGELOG.md.
  2. Run python build.py. It writes dist/zotero-citations-<version>.xpi and adds the version, with the file's SHA-256, to updates.json. The build is reproducible.
  3. Commit, tag v<version>, push, and create a release for the tag with the .xpi attached.

License

MIT, see LICENSE.