---
canonical_url: "https://docs.composio.dev/toolkits/zotero"
markdown_url: "https://docs.composio.dev/toolkits/zotero.md"
product: "platform"
version: null
last_updated: null
---

# Zotero

Zotero is a research and reference-management platform for collecting, organizing, citing, and sharing sources and notes.

- **Category:** education
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 31
- **Triggers:** 0
- **Slug:** `ZOTERO`
- **Version:** 00000000_00

## Tools

### Create or Update Collections

**Slug:** `ZOTERO_CREATE_OR_UPDATE_COLLECTIONS`

Create new Zotero collections or patch existing collections in one batch of up to 50 entries. Existing entries require their key and either an object version or request-level library version. Use a write token for idempotent retries or a library version for optimistic concurrency, but not both.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `collections` | array | Yes | One to 50 collection entries. New entries require name and omit key/version; updates require a key and either its object version or request-level library_version, and apply PATCH semantics. |
| `write_token` | string | No | Optional idempotency token for safely retrying this batch. Mutually exclusive with library_version. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `library_version` | integer | No | Optional current library version from Last-Modified-Version or a prior action's last_modified_version, used as an optimistic-concurrency precondition. It also allows update entries to omit version. Mutually exclusive with write_token. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create or Update Items

**Slug:** `ZOTERO_CREATE_OR_UPDATE_ITEMS`

Create new Zotero items or patch existing items in one batch of up to 50 entries. New entries require itemType; existing entries require their key and either an object version or request-level library version. A parent and child created in the same request need a local eight-character parent key with version 0. Use a write token for idempotent retries or a library version for optimistic concurrency, but not both.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `items` | array | Yes | One to 50 editable Zotero item objects. New entries normally require itemType and omit key/version. To create a parent and child together, assign the parent a new local Zotero key and version 0, then use that key as the child's parentItem; both entries still require itemType. Updates require a key from a read or list response and either its object version or request-level library_version, and apply PATCH semantics. Additional fields are sent unchanged. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `write_token` | string | No | Optional idempotency token for safely retrying this batch. Mutually exclusive with library_version. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `library_version` | integer | No | Optional current library version from Last-Modified-Version or a prior action's last_modified_version, used as an optimistic-concurrency precondition. It also allows update entries to omit version. Mutually exclusive with write_token. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create or Update Saved Searches

**Slug:** `ZOTERO_CREATE_OR_UPDATE_SAVED_SEARCHES`

Create new Zotero saved-search definitions or patch existing definitions in one batch of up to 50 entries. Existing entries require their key and either an object version or request-level library version. Use a write token for idempotent retries or a library version for optimistic concurrency, but not both. This stores definitions; it does not execute searches.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `searches` | array | Yes | One to 50 saved-search definitions. New entries require name and conditions and omit key/version. Updates require a key and either its object version or request-level library_version, and apply PATCH semantics. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `write_token` | string | No | Optional idempotency token for safely retrying this batch. Mutually exclusive with library_version. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `library_version` | integer | No | Optional current library version from Last-Modified-Version or a prior action's last_modified_version, used as an optimistic-concurrency precondition. It also allows update entries to omit version. Mutually exclusive with write_token. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Collections

**Slug:** `ZOTERO_DELETE_COLLECTIONS`

Delete one Zotero collection using its current object version, or delete up to 50 collections using the current library version. The two modes require different, mutually exclusive key and version parameters.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `version` | integer | No | Current collection object version from a read or list response, required for a single deletion. |
| `operation` | string ("single" | "batch") | No | Delete one collection or a batch of collections. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `collection_key` | string | No | Collection key from a read or list response, required for a single deletion. |
| `collection_keys` | array | No | One to 50 collection keys from read or list responses for a batch deletion. |
| `library_version` | integer | No | Current library version from Last-Modified-Version or a prior action's last_modified_version, required for a batch deletion. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Items

**Slug:** `ZOTERO_DELETE_ITEMS`

Delete one Zotero item using its current object version, or delete up to 50 items using the current library version. Single and batch key/version parameters are mutually exclusive.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `version` | integer | No | Current item object version from a read or list response, required for a single deletion. |
| `item_key` | string | No | Item key from a read or list response, required for a single deletion. |
| `item_keys` | array | No | One to 50 item keys from read or list responses for a batch deletion. |
| `operation` | string ("single" | "batch") | No | Delete one item or a batch of items. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `library_version` | integer | No | Current library version from Last-Modified-Version or a prior action's last_modified_version, required for a batch deletion. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Saved Searches

**Slug:** `ZOTERO_DELETE_SAVED_SEARCHES`

Delete one to 50 Zotero saved-search definitions in a batch using the current library version.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `search_keys` | array | Yes | One to 50 saved-search keys from read or list responses to delete in one batch. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `library_version` | integer | Yes | Current library version from Last-Modified-Version or a prior action's last_modified_version, used as an optimistic-concurrency precondition. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Tags

**Slug:** `ZOTERO_DELETE_TAGS`

Delete one to 50 exact tag names from every item in a Zotero user or group library, using the current library version as a concurrency precondition.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tags` | array | Yes | One to 50 exact tag names to remove from every item in the library. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `library_version` | integer | Yes | Current library version from Last-Modified-Version or a prior action's last_modified_version, used as an optimistic-concurrency precondition. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Attachment File

**Slug:** `ZOTERO_DOWNLOAD_ATTACHMENT_FILE`

Download a Zotero attachment file, stream it to file storage, and return its filename, media type, byte size, and ETag metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `item_key` | string | Yes | Attachment item key from LIST_ITEMS.key. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Collection

**Slug:** `ZOTERO_GET_COLLECTION`

Get one collection from a user or group library by key.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `collection_key` | string | Yes | Eight-character Zotero collection key from LIST_COLLECTIONS.key. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Complete Schema

**Slug:** `ZOTERO_GET_COMPLETE_SCHEMA`

Return Zotero's complete item schema, including item types, fields, creator types, metadata, locales, and Citation Style Language mappings. The response is large (approximately 394 KB).

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Current Key Permissions

**Slug:** `ZOTERO_GET_CURRENT_KEY_PERMISSIONS`

Return the connected key's Zotero user identity and read/write permissions without exposing the credential.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Group

**Slug:** `ZOTERO_GET_GROUP`

Get one Zotero group's metadata, members, roles, and library permission policy by numeric group ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `group_id` | integer | Yes | Numeric Zotero group ID from List User Groups. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Item

**Slug:** `ZOTERO_GET_ITEM`

Get one Zotero item by key, as complete JSON data, formatted bibliography or citation output, Atom, or a supported export format.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `style` | string | No | Citation style name or remote CSL URL for bibliography or citation output. |
| `format` | string ("json" | "atom" | "bib" | "bibtex" | "biblatex" | "bookmarks" | "coins" | "csljson" | "csv" | "mods" | "refer" | "rdf_bibliontology" | "rdf_dc" | "rdf_zotero" | "ris" | "tei" | "wikipedia") | No | Response format: json, bib, atom, or a Zotero-supported item export format such as bibtex, csljson, or ris. |
| `locale` | string | No | CSL locale for bibliography or citation output, such as en-US. |
| `include` | array | No | Additional representations for format=json or format=atom, such as data, bib, citation, json, html, none, or an export format. Sent as include for JSON and content for Atom. |
| `item_key` | string | Yes | Zotero item key from LIST_ITEMS.key. |
| `linkwrap` | boolean | No | Whether bibliography URLs and DOIs should be returned as links. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Item Full Text

**Slug:** `ZOTERO_GET_ITEM_FULLTEXT`

Get indexed text and character or page counts for one attachment item.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `item_key` | string | Yes | Attachment item key from LIST_ITEMS.key. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Item Template

**Slug:** `ZOTERO_GET_ITEM_TEMPLATE`

Get Zotero's complete editable empty JSON template for a new item. For attachments, supply the required link mode to receive the matching attachment fields.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `item_type` | string | Yes | Zotero item type, such as journalArticle, note, or attachment. |
| `link_mode` | string ("imported_file" | "imported_url" | "linked_file" | "linked_url") | No | Attachment link mode. Required when item_type is attachment and forbidden for every other item type. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Saved Search

**Slug:** `ZOTERO_GET_SAVED_SEARCH`

Get one saved-search definition from a user or group library by key; this does not return the items matching the search.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `search_key` | string | Yes | Eight-character Zotero saved-search key from LIST_SAVED_SEARCHES.key. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Tag

**Slug:** `ZOTERO_GET_TAG`

Get exact tag records matching one tag name in a user or group library.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | Yes | Exact tag name. The complete value is URL-encoded as one path segment. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Collections

**Slug:** `ZOTERO_LIST_COLLECTIONS`

List one page of all, top-level, or direct child collections in a user or group library, returning a cursor when more results exist.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sort` | string ("dateAdded" | "dateModified" | "title" | "creator" | "itemType" | "date" | "publisher" | "publicationTitle" | "journalAbbreviation" | "language" | "accessDate" | "libraryCatalog" | "callNumber" | "rights" | "addedBy") | No | Sort field: dateAdded, dateModified, title, creator, itemType, date, publisher, publicationTitle, journalAbbreviation, language, accessDate, libraryCatalog, callNumber, rights, or addedBy. |
| `limit` | integer | No | Maximum collections in this page (1-100). |
| `since` | integer | No | Return objects modified after this library version. |
| `cursor` | string | No | Opaque JSON cursor or plain decimal cursor returned by a manual page call. |
| `format` | string ("json" | "keys" | "versions" | "atom") | No | Response representation; non-JSON formats preserve provider output. |
| `content` | array | No | Atom entry content formats, such as html, json, or none. Accepted only when format=atom and sent as one comma-separated content parameter. |
| `direction` | string ("asc" | "desc") | No | Sort direction. Zotero's default direction varies by sort field. |
| `operation` | string ("all" | "top" | "children") | No | Choose all collections, only top-level collections, or direct children of one collection. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. Use the user ID returned by GET_CURRENT_KEY_PERMISSIONS or a group ID returned by LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `collection_key` | string | No | Parent key from LIST_COLLECTIONS.key; required for operation=children. |
| `collection_keys` | array | No | For operation=all, restrict results to LIST_COLLECTIONS.key values. |
| `if_modified_since_version` | integer | No | Known library version for a conditional read. If unchanged, Zotero returns not_modified=true with no collection payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Deleted Objects

**Slug:** `ZOTERO_LIST_DELETED_OBJECTS`

Return collection, saved-search, item, tag, and setting identifiers deleted after a Zotero library version.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `since` | integer | Yes | Library version after which deletions should be returned. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Full-Text Versions

**Slug:** `ZOTERO_LIST_FULLTEXT_VERSIONS`

Return attachment item keys whose indexed full text changed after a Zotero library version.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `since` | integer | Yes | Library version after which full-text changes should be returned. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Items

**Slug:** `ZOTERO_LIST_ITEMS`

List one page of library, top-level, trash, child, publication, or collection items with Zotero search and format filters, returning a cursor when more results exist.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sort` | string ("dateAdded" | "dateModified" | "title" | "creator" | "itemType" | "date" | "publisher" | "publicationTitle" | "journalAbbreviation" | "language" | "accessDate" | "libraryCatalog" | "callNumber" | "rights" | "addedBy") | No | Sort field: dateAdded, dateModified, title, creator, itemType, date, publisher, publicationTitle, journalAbbreviation, language, accessDate, libraryCatalog, callNumber, rights, or addedBy. |
| `tags` | array | No | Zotero tag boolean-search expressions. Each entry is serialized as a separate tag query parameter. |
| `limit` | integer | No | Maximum items in this page (1-100). |
| `query` | string | No | Quick-search text. |
| `since` | integer | No | Return items modified after this library version. |
| `style` | string | No | Citation style name or remote CSL URL for bibliography or citation output. |
| `cursor` | string | No | Opaque JSON cursor or plain decimal cursor returned by an alternate-format call. |
| `format` | string ("json" | "atom" | "bib" | "keys" | "versions" | "bibtex" | "biblatex" | "bookmarks" | "coins" | "csljson" | "csv" | "mods" | "refer" | "rdf_bibliontology" | "rdf_dc" | "rdf_zotero" | "ris" | "tei" | "wikipedia") | No | Response format: json, atom, bib, keys, versions, bibtex, biblatex, bookmarks, coins, csljson, csv, mods, refer, rdf_bibliontology, rdf_dc, rdf_zotero, ris, tei, or wikipedia. bib is capped at 150 items, ignores limit, and does not support sorting or pagination. Export formats require limit. |
| `locale` | string | No | CSL locale for bibliography or citation output, such as en-US. |
| `source` | string ("library" | "top" | "trash" | "children" | "publications" | "collection" | "collection_top") | No | Select the item set to list. |
| `include` | array | No | Additional Zotero representations to include in each item. Sent as include for JSON or content for Atom responses. |
| `item_key` | string | No | Parent item key from LIST_ITEMS.key; required only for source=children. |
| `linkwrap` | boolean | No | Whether bibliography URLs and DOIs should be returned as links. |
| `direction` | string ("asc" | "desc") | No | Sort direction. Zotero's default direction varies by sort field. |
| `item_keys` | array | No | For source=library, restrict results to LIST_ITEMS.key values. |
| `item_type` | string | No | Zotero item-type boolean search expression. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. Use the user ID returned by GET_CURRENT_KEY_PERMISSIONS or a group ID returned by LIST_USER_GROUPS. |
| `query_mode` | string ("titleCreatorYear" | "everything") | No | Fields searched by query. |
| `library_type` | string ("users" | "groups") | No | Library type; publications supports users only. |
| `collection_key` | string | No | Collection key from LIST_COLLECTIONS.key; required for collection sources. |
| `include_trashed` | boolean | No | Include trashed items for supported library and top-level sources. |
| `if_modified_since_version` | integer | No | Known library version for a conditional read. If unchanged, Zotero returns not_modified=true with no item payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Item Metadata

**Slug:** `ZOTERO_LIST_ITEM_METADATA`

List Zotero item types, fields, type-specific fields, creator roles, or creator-name fields.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `locale` | string | No | Optional BCP-47 locale for translated labels. |
| `item_type` | string | No | Zotero item type; required only for item_type_fields and item_type_creator_types. |
| `metadata_type` | string ("item_types" | "item_fields" | "item_type_fields" | "item_type_creator_types" | "creator_fields") | Yes | Metadata catalog to return. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Saved Searches

**Slug:** `ZOTERO_LIST_SAVED_SEARCHES`

List one page of saved-search definitions in a user or group library, returning a cursor when more results exist; this does not execute the searches.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sort` | string ("dateAdded" | "dateModified" | "title" | "creator" | "itemType" | "date" | "publisher" | "publicationTitle" | "journalAbbreviation" | "language" | "accessDate" | "libraryCatalog" | "callNumber" | "rights" | "addedBy") | No | Sort field: dateAdded, dateModified, title, creator, itemType, date, publisher, publicationTitle, journalAbbreviation, language, accessDate, libraryCatalog, callNumber, rights, or addedBy. |
| `limit` | integer | No | Maximum saved-search definitions in this page (1-100). |
| `since` | integer | No | Return saved-search definitions modified after this library version. |
| `cursor` | string | No | Opaque JSON cursor or plain decimal cursor returned by an alternate-format call. |
| `format` | string ("json" | "keys" | "versions" | "atom") | No | Response representation: full JSON definitions, keys, versions, or Atom. |
| `content` | array | No | Atom entry content formats: html (the default) or none. Accepted only when format=atom and sent as one comma-separated content parameter. |
| `direction` | string ("asc" | "desc") | No | Sort direction. Zotero's default direction varies by sort field. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. Use the user ID returned by GET_CURRENT_KEY_PERMISSIONS or a group ID returned by LIST_USER_GROUPS. |
| `search_keys` | array | No | Restrict results to LIST_SAVED_SEARCHES.key values (maximum 50). |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `if_modified_since_version` | integer | No | Known library version for a conditional read. If unchanged, Zotero returns not_modified=true with no saved-search payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Tags

**Slug:** `ZOTERO_LIST_TAGS`

List one page of tags for a library, item, collection, filtered item set, trash, top-level items, or My Publications, returning a cursor when more results exist.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sort` | string ("dateAdded" | "dateModified" | "title" | "creator" | "itemType" | "date" | "publisher" | "publicationTitle" | "journalAbbreviation" | "language" | "accessDate" | "libraryCatalog" | "callNumber" | "rights" | "addedBy" | "numItems") | No | Sort field: dateAdded, dateModified, title, creator, itemType, date, publisher, publicationTitle, journalAbbreviation, language, accessDate, libraryCatalog, callNumber, rights, addedBy, or numItems. |
| `limit` | integer | No | Maximum tags in this page (1-100). |
| `query` | string | No | Filter returned tag names. |
| `since` | integer | No | For source=library, return tags changed after this library version. |
| `cursor` | string | No | Opaque cursor or plain decimal cursor returned by a conditional/manual page call. |
| `source` | string ("library" | "item" | "collection" | "items" | "top_items" | "trash_items" | "collection_items" | "collection_top_items" | "publications") | No | Select the records whose tags are summarized. |
| `item_key` | string | No | Item key from LIST_ITEMS.key; required only for source=item. |
| `item_tag` | string | No | Tag filter applied to the underlying item set. |
| `direction` | string ("asc" | "desc") | No | Sort direction. Zotero's default direction varies by sort field. |
| `item_query` | string | No | Quick-search filter applied to the underlying item set. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. Use the user ID returned by GET_CURRENT_KEY_PERMISSIONS or a group ID returned by LIST_USER_GROUPS. |
| `query_mode` | string ("contains" | "startsWith") | No | How query is matched against tag names. |
| `tag_filter` | string | No | Boolean tag filter applied to the underlying item set. |
| `library_type` | string ("users" | "groups") | No | Library type; publications supports users only. |
| `collection_key` | string | No | Collection key from LIST_COLLECTIONS.key; required for collection sources. |
| `item_query_mode` | string ("titleCreatorYear" | "everything") | No | Fields searched by item_query. |
| `if_modified_since_version` | integer | No | Known library version for a conditional read. If unchanged, Zotero returns not_modified=true with no tag payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List User Groups

**Slug:** `ZOTERO_LIST_USER_GROUPS`

List one page of Zotero groups accessible to a user and return a cursor when more JSON results exist, or return group-version mappings for synchronization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum groups in this page (1-100); applies only to json format. |
| `cursor` | string | No | Opaque or plain decimal next-page cursor returned by a previous json-format call; omit for the first page. |
| `format` | string ("json" | "versions") | No | Return group objects with json, or a group-ID-to-version map with versions. |
| `user_id` | integer | Yes | Numeric Zotero user library ID returned by GET_CURRENT_KEY_PERMISSIONS; this is not a username or group ID. |
| `if_modified_since_version` | integer | No | Known library version for a conditional read. If unchanged, Zotero returns not_modified=true with no group payload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Patch Attachment File

**Slug:** `ZOTERO_PATCH_ATTACHMENT_FILE`

Apply an xdelta, VCDIFF, or bsdiff binary patch to an existing Zotero attachment. Provide the target file's MD5, filename, byte size, and millisecond modification time along with the previous MD5 and matching diff. The action obtains and consumes Zotero's short-lived authorization internally.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mtime` | integer | Yes | Target file modification time in milliseconds since the Unix epoch. |
| `new_md5` | string | Yes | MD5 of the complete target file that the binary patch will produce. |
| `filename` | string | Yes | Filename to store on the patched attachment. |
| `filesize` | integer | Yes | Size in bytes of the complete target file after applying the patch. |
| `item_key` | string | Yes | Attachment key from LIST_ITEMS.key or the CREATE_OR_UPDATE_ITEMS success map. |
| `algorithm` | string ("xdelta" | "vcdiff" | "bsdiff") | Yes | Binary patch encoding used by the supplied diff file. |
| `diff_file` | object | Yes | Raw binary patch matching the selected algorithm and previous attachment. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `previous_md5` | string | Yes | MD5 of the attachment version being patched, from its data.md5 field or the download ETag; used as the write precondition. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Replace Collection

**Slug:** `ZOTERO_REPLACE_COLLECTION`

Replace a Zotero collection's complete editable data using its current object version for optimistic concurrency.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Complete replacement name for the collection. |
| `version` | integer | Yes | Current collection object version from a read or list response, used for optimistic concurrency. |
| `relations` | object | No | Complete replacement relations keyed by predicate URI. Omit or pass null to clear all relations. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `collection_key` | string | Yes | Collection key from a Zotero collection read or list response. |
| `parent_collection` | string | No | Replacement parent collection key, or null to make this top-level. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Replace Item

**Slug:** `ZOTERO_REPLACE_ITEM`

Replace a Zotero item's complete editable JSON using its current object version. Omitted editable fields are removed, so use this only when the full desired item representation is available.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `item` | object | Yes | Complete editable Zotero item data. This object replaces the existing editable JSON, so omitted editable fields are removed. |
| `version` | integer | Yes | Current item object version from a read or list response, used for optimistic concurrency. If item also contains version, the values must match. |
| `item_key` | string | Yes | Zotero item key from an item read or list response. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Set Item Full Text

**Slug:** `ZOTERO_SET_ITEM_FULLTEXT`

Set indexed full-text content for one Zotero attachment, using character counts for text or page counts for PDF content.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `content` | string | Yes | Indexed plain text extracted from the attachment. |
| `item_key` | string | Yes | Zotero attachment item key from an item read or list response whose indexed full text will be set. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `total_count` | integer | Yes | Total characters when content_kind is text, or total pages when it is pdf. |
| `content_kind` | string ("text" | "pdf") | Yes | Use text to send character counts, or pdf to send page counts. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `indexed_count` | integer | Yes | Number of indexed characters when content_kind is text, or indexed pages when it is pdf. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Item

**Slug:** `ZOTERO_UPDATE_ITEM`

Partially update selected editable fields on one Zotero item using its current object version. Omitted fields remain unchanged; arrays replace the complete existing arrays.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `changes` | object | Yes | Editable item fields to change. Omitted fields remain unchanged; empty strings and arrays clear fields, and arrays replace the complete existing arrays. Do not pass a response wrapper or the item key. |
| `version` | integer | Yes | Current item object version from a read or list response, used for optimistic concurrency. |
| `item_key` | string | Yes | Zotero item key from an item read or list response. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upload Attachment File

**Slug:** `ZOTERO_UPLOAD_ATTACHMENT_FILE`

Upload or replace all bytes of an existing Zotero imported-file attachment. The action computes the MD5 and file size, authorizes the upload, sends the file to Zotero's temporary storage destination, and registers it atomically. Create the attachment item first: call GET_ITEM_TEMPLATE with itemType='attachment' and linkMode='imported_file', then pass that template to CREATE_OR_UPDATE_ITEMS. Provide previous_md5 from data.md5 or the download ETag only when replacing existing file content.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | Yes | Complete attachment file to upload. |
| `mtime` | integer | No | File modification time in milliseconds since the Unix epoch. Defaults to the current time. |
| `filename` | string | No | Stored filename. Defaults to the uploaded file's name. |
| `item_key` | string | Yes | Attachment key from LIST_ITEMS.key or the CREATE_OR_UPDATE_ITEMS success map. |
| `library_id` | integer | Yes | Numeric Zotero user or group library ID. User IDs come from GET_CURRENT_KEY_PERMISSIONS.userID; group IDs come from LIST_USER_GROUPS. |
| `library_type` | string ("users" | "groups") | Yes | Select a user or group library. |
| `previous_md5` | string | No | MD5 from the attachment item's current data.md5 field when replacing existing file content. Omit for the attachment's first file upload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
