K-Dense-AI/scientific-agent-skills / skills/pyzotero
pyzotero
VerifiedManages Zotero reference libraries using the pyzotero Python client: retrieves, creates, updates, and deletes items, collections, tags, and attachments via the Zotero Web API v3 or local API. Applies when working with Zotero libraries programmatically, managing bibliographic references, exporting citations, searching library contents, uploading PDF attachments, or building research automation workflows that integrate with Zotero.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.8 KB |
| references/authentication.md | markdown | 5.1 KB |
| references/cli.md | markdown | 3.7 KB |
| references/collections.md | markdown | 3.8 KB |
| references/error-handling.md | markdown | 3.9 KB |
| references/exports.md | markdown | 3.9 KB |
| references/files-attachments.md | markdown | 4.3 KB |
| references/full-text.md | markdown | 2.4 KB |
| references/mcp.md | markdown | 6.1 KB |
| references/pagination.md | markdown | 2.4 KB |
| references/read-api.md | markdown | 4.3 KB |
| references/saved-searches.md | markdown | 3.6 KB |
| references/search-params.md | markdown | 3.7 KB |
| references/tags.md | markdown | 2.6 KB |
| references/write-api.md | markdown | 5.6 KB |
references/read-api.md
View on GitHub# Read API Methods
## Retrieving Items
```python
# One page of items (100 per call by default; excludes trash)
items = zot.items()
# Top-level items only (excludes attachments/notes that are children)
top = zot.top(limit=25)
# A specific item by key
item = zot.item('ITEMKEY')
# Up to 50 specific items in ONE request
subset = zot.items(itemKey=','.join(['KEY1', 'KEY2', 'KEY3']))
# get_subset([...]) instead makes one single-item request per key (up to 50).
# Items from trash
trash = zot.trash()
# Deleted items (requires 'since' parameter)
deleted = zot.deleted(since=1000)
# Items from "My Publications"
pubs = zot.publications() # user libraries only
# Count all items
count = zot.count_items()
# Count top-level items
n = zot.num_items()
```
## Item Data Structure
Items are returned as dicts. Data lives in `item['data']`:
```python
item = zot.item('VDNIEAPH') # a dict, not a one-element list
title = item['data'].get('title', '')
item_type = item['data']['itemType']
creators = item['data'].get('creators', [])
tags = item['data']['tags']
key = item['data']['key']
version = item['data']['version']
collections = item['data']['collections']
doi = item['data'].get('DOI', '')
```
## Child Items
```python
# Get child items (notes, attachments) of a parent
children = zot.children('PARENTKEY')
```
## Retrieving Collections
```python
# One page of collections (including subcollections)
collections = zot.collections()
# Top-level collections only
top_collections = zot.collections_top()
# A specific collection
collection = zot.collection('COLLECTIONKEY')
# Sub-collections of a collection
sub = zot.collections_sub('COLLECTIONKEY')
# All collections and sub-collections in a flat list
all_cols = zot.all_collections()
# Or from a specific collection down:
all_cols = zot.all_collections('COLLECTIONKEY')
# Items in a specific collection (not sub-collections)
col_items = zot.collection_items('COLLECTIONKEY')
# Top-level items in a specific collection
col_top = zot.collection_items_top('COLLECTIONKEY')
# Count items in a collection
n = zot.num_collectionitems('COLLECTIONKEY')
```
## Retrieving Tags
```python
# All tags in the library
tags = zot.everything(zot.tags())
# Tags from a specific item
item_tags = zot.item_tags('ITEMKEY')
# Tags in a collection
col_tags = zot.collection_tags('COLLECTIONKEY')
```
## Retrieving Groups
```python
# Use a client initialized with the USER ID, not a group ID.
groups = zot.everything(zot.groups())
# /users/{userID}/groups: inspect each group's access before writing.
```
## Version Information
```python
# Last modified version of the library
version = zot.last_modified_version()
# Item versions dict {key: version}
item_versions = zot.item_versions()
# Collection versions dict {key: version}
col_versions = zot.collection_versions()
# Changes since a known version (for syncing)
changed_items = zot.item_versions(since=1000)
```
## Library Settings
```python
settings = zot.settings()
# Returns a setting-name mapping; values carry version and value.
# Available settings depend on the library; do not assume a fixed set.
# Use 'since' to get only changes:
new_settings = zot.settings(since=500)
```
## Saved Searches
```python
searches = zot.searches()
# Retrieves saved search metadata (not results)
```
## Endpoint and Sync Boundaries
All library routes use `/users/{userID}` or `/groups/{groupID}` under `https://api.zotero.org`. Item reads use `/items`, `/items/top`, `/items/trash`, `/items/{key}`, and `/items/{key}/children`. Collections use `/collections`, `/collections/top`, `/collections/{key}`, `/collections/{key}/collections`, and `/collections/{key}/items[/top]`. Tags use `/tags`, `/items/{key}/tags`, or `/collections/{key}/tags`. `settings()`, `searches()`, and `deleted(since=...)` use the corresponding library routes. `publications()` uses `/users/{userID}/publications/items`.
`deleted()` returns a dict of deleted keys grouped by object type, not item records. A complete incremental sync needs changed objects **and** deletions, plus `includeTrashed=1` when tracking trash transitions. Save the library version from the completed read sequence, not a later unrelated call; restart/reconcile if versions change during pagination. See [official syncing rules](https://www.zotero.org/support/dev/web_api/v3/syncing). `last_modified_version()` makes its own multi-object read.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |