pyzotero

Manage Zotero libraries programmatically via the Zotero Web API v3 using Python.

1|Updated Aug 24, 2026
One-click install
npx skills add https://github.com/CliffVale/opencode-free-setup --skill pyzotero-cliffvale
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pyzotero
Source: https://github.com/CliffVale/opencode-free-setup/tree/main/skills/pyzotero
Command: npx skills add https://github.com/CliffVale/opencode-free-setup --skill pyzotero-cliffvale

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyzotero, and includes references (resource) components.

What problem does it solve? Manually organizing bibliographic references, collections, tags, and PDF attachments in Zotero does not scale for research automation. This Skill lets you read, create, update, and delete Zotero library content programmatically through the pyzotero Python client. ## Core Features & Use Cases - Full CRUD on Zotero libraries: Retrieve, create, update, and delete items, collections, tags, and saved searches via the Zotero Web API v3. - Citation export: Export items as BibTeX, CSL-JSON, RIS, or formatted bibliographies in styles like APA, MLA, and Vancouver. - Attachments and full-text: Download and upload PDF attachments, and retrieve or set full-text indexed content. - Local Zotero 7 access: Use the bundled CLI or MCP server for keyless local search, including full-text PDF search. - Use Case: A researcher needs to tag 200 papers in a collection as 'reviewed' and export them to a .bib file for a LaTeX manuscript — this Skill automates both steps in a few lines of Python. ## Quick Start Ask the AI to list the ten most recent items in your Zotero library and export them as a BibTeX file using your ZOTERO_API_KEY and ZOTERO_LIBRARY_ID environment variables.

Frequently Asked Questions about pyzotero

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access my Zotero library from Python?▼

Use the pyzotero Zotero class with your library ID, library type ('user' or 'group'), and API key from zotero.org/settings/keys. Store credentials in ZOTERO_LIBRARY_ID, ZOTERO_API_KEY, and ZOTERO_LIBRARY_TYPE environment variables.

How do I export Zotero items to BibTeX with pyzotero?▼

Call zot.add_parameters(format='bibtex') before a read call such as zot.top(limit=50). The result is a bibtexparser BibDatabase object whose entries can be written to a .bib file with bibtexparser.dump.

Can I use pyzotero without a Zotero API key?▼

Yes, in local mode. Pass local=True to the Zotero constructor for read-only access, or use the pyzotero CLI and MCP server extras, which connect to a running Zotero 7 desktop app with local API access enabled.

How do I retrieve all items when Zotero paginates results?▼

Wrap any multi-item read call with zot.everything(), for example zot.everything(zot.items()), to fetch all pages automatically. Alternatives include follow(), iterfollow(), and manual start/limit pagination loops.

Why does updating a Zotero item raise a version conflict error?▼

Zotero uses optimistic locking, so a PreConditionFailed error means the item changed after you retrieved it. Re-fetch the item with zot.item(key), reapply your changes, and call update_item again.

How do I upload PDF attachments to a Zotero item?▼

Use zot.attachment_simple(['/path/to/paper.pdf'], parentid='PARENTKEY') to upload files as child attachments. The result dict reports success, failure, and unchanged lists; the API key needs files access permission.