Zotero Web API Full-Text Content Requests
This page documents the methods to access full-text content of Zotero items via the Zotero Web API. See the Basics page for basic information on accessing the API, including possible HTTP status codes not listed here.
Getting new full-text content
GET <userOrGroupPrefix>/fulltext?since=<version>
Content-Type: application/json Last-Modified-Version: <library version>
{ "<itemKey>": <version>, "<itemKey>": <version>, "<itemKey>": <version> }
For each item with a full-text content version greater than stored locally, get the item's full-text content, as described below.
Common responses | |
---|---|
200 OK | Full-text content was successfully retrieved. |
400 Bad Request | The 'since' parameter was not provided. |
Getting an item's full-text content
GET <userOrGroupPrefix>/items/<itemKey>/fulltext
<itemKey>
should correspond to an existing attachment item.
Content-Type: application/json Last-Modified-Version: <version of item's full-text content>
{ "content": "This is full-text content.", "indexedPages": 50, "totalPages": 50 }
indexedChars
and totalChars
are used for text documents, while indexedPages
and totalPages
are used for PDFs.
Common responses | |
---|---|
200 OK | Full-text content was found for the given item. |
404 Not Found | The item wasn't found, or no full-text content was found for the given item. |
Setting an item's full-text content
PUT <userOrGroupPrefix>/items/<itemKey>/fulltext Content-Type: application/json
{ "content": "This is full-text content.", "indexedChars": 26, "totalChars": 26 }
<itemKey>
should correspond to an existing attachment item.
For text documents, include indexedChars
and totalChars
. For PDFs, include indexedPages
and totalPages
.
Common responses | |
---|---|
204 No Content | The item's full-text content was updated. |
400 Bad Request | Invalid JSON was provided. |
404 Not Found | The item wasn't found or was not an attachment. |
Searching for items by full-text content
See the q
and qmode
search parameters.