About the package

rdnb is an R wrapper for the Deutsche Nationalbibliothek (German National Library) API, available at https://www.dnb.de/EN/Home/home_node.html. As the German central archival library, the German National Library is collecting, archiving, bibliographically classifying all German and German-language publications, foreign publications about Germany, translations of German works, and the works of German-speaking emigrants published abroad between 1933 and 1945.

All bibliographic data of the German National Library are provided free of charge and can be freely re-used under “Creative Commons Zero” (CC0 1.0) terms. The metadata and online interfaces are provided with no guarantee of their being continuous, punctual, error-free or complete, or of their not infringing the rights of third parties (e.g. personal rights and copyright).

Source and more details:

About the DNB; About the interface

Package install

rdnb is available on CRAN and GitHub. Install from CRAN:

install.packages("rdnb")

To install the development version from GitHub the devtools-package is required.

devtools::install_github("chgrl/rdnb")

Load the package

library(rdnb)

Search the DNB catalogue

rdnb provides two approaches to expose a search. For common search requests use the simple dnb_search function. More complex requests are possible using the dnb_advanced function.

Advanced search - dnb_advanced

dnb_advanced allows for complex requests using the Contextual Query Language (CQL). See the DNB advanced search help pages for available indices and a list of examples.

The following advanced search returns a list of german or english children’s books titled with ‘cat’, excluding titles containing ‘dog’, since the year 2001:

cats <- dnb_advanced("( (tit=katze OR tit=kater NOT tit=hund) OR (tit=cat NOT tit=dog) ) AND jhr>2000 AND mat=books AND (spr=ger OR spr=eng) AND sgt=K", limit="all")

Utils

Number of records

Use n_rec to get the total number of records found by a request:

n_rec(cats)
#> [1] 5895