SRU Overview
SRU (Search / Retrieve via URL) is a standardised web service protocol used for searching databases in the Internet. The results of the search are issued in a defined XML format.
The SRU protocol permits targeted searches using search indices and keys, displaying any hits in its own environment. Searches are formulated in the CQL (Common / Contextual Query Language) retrieval language.
The SRU standard was published by the Library of Congress and is a further development of the Z39.50 protocol.
Following login and authorisation, the German National Library allows its data to be searched using an HTTP or HTTPS interface and the SRU-protocol.
Further information is also available in Volltext Dialog mit Bibliotheken 2010,2 (PDF, 9MB, Not barrier-free file.).(available only in German)
- SRU interface standards
- SRU functions
- German National Library catalogues accessible via SRU
- Formats
- Test access / Access Requirements
- Conditions and Costs
- Contact
- Practical examples
- Qualified by entity in "authorities" catalogue
- URL coding
- SRU / Z39.50
SRU interface standards
SRU protocol: Version 1.1
Retrieval language CQL: Version 1.1, Level 2
SRU functions
SRU incorporates the basic functions:
Explain: Self-description in XML standard format, including information on
- Database
- Indices
- Data formats
Search / Retrieve: Search query
- Retrieval language: CQL (Common / Contextual Query Language)
- Boolean operators (and, or, not) are supported
Search query structure: ... index%3Dsearch term%20or%20search term...
German National Library catalogues accessible via SRU
| Catalogue selection | Description in XML standard format |
|---|---|
| Catalogue of German National Library (DNB) except Integrated Authority File Example SRU reply | http://services.dnb.de/sru/dnb?operation=explain&version=1.1 |
| Catalogue of Deutsches Musikarchiv (DMA) Sample SRU reply | http://services.dnb.de/sru/dnb.dma?operation=explain&version=1.1 |
| Authorities: Catalogue of Integrated Authority File (GND) Sample SRU reply | http://services.dnb.de/sru/authorities?operation=explain&version=1.1 |
Formats
The following formats are offered in UTF-8 decomposed:
| MARC 21-XML Example | XML variant of MARC 21 | http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd |
| MABxml-1 Example | XML variant of MAB2 only for bibliographic data, Provision ends on 30 June 2013 | mabxml-1.xsd |
| DNB Casual (oai_dc) Example | Selection of Dublin Core elements only for bibliographic data | http://www.openarchives.org/OAI/2.0/oai_dc.xsd |
| RDFxml Example | Linked Data Service | http://www.w3.org/2000/07/rdf.xsd |
Test access / Access Requirements
You can obtain 100 data records free of charge over a 4-week test phase.
To do this, please send a mail containing your contact details and a fixed IP address or IP-range, the catalogue and format to the Interface Service. Alternatively it is also possible to obtain access via an individual access code (access token). We will contact you as soon as possible to clarify any unresolved issues and to request any additional data which is required.
Following a successful test run you will be sent the agreement forms for accessing charge data on request.
Conditions and Costs
During the test phase, use of up to 100 data records is free of charge via the SRU interface.
Afterwards a charge may be levied, depending on the database and the required data format.
Authority data is supplied free of charge, so too is bibliographic data on online publications (Sereis O of the Deutsche Nationalbibliografie). Also free of charge is the use of all data in RDFxml format and bibliografic data in DNB Casual (oai_dc) (Stand: Oktober 2011) (PDF, 26KB, Not barrier-free file.)(available only in German), see also the business model for use of data services of the German National Library. A fee is charged for bibliographic data from the current and previous year in all other formats. A contract must be concluded to obtain this charged data.
Sufficient units must be credited to your account in order to obtain data records.
Each data record corresponds to one unit. One of the following price categories can be selected depending on the individual usage volume:
| Data records | EUR | Price category |
|---|---|---|
| up 100 | 13.00 | Price category 1 |
| up 500 | 62.00 | Price category 2 |
| up 1,000 | 119.00 | Price category 3 |
| up 2,500 | 258.00 | Price category 4 |
| up 5,000 | 535.00 | Price category 5 |
| up 10,000 | 1,013.00 | Price category 6 |
| up 20,000 | 1,913.00 | Price category 7 |
The commercial use of charged bibliographic data (except for CCO conditions) is subject to separate agreements.
Contact
| Interface Service | Monday - Friday from 9:00. to 15:00. |
| Nicole von der Hude | Tel.: +49-69-1525-1632 |
| Heike Eichenauer | Tel.: +49-69-1525-1074 |
Practical examples
Syntax SRU request
| Example | Explanation |
|---|---|
| http://services.dnb.de/sru https://services.dnb.de/sru | Query to DNB's SRU server |
| /dnb | Identification of catalogue (e.g. DNB, authorities ...) |
| ?version=1.1 | SRU version, standard |
| &operation=searchRetrieve | Command to server |
| &query= | Formulate request |
| WOE%3DGoethe | WOE is the name of the index, %3D is the URL coding for =, search term here: Goethe |
| &recordSchema=MARC21_xml | Desired format for SRU response |
Qualified by entity in "authorities" catalogue
The following qualifications are possible:
| Entities | Bibliographic genre |
|---|---|
| Geographical entity | Tg* |
| Congress | Tf* |
| Corporate body | Tb* |
| Name | Tn* |
| Person | Tp* |
| Subject Term | Ts* |
| Work | Tu* |
The Asterisk *is a placeholder fo any number of characters and must be placed directly before the value.
Examples of SRU requests:
Tp* (Person):
http://services.dnb.de/sru/authorities?version=1.1&operation=searchRetrieve&query=WOE%3DRupp%20Elisabeth%20and%20BBG%3DTp*&recordSchema=MARC21-xml
Ts* (subject term):
http://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“:
http://services.dnb.de/sru/authorities?version=1.1&operation=searchRetrieve&query=WOE%3Dsozialistenkongress%20and%20COD%3Ds&recordSchema=MARC21-xml
URL coding
In URL-Coding 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.
| Ä | = | %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 "=" durch "%3D" (... query=dc.title%3Dmusik ...) and replacing special characters (e.g. diakritical marks with UTF-8 hexadecimal) in the search key (cf. Standard).
Spaces e.g. before and after Boolean operators should be replaced by %20 (... KRAFTWERK%20not%20ROBOTER ...), 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 infinity)
SRU / Z39.50
SRU offers the following benefits in comparison to Z39.50:
- Retrieval language CQL
- Extensive catalogue selection
- Large selection of formats
Last update: 13.2.2013


