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.
SRU interface standards
SRU functions
German National Library catalogues accessible via SRU
Formats
Testaccess / Access requirements
Costs
Contact
Practical examples
Syntax of a SRU query
URL coding
Number of data records delivered per query
SRU / Z39.50
Frequently Asked Questions (FAQs) /
Troubleshooting
SRU interface
standards
SRU protocol:
Version
1.1
Retrieval language CQL:
Version
1.1, Level 2
SRU functions
SRU incorporates three 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 name%3DSearch term%20or%20Search term ...
German National Library catalogues accessible via SRU
| Catalogue | Description in XML standard |
| Catalogue of German
National Library (DNB)
excluding GKD, PND and SWD Example SRU reply |
http://services.d-nb.de/sru/dnb?operation=explain&version=1.1 |
| Catalogue of Deutsches
Musikarchiv (DMA)
Sample SRU reply |
http://services.d-nb.de/sru/dnb.dma?operation=explain&version=1.1 |
| Catalogue of Corporate
Body Authority File (GKD)
Sample SRU reply |
http://services.d-nb.de/sru/gkd?operation=explain&version=1.1 |
| Catalogue of German Name
Authority File (PND)
Sample SRU reply |
http://services.d-nb.de/sru/pnd?operation=explain&version=1.1 |
| Catalogue of Subject
Headings Authority File (SWD)
Sample SRU reply |
http://services.d-nb.de/sru/swd?operation=explain&version=1.1 |
| Authorities (includes
GKD, PND und SWD)
Sample SRU reply |
http://services.d-nb.de/sru/authorities?operation=explain&version=1.1 |
Formats
The following formats are offered:
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 note to
sru-service@dnb.de
including your contact details and a fixed IP address or IP
range. Without this, access is not currently possible. In the
first quarter of the year 2011, we will be offering an
alternative access for those users without a fixed IP address
or IP range.
We will contact you as soon as possible to clarify any
unresolved issues and to obtain any additional data which is
required.
Following a successful test run you will be sent the agreement
forms on request.
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 records are basically free of charge,
as are bibliographic data in oai_dc format, see also the
conditions
of use for the German National Library's data services. Use
of bibliographic data in all other formats is charged.
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 50 | 10.00 | Price category 1 |
| up 100 | 17.00 | Price category 2 |
| up 500 | 83.00 | Price category 3 |
| up 1.000 | 158.00 | Price category 4 |
| up 2.500 | 375.00 | Price category 5 |
| up 5.000 | 713.00 | Price category 6 |
| up 10.000 | 1,350.00 | Price category 7 |
| up 20.000 | 2,550.00 | Price category 8 |
Individual agreements are drawn up for commercial use.
Contact
| sru-service@dnb.de | Monday - Friday from 09:00 to 16:00 |
| Nicole von der Hude | Tel.: +49-69-1525-1632 |
| Heike Eichenauer | Tel.: +49-69-1525-1074 |
Practical examples
Syntax of a SRU query
| Example | Explanation |
|
http://services.d-nb.de/sru
https://services.d-nb.de/sru |
Query to DNB's SRU server |
| /dnb | Identification of catalogue (e.g. DNB, GKD ...) |
| ?version=1.1 | SRU version, standard |
| &operation=searchRetrieve | Command to server |
| &query= | Query formulation |
| WOE%3DGoethe | WOE is the name of the index, %3D is the URL coding for =, search term here: Goethe |
| &recordSchema=MABxml-1 | Format desired for SRU reply |
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 |
| Lists 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 delivered per query
Standard (default): 10 data records per reply
Example
Maximum: 100 data records per reply if
...&maximumRecords=100 specified (possible values 1 to 100)
Example
Download of further data records: ...&startRecord=101
(possible values 1 to infinity)
Example
SRU / Z39.50
SRU has the following benefits in comparison to Z39.50:
- Retrieval language CQL
- Extensive catalogue selection
- Large selection of formats