The European Library OpenSearch API allows you to develop applications to search and display the European Library collections metadata and previews. Along with standard keyword searching , the API also offers faceted searching.
Overview
Currently the European Library OpenSearch API is available only to registered users of the European Library . The API is available for non-commercial use only.
To request an API-key register with the portal and look into the myResearch page - on the right side, you will see the API Details.
THE SEARCH API AT A GLANCE | ||
Opensearch URI | http://data.theeuropeanlibrary.org/opensearch/json?query=\{queryString}(¶ms) | |
| Resource Lists | http://data.theeuropeanlibrary.org/contributors http://data.theeuropeanlibrary.org/collections http://data.theeuropeanlibrary.org/disciplines http://data.theeuropeanlibrary.org/countries http://data.theeuropeanlibrary.org/languages
| |
Resource URI | http://data.theeuropeanlibrary.org/contributor/P01370?format=xml http://data.theeuropeanlibrary.org/collection/a1041?format=xml http://data.theeuropeanlibrary.org/discipline/H000?format=xml http://data.theeuropeanlibrary.org/country/AUT?format=xml http://data.theeuropeanlibrary.org/language/LAT?format=xml
| |
Scope | The European Library offers highly convenient access to the collections of national and research libraries in 48 countries. The http://data.theeuropeanlibrary.org/ sub site is meant to give access to effectively all information held in The European Library. Besides search access (identical to http://www.theeuropeanlibrary.org/tel4/search?query=bible&link-level=THUMBNAIL&content-language=gre&iyear=[1000+TO+1200]) one can search the API with the same parameters but with different base URL. Beyond the search API we provide access to authoritative data such as languages, countries, disciplines, contributors, and collections. For these resources we currently provide a "very simple" format according to the schema http://data.theeuropeanlibrary.org/resources.xsd | |
HTTP method | GET | |
Response formats | JSON, XML ( ESE), RDF (EDM - Testing Phase) | |
Simple Search
For just one keyword search the query is this keyword.
Let's say that you want to search for "Greece" . Then the queryString is Greece and the URI is
http://www.theeuropeanlibrary.org/tel4/opensearch/json?query=Greece&apikey=
If you want to search for multiple keywords, let's say "Ancient Greece" , then the queryString is Ancient%20Greece and the URI is
http://www.theeuropeanlibrary.org/tel4/opensearch/json?query=Ancient%20Greece&apikey=XXX
Similarly if more keywords are to be included in the queryString then the queryString should be
keyword1%20keyword2%20keyword3 and the URI is
http://data.theeuropeanlibrary.org/opensearch/json?query=keyword1%20keyword2%20keyword3&apikey=XXX
Advanced Search
In order to make an advanced query search , the query parameter should follow the following regular expression
(advanced)(\()(\()(ANY|TITLE|TYPE|CREATOR|SUBJECT|CONTRIBUTOR|YEAR_FROM|YEAR_TO|LANGUAGE)(,)((?:[a-zA-Z0-9\s]*+))(\))((AND|OR|NOT)(\()(ANY|TITLE|TYPE|CREATOR|SUBJECT|CONTRIBUTOR|YEAR_FROM|YEAR_TO|LANGUAGE)(,)((?:[a-zA-Z0-9\s]*+))(\)))*(\))
The search terms could be : ANY TITLE TYPE CREATOR SUBJECT CONTRIBUTOR YEAR_FROM YEAR_TO LANGUAGE
The search operators could be : AND, OR , NOT.
Examples:
- In the title both terms "rome" and "italy" then query=advanced((TITLE,rome)AND(TITLE,italy))
- In the title one of the terms "rome" and "italy" then query=advanced((TITLE,rome)OR(TITLE,italy))
- In the title the term "italy" but not the term rome then query=advanced((TITLE,rome)NOT(TITLE,italy))
Working With Search Fields (optional params)
Search Fields are Accessibility, Discipline, Language, Contributor, Collection, Year of Publication, Country of Collection.
The format of adding a facet filter is &search_field=param_value
For example , if you want to search all items for search term :"Ancient Rome" that are available online then the URI is
http://data.theeuropeanlibrary.org/opensearch/json?query=Ancient%20Greece&link-level=DIGITAL_OBJEC
Accessibility (link-level)Accessibility (link-level) can have the following values.
Country of Collection (collection-spatial)Collection spatial (collection-spatial) can have the following values.
Year of Publication (iyear) Year of publication or depending on the provided data, date of creation or availability.
| Discipline (discipline-id) Discipline (discipline-id) can have the following values.
Content Language (content-language)Content language (content-language) can have the following values.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Number of Results Returned (count)
It is optional. If not filled 20 results are returned. The maximum count allowed is 5000.
In case you do not want any results , but just the number of results , you should add &count=0
Responses
JSON Response
When accessing http://data.theeuropeanlibrary.org/opensearch/json?query={queryString}(¶ms)
a json object returned contains basic information. To access the "full" record one must follow the RELATED_RESOURCE link.
A full JSON record such as http://data.theeuropeanlibrary.org/record/2000068736918?format=json looks like
XML Response
The xml response is according to the ESE 3.4 specification.
