Format a bibliography (citeproc / any CSL style)
zotero_format_bibliographyCreate formatted bibliographies in any CSL style from CSL-JSON items or Zotero library keys. Output HTML, text, or RTF without writing to your library.
Instructions
Render a formatted bibliography in any CSL style using citeproc-js — no Zotero library write required. Provide either items (an array of CSL-JSON objects, e.g. from zotero_import or external metadata) or item_keys (library items, which are exported to CSL-JSON first). Choose style (a name like "APA 7th" or a CSL id; default "apa"), locale (default "en-US"), and format (html/text/rtf; default html). The formatted bibliography text is returned. Use this for arbitrary items or styles; for items already in the library you can also use zotero_bibliography (server-rendered).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | CSL-JSON items to format. | |
| style | No | Style name or CSL id (default "apa"). | |
| format | No | Output format (default html). | |
| locale | No | Locale (default "en-US"). | |
| item_keys | No | Library item keys (exported to CSL-JSON). | |
| 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 |
|---|---|---|---|
| entries | Yes | The rendered entries, one string each, in bibliography order. | |
| styleId | Yes | The CSL style id actually used, e.g. "apa". | |
| entryCount | Yes | Entries citeproc rendered. | |
| bibliography | Yes | Those entries joined: the ready-to-use bibliography, in the requested format. |