Server-rendered bibliography (library items)
zotero_bibliographyGenerate a formatted bibliography from Zotero library items using CSL styles like APA or Chicago, with options for locale and link wrapping.
Instructions
Produce a formatted bibliography for items already in a Zotero library, rendered server-side by Zotero in a CSL style (by the desktop app for a library it serves, so no cloud key is needed there; otherwise by the Web API). Provide item_keys and optionally style (a name such as "apa" or "chicago author-date", or a CSL id; unset renders Zotero's default, chicago-shortened-notes-bibliography), locale, and linkwrap. Returns XHTML. Note: this endpoint is item-only and capped at 150 items. For arbitrary CSL-JSON or items not in the library, use zotero_format_bibliography instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | Style name or CSL id. | |
| locale | No | Locale (e.g. en-US). | |
| linkwrap | No | Wrap URLs/DOIs in links. | |
| item_keys | Yes | Library item keys (max 150). | |
| library_id | No | Numeric id of the library to address, e.g. 5234875 for a group (zotero_groups lists the ids you can reach). Omit to use the configured default library; an id given without library_type is read as a group id. | |
| library_type | No | Which library to address: "user" (a personal library) or "group" (a shared group library). Omit to use the library this server is configured for. "group" on its own is refused: pass library_id with it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Present when fewer entries rendered than keys were asked for, and why that happens. | |
| style | Yes | The CSL style Zotero rendered in; "chicago-shortened-notes-bibliography" is the default when `style` was unset. | |
| entryCount | Yes | Entries Zotero actually rendered, counted from the XHTML. | |
| bibliography | Yes | The rendered XHTML. | |
| requestedCount | Yes | Keys the call asked for. A key the library does not have, or a child item, renders nothing. |