DARIAH-DE Normdatendienste

last modified on Nov 29, 2021

Thesaurus of Geographical Names (Getty)

RESTful API

This DARIAH-DE's Getty service currently is using life data from getty.edu.

The API for DARIAH-DE's Getty service provides several possible usages:

  • by providing the beginning of a place name
  • by providing the exact place name
  • a place's Getty Thesaurus ID

Queries are case insensitive.

The autocomplete and exact match modes return a custom XML by default, but a JSON output can be retrieved by appending .json to the REST path (confer examples for usage).

Autocomplete

API Functionalities Query (example) Result (example)
/tgn/v1/starts-with(.json)?q=beginning-of-some-place-name Returns:Place namewhere the place is locatedGetty ID https://ref.de.dariah.eu/tgn/v1/starts-with?q=vagen
<term id="tgn:7091421">
<name>Vagen</name>
<path>Bavaria | Germany | Europe | World</path>
</term>
<term id="tgn:7220304">
<name>Vagenítion</name>
<path>Ioánnina | Epirus | Greece | Europe | World</path>
</term>
/tgn/v1/starts-with(.json)?q=beginning-of-some-place-name&georef=true-or-false Returns:Place namewhere the place is locatedGetty IDGeo coordinates (longitude and latitude) https://ref.de.dariah.eu/tgn/v1/starts-with?q=vagen&georef=true
<term id="tgn:7091421">
<name>Vagen</name>
<path>Bavaria Germany Europe World</path>
<longitude>11.866667</longitude>
<latitude>47.866667</latitude>
</term>
<term id="tgn:7220304">
<name>Vagenítion</name>
<variant>Vageníti</variant>
<path>Ioánnina Epirus Greece Europe
<longitude>20.712778</longitude>
<latitude>39.645278</latitude>
</term>
/tgn/v1/starts-with(.json)?q=beginning-of-some-place-name&details=true-or-false Returns:Place namewhere the place is locatedGetty IDGeo coordinates (longitude and latitude)link to RDF data set of the place in TNG https://ref.de.dariah.eu/tgn/v1/starts-with?q=vagen&details=true
<term id="tgn:7220304">
<match_name>Vagenítion</match_name>
<preferred_name>Vagenítion</preferred_name>
<variant>Vageníti</variant>
<path>Ioánnina Epirus Greece Europe
<link target="http://textgridlab.org/tgnsearch/tgnquery.xql?id=7220304"/>
<rdf-link target="http://vocab.getty.edu/tgn/7220304.rdf"/>
</term>
<term id="tgn:7091421">
<match_name>Vagen</match_name>
<preferred_name>Vagen</preferred_name>
<path>Bavaria Germany Europe World</path>
<longitude>11.866667</longitude>
<latitude>47.866667</latitude>
<link target="http://textgridlab.org/tgnsearch/tgnquery.xql?id=7091421"/>
<rdf-link target="http://vocab.getty.edu/tgn/7091421.rdf"/>
</term>

Exact matches

API Functionalities Query (example) Result (example)
/tgn/v1/exact-match(.json)?q=exact-place-name Returns:Place namewhere the place is locatedGetty ID https://ref.de.dariah.eu/tgn/v1/exact-match?q=scharzfeld
<term id="tgn:1041079">
<name>Scharzfeld</name>
<path>Lower Saxony Germany Europe World</path>
</term>
/tgn/v1/exact-match(.json)?q=exact-place-name&georef=true-or-false Returns:Place namewhere the place is locatedGetty IDGeo coordinates (longitude and latitude) https://ref.de.dariah.eu/tgn/v1/exact-match?q=scharzfeld&georef=true
<term id="tgn:1041079">
<name>Scharzfeld</name>
<path>Lower Saxony Germany Europe World</path>
<longitude>10.383333</longitude>
<latitude>51.633333</latitude>
</term>
/tgn/v1/exact-match(.json)?q=exact-place-name&details=true-or-false Returns:Place namewhere the place is locatedGetty IDGeo coordinates (longitude and latitude)link to RDF data set of the place in TNG https://ref.de.dariah.eu/tgn/v1/exact-match?q=scharzfeld&details=true
<term id="tgn:1041079">
<match_name>Scharzfeld</match_name>
<preferred_name>Scharzfeld</preferred_name>
<path>Lower Saxony Germany Europe World</path>
<longitude>10.383333</longitude>
<latitude>51.633333</latitude>
<link target="http://textgridlab.org/tgnsearch/tgnquery.xql?id=1041079"/>
<rdf-link target="http://vocab.getty.edu/tgn/1041079.rdf"/>
</term>

Result by Getty ID

API Functionalities Query (example)
/tgn/v1/getty-id(.rdf) Returns:the full RDF data set at http://vocab.getty.edu/tgn/getty-id.rdf https://ref.de.dariah.eu/tgn/v1/7003670orhttps://ref.de.dariah.eu/tgn/v1/7003670.rdf
/tgn/v1/getty-id.json Returns:the full JSON data set of http://vocab.getty.edu/tgn/getty-id https://ref.de.dariah.eu/tgn/v1/7003670.json
/tgn/v1/getty-id.jsonld Returns:the full JSONLD data set of http://vocab.getty.edu/tgn/getty-id https://ref.de.dariah.eu//tgn/v1/7003670.jsonld
/tgn/v1/getty-id.n3 Returns:the full N3/Turtle data set of http://vocab.getty.edu/tgn/getty-id https://ref.de.dariah.eu/tgn/v1/7003670.n3
/tgn/v1/getty-id.nt Returns:the full N-Triples data set of http://vocab.getty.edu/tgn/getty-id https://ref.de.dariah.eu/tgn/v1/7003670.nt>

RESTful API (deprecated)

DARIAH-DE's Getty service currently runs on a (n relatively old) TGN dump in an eXist-db.

ac – autocompletion

?ac=xxx – return every hit starting with xxx

https://ref.de.dariah.eu/tgnsearch/tgnquery.xql?ac=Bam

ln – long

?ln=xxx – return more detailed information on place xxx

https://ref.de.dariah.eu/tgnsearch/tgnquery.xql?ln=berlin

id – identifier

?id=xxx – return everything about place with id xxx

https://ref.de.dariah.eu/tgnsearch/tgnquery.xql?id=7004325

Gemeinsame Normdatei (GND)

Live requests from current DNB GND via SRU, persons only

RESTful Parameters

ac – autocompletion

?ac=xxx – return every hit starting with xxx

https://ref.de.dariah.eu/pndsearch/pndquery.xql?ac=Ringel

ln – long

?ln=xxx – return more detailed information on person xxx

https://ref.de.dariah.eu/pndsearch/pndquery.xql?ln=Ringeln

id – identifier

?id=xxx – return everything about person with id xxx

https://ref.de.dariah.eu/pndsearch/pndquery.xql?id=118601121

It is possible to retrieve the whole dataset in rdf from https://d-nb.info/gnd/118601121/about

Advanced Usage (passing SRU parameters)

You also can use DNB parameters, as stated in https://services.dnb.de/sru/dnb?operation=explain&version=1.1 for they are piped through, such as "dnb.sw" or "dnb.geo".

Search for names

https://ref.de.dariah.eu/pndsearch/pndquery.xql?ln=W%C3%B6hler

Search for professions

https://ref.de.dariah.eu/pndsearch/pndquery.xql?ln=W%C3%B6hler%20and%20dnb.sw=Soziologe

Search for refined names:

https://ref.de.dariah.eu/pndsearch/pndquery.xql?ln=W%C3%B6hler%20and%20dnb.sw=Soziologe%20and%20dnb.geo=Heidelberg

You can also get RDF or JSON responses using requests such as

https://ref.de.dariah.eu/pndsearch/rdf?ln=W%C3%B6hler

https://ref.de.dariah.eu/pndsearch/json?ln=W%C3%B6hler

OpenAPI Documentation and SwaggerUI

is also available: https://ref.de.dariah.eu/doc/api/index.html