Library Hub Cataloguing Z39.50

The following gives all the basic information for accessing and searching using the Library Hub Cataloguing Z39.50 API.

We also suggest you consider adding some basic options to all your searches, notably:

  • Limiting your search to your preferred record format, eg. RDA
  • Adding a limit to the number of records found, eg. return the first 10 records
The most vital information you need to know to get your Z39.50 client connected to the Library Hub Cataloguing Z39.50 service.
Port: 210
Database name: NBK (or NBKPSI for compatibility with legacy system.)
Record syntax: MARC Exchange or MARCXML
Access: Username and password are required.

Record Syntaxes

MARC21 is supported. Data export is in MARC Exchange or MARCXML.


Only a Use attribute is required in a search. Unless an alternative is specified most searches will be treated as keyword searches.

If you wish to search using search keys (see notes), then for Use attributes 4 & 1004 you do need to include Structure attribute 3 Key; otherwise the search will default to a keyword search and this is very unlikely to work as anticipated. By contrast Use attributes 57 & 1000 assume a key is used and so a keyword search using those Use attributes is unlikely to work.

If an unsupported attribute of any kind is included in a search it will not be rejected, but the query will use the default values, which will often mean a keyword search.

Jisc Supported Bib-1 Use Attribute values

Supported Bib-1 Use attributes.
Bib-1 Use Attribute Description
1 Personal name, including personal subject
2 Corporate name, including corporate subject
3 Conference name, including conference subject. Can be combined with Structure attribute – key 3 to search for the 3-2-2-1 title key [see notes]
4 Title keyword
12 Local number, ie. the NBK record number
13 Dewey classification. See notes re. number search
21 Subject heading
27 LCSH. This include 600-651, 655 second indicator 0 or 1.
30 Date of publication. This is treated as a number search [see notes]
31 Date of publication. This is treated as a number search [see notes]
54 Language
56 Library code eg. oxf, A list of all the library codes is available on the Libraries page of the Discover web site.
57 & 1000 Name and title. Supports searching for the author-title 4-4 key without the need to use the Structure attribute – key 3. Other key searches will also work with this use attribute [see notes]
58 Name geographic, taken from the 751 and 752
59 Place of publication
62 Abstract and table-of-contents
63 Note
1002 Name including personal name, corporate name, conference name, personal subject, corporate subject, and conference_subject
1003 Name including personal name, corporate name, conference name
1004 Personal name, excluding subject. Can be combined with key structure attribute 3 to search for an author key [see notes]
1005 Corporate name, excluding subject
1006 Conference name, excluding subject
1007 Standard Identifier, includes ISBN, ISSN, ISMN, ISRC, ISSNL, IAN
1009 Subject, Personal name
1016 Keyword
1017 Keyword
1018 Publisher
1024 Map scale. This is treated as a number search [see notes]
1031 Material type code based on Leader character position 6 and 7: BK, CF, MP, CR, MU, MX, VM. There is also a code NK for not known.
1073 Corporate subject
1074 Conference subject
1101 Dublin Core publisher name
5109 Descriptive cataloguing form. Valid search terms are: rda, aacr2, other
5201 Record quality Breadth measure [See notes]. This is treated as a number search [see notes]
5202 Record quality Depth measure [See notes]. This is treated as a number search [see notes]
5300 MARC field tag eg. 505. You can also search for a MARC tag and subfield eg. 6004; or a specific type of 880 eg. 880245
5301 Encoding level, Leader character position 17. To search for a Full level record use the word: full

Some Dublin Core use attributes are supported and can be used if preferred.

Supported Dublin Core Use attributes.
Bib-1 Use Attribute Description
1097 Dublin Core Title
1099 Dublin Core Subject, includes subject, personal subject, corporate subject, and conference subject
1102 Dublin Core Date of publication
1105 Dublin Core Language
1098 Dublin Core Creator, includes personal name, corporate name, conference name

Other attributes

Supported Bib-1 Relation Attribute values

Relation attributes other than 3 Equal are only supported for number searches.

  • 1 Less than
  • 2 Less than or equal
  • 3 Equal (default)
  • 4 greater than or equal
  • 5 greater than

Supported Bib-1 Position Attribute values

  • 3 Any position in field (default)

Supported Bib-1 Structure Attribute values

Supported Bib-1 Truncation Attribute values

  • 1 Right Truncation
  • 100 Do not truncate (default)

Supported Bib-1 Completeness Attribute values

  • 1 Incomplete subfield (default)

See the Library of Congress web site for full details of the Bib-1 attribute set

Sorting results

There are three levels of sort in the default sort, used in the following order:

Results sets can be sorted by Use attribute or sort-field name. Which you use will depend upon your Z39.50 client.

Supported Sort options.
Field Use attribute Sort-field
Title 4 title or ti
Year of publication 30 or 31 year or date
Quality measure: breadth 5201 breadth
Quality measure: depth 5202 depth
Relevancy rank 9999 rank

In future, we will be including the option to set some preferences through the Contributor Dashboard. These preferences will automatically be applied to all searches, for example a choice of preferred institutions to let you limit your search to those libraries whose records you normally use; or a preference for RDA or AACR2 records.

Searching and Boolean operators

Type-1 queries are supported. The Boolean operators AND, OR and NOT are supported.

Character set

Records are made available in UTF-8


Quality measures

The Quality measures aim to provide a practical working tool that gives information about the content of each record, with quality scores reduced where MARC errors/potential errors are identified. The Quality measures are treated as numbers for searching, eg. you can limit a search to records that match a particular score, or use an open ended range to specify a preferred minimum score value. [See below for number searching].

Each record is given two quality scores:

  • Quality measure: breadth: This assigns an overall quality value to a record. The focus here is on the breadth of coverage, essentially the range of fields included. Fields are grouped into categories and where a record has any one of the fields in a category it is given a score of one. There are 19 categories, so there is a score range of 0-19.
  • Quality measure: depth: In this second check the focus is on the depth of coverage, for example, rather than just checking that there is a 6XX field, looking at how many 6XX fields are included. This helps differentiate records with the same depth score. The depth scale can be as wide as the records are extensive.

Full details of the data checking and Quality measures in use currently are available on our blog: NBK Draft Record Quality Measures

Number searches

Search terms for number queries can be given as either a number or a range. Bib-1 Relation attributes are supported but not required for range searching. Instead of using the Relation attributes you can use search terms like those shown below.

Example numeric range searches.
Description Search term
Single number 2010
Closed range 2000-2010
Closed range 1800..1850
Range with open start -50000
Range with open start ..10000
Range with open end 2010-
Range with open end 100000..
Closed Range; +/- 5 years when searching the publication year, otherwise +/- 30% of the given number. Not available for the DDC search. ~50000

When searching map scales the search term can be either a simple number, e.g. 63360, or have the 1: prefix, e.g. 1:50,000. Commas can only be used in map scale terms, not in the other number searches.

Number ranges can be used for the Dewey search, or you can use the Bib-1 Right Truncation attribute. For example a search term of 555.5 with Right Truncation is the same as the range 555.5-555.59999999.

Key searches

There are three key searches available. These support quick and, generally, precise searching.

Personal name key

To construct a personal name key, use the author surname and initials, joined with a hyphen. Case is not significant. For example, to find the author:

  William Dean Howells

you would use the key


If the author is a single word treat it as the ‘surname’ without initials, retaining the hyphen, for example, to search for the author:


You would use the key


Author title 4-4 key

To construct an author title key, use the first four letters of the author surname and the first four letters of the title joined with a hyphen, ignoring non-filing characters. Case is not significant. For example, to search for:

  The heretics : a novel / by Humphrey Slater

Use the key


If the name or title have less than four letters just use those available, for example, to search for:

  Why I write / George Orwell

Use the key


Title 3-2-2-1 key

To construct a title key, ignore non-filing characters and take the first three letters of the first title word, the first two letters of the next two title words, and the first letter of the fourth title word, joining them with hyphens. Case is not significant. For example, to search for:

  Trade policy review. The Republic of Iceland / General Agreement on Tariffs and Trade.

Use the key


If some words have less than the expected number of letters just use what there is, for example, to search for:

  Shropshire : a dog walker's guide / Judy Smith.

Use the key


Where a title has less than four words use what is available but retain the hyphens, for example, to search for:

  Sanditon / Jane Austen

Do a search for