Navigation and service

DnbLab: Interfaces

Our data and free digital objects can be queried via three different interfaces.

OAI interfaces

Information about the OAI interface offered as part of our metadata services for querying metadata and the sets that are thereby made accessible (German National Bibliography, authority data and German Union Catalogue of Serials) can be found at https://www.dnb.de/EN/oai.

Example query for finding all dissertations freely available online in the subject category “Social Sciences, Sociology, Anthropology” dating from a specific period:

https://services.dnb.de/oai/repository?verb=ListRecords&from=2020-04-01T14:55:00Z&until=2020-07-08T09:54:59Z&metadataPrefix=oai_dc&set=dnb-all:online:dissertations:sg300

Our OAI2 interface allows users to search for metadata and links to image files of digitised works in the public domain without registering beforehand.

Example search for all freely accessible digitised portraits of book dealers published since a specific date:

https://services.dnb.de/oai2/repository?verb=ListRecords&metadataPrefix=mets&from=2020-04-30&set=dnb:digitalisate-oa:projekt29

Functions

  • Identify: Display general information about OAI2 repository, e.g.

    • repositoryName
    • baseURL
    • protocolVersion
  • ListSets: Information about all data sets (catalogues) available in OAI2 repository
  • ListMetadataFormats: List of all data formats available in OAI2 repository
  • GetRecord: Call of individual data records using the ID. The identification number of the data record concerned must be known for this.

    • identifier: Identification number of required data record
    • metadataPrefix: Name of the data format in which the data record is to be issued. The selection of values can be requested using the ListMetadataFormats command (see above)
  • ListRecords: Harvestsing data records by specifying a period (from/until) and/or data sets is also possible. Times are entered using Universal Time Coordinated, UTC.
    Parameter:

    • from/until: points which define the time period for selective harvesting. Depending on the OAI repository, these can be defined to the day (YYYY-MM-DD) or to the second (YYYY-MM-DDThh:mm:ssZ)
    • set: the catalogue from which the data records originate
    • metadataPrefix: see above
    • resumptionToken: facilitates the return of part responses. The OAI2 harvester is sent a token which can be used for a new request to obtain the next responses from the OAI2 repository. The token sends back information on the size of the total list and the counter (cursor="50" completeListSize="XXXXXXX"). A maximum of 50 data sets are delivered per OAI2 response. Experience shows that a "resumptionToken" is valid for about 30 minutes for a ListRecords query.
  • ListIdentifiers: Harvest identifiers of data records (PPN/IDN) by entering the time period (from/until) and/or data sets.

Formats

METS format has been implemented as a container for all metadata retrieved through the OAI2 interface. The bibliographic metadata for the respective object has been embedded in MODS format. Responses to OAI2 requests are delivered as well-formed XML documents.

The following formats are offered in UTF-8 decomposed character encoding:

Formats
FormatseFormat nameStandard
metsFormat used to describe digital collections of objects with metadataMetadata Encoding & Transmission Standard
modsFormat for bibliographic metadataMetadata Object Description Schema
oai_dc (DNB Casual)Selection of Dublin Core elementsOAI DC Schema

Also see: Jupyter notebook tutorial How can I access data through the OAI interface?

SRU interface

SRU (Search/Retrieve via URL) enables you to search the German National Library’s data using URLs or a computer program (e.g. the Python Standard Library) and compile your own data sets. As in the catalogue, queries are formulated using the retrieval language Contextual Query Language (CQL) and attached to the URL as parameters.

Example query to find all titles freely accessible online with the keyword “Klimawandel” (“climate change”) (tit=klimawandel and location=onlinefree):

https://services.dnb.de/sru/dnb?version=1.1&operation=searchRetrieve&query=tit%3Dklimawandel*+and
+location%3Donlinefree&recordSchema=MARC21-xml

The results can be delivered by XML in various bibliographic formats. You will find further information about SRU functions, search attributes, available catalogues and formats at www.dnb.de/EN/sru along with sample queries.

Also see: Jupyter notebook tutorial How can I access data through the OAI interface?

Subscription terms and terms of use

The metadata and online interfaces are provided with no guarantee that they will be continuous, punctual, error-free or complete or that they do not violate third-party rights (e.g. personal rights and copyright).

Last changes: 16.02.2022
Short-URL: https://www.dnb.de/librarylabapi
Contact: lab@dnb.de

to the top