The goal of {zoter} is to conveniently access the Zotero API v3 from R.
Installation
You can install the development version of {zoter} like so:
# install.packages("devtools")
devtools::install_github("kleinlennart/zoter")
Usage
Authentication
To access your own private library you will need your userID (not your username!) and an API Key.
You can find them here: https://www.zotero.org/settings/keys
library(zoter)
## Will ask you for your userID and API Key
set_zotero_creds()
## Alternatively you can also set them directly with:
Sys.setenv("ZOTERO_API_USER" = "XXXXX")
Sys.setenv("ZOTERO_API_KEY" = "XXXXX")
Example API Calls
## Download and parse infos for all top-level items in your library
items <- get_all_items_top()
## Download and parse infos for all collections in your library
colls <- get_all_collections()
## Use 'req_zotero' for more specific queries
trash_keys <- req_zotero(query = "items/trash", output = "raw", format = "keys")