SRU interface
Searching for and importing bibliographic and authority data
With SRU (Search/Retrieve via URL), you can use search indices and search terms to conduct systematic searches of the German National Library’s data and subsequently import it into your own environment. The results of the search are provided in a defined XML format.
Queries are formulated in the retrieval language (Contextual Query Language).
The SRU standard was published by the Library of Congress and is a further development of the Z39.50 protocol.
An overview of all available metadata as well as the different options of obtaining data is given here.
Standards of SRU interface
SRU protocol: Version 1.1
Retrieval language CQL Context Set Version 1.2, Conformance-Level 2
SRU functions
SRU encompasses the basic functions:
Explain: Self-description in XML standard format, including information on
- Catalogue
- Indices and supported sorting parameters
- Data formats
Search/Retrieve: Search query
- Retrieval language: CQL (Contextual Query Language)
Boolean operators (and, or, not) are supported. An index must be entered for each search term, otherwise the search is carried out in the default index WOE.
Syntax of a search query: ... index%3Dsearch term%20or%20index%3Dsearch term ...
- Help in formulating a CQL search query
Sort: Sorting the result set
- the sort parameter is not supported in SRU version 1.1 but as part of CQL Context Set version 1.2. For which indices the sorting parameter is supported is available in the catalogue-specific SRU-Explain, in the specification sort=“true“, a combination is not possible.
Syntax of a search query: sort.descending or sort.ascending
- the sort parameter is not supported in SRU version 1.1 but as part of CQL Context Set version 1.2. For which indices the sorting parameter is supported is available in the catalogue-specific SRU-Explain, in the specification sort=“true“, a combination is not possible.
Access requirements
The SRU interface can be accessed free of charge and without registration.
Available catalogues
Catalogue selection | Start of a search query to this catalogue |
---|---|
Catalogue of the German National Library (DNB) excluding the Integrated Authority File (GND) | https://services.dnb.de/sru/dnb?version=1.1&operation=searchRetrieve&query=… |
Catalogue of the German Music Archive (DMA) | https://services.dnb.de/sru/dnb.dma?version=1.1&operation=searchRetrieve&query=… |
Authorities: Catalogue of Integrated Authority File (GND) Restrictions according to entities | https://services.dnb.de/sru/authorities?version=1.1&operation=searchRetrieve&query=… |
Catalogue of the German Union Catalogue of Serials (ZDB) | https://services.dnb.de/sru/zdb?version=1.1&operation=searchRetrieve&query=… |
Formats
Detailed information on the formats available is given here.
Terms of use and provision
Detailed information on terms of use and provision is given here.
Practical examples
Example | Explanation |
---|---|
https://services.dnb.de/sru | Query to the DNB’s SRU server |
/dnb | Catalogue specification (e.g. DNB) |
?version=1.1 | Specification of SRU version, standard |
&operation=searchRetrieve | Command to server |
&query= | Anfrage formulieren |
SW%3DGoethe %20or%20 SW%3DSchiller | SW is the name of the index, %3D is the URL encoding for =, search terms in this example: Goethe or Schiller (boolean combination) |
%20sortby%20tit/sort.ascending | Result set sorted by title from A-Z ascending |
&recordSchema=MARC21-xml | Desired format for SRU response |
SRU-query for the bibliographic data of a specific edition or calendar week of the New Release Service or a series of the Deutschen Nationalbibliografie: Queries for the calendar week must follow the pattern: YYseriesCW in the „WVN" index (e. g. 24N05 or for Series A, Edition 05 of year 2024 = 24A05). The calendar week requires two digits, weeks 1 through 9 starting with 0.
Example:
https://services.dnb.de/sru/dnb?version=1.1&operation=searchRetrieve&query=WVN%3D24A05&recordSchema=MARC21-xml
The following qualifications are possible:
Entities | Bibliographic genre |
---|---|
Geographical entity | Tg |
Congress/event | Tf |
Corporate body | Tb |
Person | Tp |
Subject term | Ts |
Work | Tu |
The Asterisk *is a placeholder for any number of characters and must be placed directly behind the value.
Examples of SRU requests:
Tp* (Person)
https://services.dnb.de/sru/authorities?version=1.1&
operation=searchRetrieve&
query=WOE%3DRupp%20Elisabeth%20and%20BBG%3DTp*&
recordSchema=MARC21-xml
Ts* (Subject term)
https://services.dnb.de/sru/authorities?version=1.1&
operation=searchRetrieve&
query=WOE%3DMarketing%20and%20BBG%3DTs*&
recordSchema=MARC21-xml
Subject headings can be obtained by qualifiying the search with „COD=s“:
https://services.dnb.de/sru/authorities?version=1.1&
operation=searchRetrieve&
query=WOE%3Dsozialistenkongress%20and%20COD%3Ds&
recordSchema=MARC21-xml
URL coding
In URL-Encoding umlauts are coded using UTF-8 and with a prefixed % sign (percent encoding).
Example: Lower case ö in UTF-8 = C3 B6. With prefixed % sign = %C3%B6.
Zeichen | UTF-8 hexadezimal | |
---|---|---|
Ä | = | %C3%84 |
Ö | = | %C3%96 |
Ü | = | %C3%9C |
ä | = | %C3%A4 |
ö | = | %C3%B6 |
ü | = | %C3%BC |
ß | = | %C3%9F |
(space) | = | %20 |
" (quotation marks) | = | %22 |
/ (slash) | = | %2F |
\ (backslash) | = | %5C |
List of other characters |
In order to use "=" in a query (... query=dc.title=musik ...) the guidelines recommend replacing the second "=" by "%3D" (... query=dc.title%3Dmusik ...) and replacing special characters (e. g. diacritical marks with UTF-8 hexadecimal) in the search key (Standard).
Spaces e.g. before and after Boolean operators should be replaced by %20 (... SW%3DKRAFTWERK%20not%20SW%3DROBOTER ...), depending on client.
Number of data records returned per request
Standard (default): 10 data records per response
Maximum: 100 data records per reply if ...&maximumRecords=100 specified (possible values 1 to 100)
Call of further data records: ...&startRecord=101 (possible values 1 to 99,000)
Frequently asked questions (FAQ)
Contact
News
Last changes:
26.08.2024
Short-URL:
https://www.dnb.de/EN/sru
Contact:
schnittstellen-service@dnb.de