You can find a detailed description of the supported queries in the Lucene query string syntax documentation.
In particular note that when querying for URLs, special characters like colons, dashes, and slashes have to be escaped:
By default, this service returns structured API responses (as JSON):
curl http://lobid.org/organisations/DE-6
It supports content negotiation based on the "Accept" header to serve JSON (application/json), CSV (text/csv), TSV (text/tab-separated-values), JSON lines (application/x-jsonlines), or HTML (text/html):
curl --header "Accept: text/csv" http://lobid.org/organisations/search?q=kunst
curl --header "Accept: text/tab-separated-values" http://lobid.org/organisations/search?q=kunst
curl --header "Accept: application/x-jsonlines" http://lobid.org/organisations/search?q=kunst > kunst.jsonl
An optional "format" query parameter can be used to override the "Accept" header, e.g. to display JSON in a browser: /organisations/DE-6?format=json
For individual organisations, the format parameter values can be used as file extensions in URLs: /organisations/DE-6.json
For larger requests, the response can be compressed as gzip:
curl --header "Accept-Encoding: gzip" "http://lobid.org/organisations/search?q=museum&format=bulk" > museum.gz
Individual organisations additionally support different RDF serializations (see section on JSON-LD).
The API supports a response format for auto-complete suggestions using a specified field:
This can be used to set up an auto-complete search function that inserts an ID for the label that the user selected:
This sample is implemented with JavaScript and JQuery UI like this:
$('input.search-organisations').autocomplete({ source : function(request, response) { $.ajax({ url : "http://lobid.org/organisations/search", dataType : "jsonp", data : { q : request.term, format : "json:name" }, success : function(data) { response(data); } }); }, select: function(event, ui) { $('#id').val('id:"'+ui.item.id+'"'); } });
JSON API calls serve JSON-LD (JSON for Linking Data). You can experiment with that by pasting responses or URLs in the JSON-LD Playground.
jsonld format --nquads http://lobid.org/organisations/DE-6
Using the Accept
header, individual organisations can be requested directly as RDF/XML, Turtle, or N-Triples:
curl --header "Accept: application/rdf+xml" http://lobid.org/organisations/DE-6
curl --header "Accept: text/turtle" http://lobid.org/organisations/DE-6
curl --header "Accept: application/n-triples" http://lobid.org/organisations/DE-6
As described in the section on content types, these are also supported in the format query parameter and as file extensions in URLs:
{
"rs" : "053150000000",
"linkedTo" : {
"id" : "http://lobid.org/organisations/DE-605#!",
"label" : "Hochschulbibliothekszentrum des Landes Nordrhein-Westfalen (hbz)"
},
"telephone" : "0049 221 :4 78-5685",
"alternateName" : [ "ZB MED - Informationszentrum Lebenswissenschaften, Köln", "Köln ZB MED" ],
"type" : "Library",
"classification" : {
"id" : "http://purl.org/lobid/libtype#n15",
"type" : "Concept",
"label" : {
"de" : "Zentrale Fachbibliothek",
"en" : "Central Subject Library"
}
},
"mainEntityOfPage" : {
"id" : "http://lobid.org/organisations/DE-38M#!",
"dateCreated" : "18-11-99",
"dateModified" : "27-03-24",
"wasGeneratedBy" : {
"type" : "Activity",
"used" : [ {
"id" : "http://services.dnb.de/sru/bib?operation=searchRetrieve&query=isl%3DDE-38M&recordSchema=PicaPlus-xml&version=1.1",
"sourceOrganization" : {
"id" : "https://sigel.staatsbibliothek-berlin.de/vergabe/isil/",
"label" : "Deutsche ISIL-Agentur und Sigelstelle an der Staatsbibliothek zu Berlin"
}
} ]
}
},
"@context" : "http://lobid.org/organisations/context.jsonld",
"url" : "https://www.zbmed.de",
"picaPPN" : "009008853",
"provides" : "https://www.livivo.de/?idb=ZBMED",
"name" : "ZB MED - Informationszentrum Lebenswissenschaften, Köln",
"containedIn" : "http://sws.geonames.org/6553049/",
"location" : [ {
"address" : {
"streetAddress" : "Gleueler Str. 60",
"addressLocality" : "Köln",
"postalCode" : "50931",
"addressCountry" : "DE",
"type" : "PostalAddress"
},
"openingHoursSpecification" : {
"description" : "Mo-Fr 9.00-19 (Lesesaal)",
"comment" : "Ausleihe/Allg. Information: Mo-Fr 9.00-16.00, InfoCenter: Mo-Fr 9.00-15.00; weitere Schließtage s.Homepage",
"type" : "OpeningHoursSpecification"
},
"geo" : {
"lat" : "50.92466",
"lon" : "6.91666"
},
"type" : "Place"
} ],
"id" : "http://lobid.org/organisations/DE-38M#!",
"gndIdentifier" : "5149318-4",
"isil" : "DE-38M",
"fundertype" : {
"id" : "http://purl.org/lobid/fundertype#n07",
"type" : "Concept",
"label" : {
"de" : "Körperschaft oder Stiftung des öffentlichen Rechts",
"en" : "Corporate Body or Foundation under Public Law"
}
},
"sigel" : "38 M",
"collects" : {
"type" : "Collection",
"extent" : {
"id" : "http://purl.org/lobid/stocksize#n10",
"type" : "Concept",
"label" : {
"de" : "1.000.001 und mehr",
"en" : "1,000,001 and more"
}
},
"subject" : [ "Medizin" ]
},
"email" : "mailto:info@zbmed.de",
"dbsID" : "BJ038",
"name_en" : "ZB MED - Information Centre for Life Sciences, Cologne",
"sameAs" : [ "http://www.wikidata.org/entity/Q1204536", "https://d-nb.info/gnd/5149318-4", "https://ld.zdb-services.de/resource/organisations/DE-38M" ]
}
The lobid-organisations service implements the OpenRefine Reconciliation API. Follow these instructions to use it.