DBpedia Lookup Service

The DBpedia Lookup Service can be used to look up DBpedia URIs by related keywords. Related means that either the label of a resource matches, or an anchor text that was frequently used in Wikipedia to refer to a specific resource matches (for example the resource http://dbpedia.org/resource/United_States can be looked up by the string “USA”). The results are ranked by the number of inlinks pointing from other Wikipedia pages at a result page.


Two APIs are offered: Keyword Search and Prefix Search. The URL has the form
http://lookup.dbpedia.org/api/search.asmx/<API>?<parameters>

Keyword Search


The Keyword Search API can be used to find related DBpedia resources for a given string. The string may consist of a single or multiple words.


Example: Places that have the related keyword “berlin”
http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?QueryClass=place&QueryString=berlin

Prefix Search (i.e. Autocomplete)


The Prefix Search API can be used to implement autocomplete input boxes. For a given partial keyword like berl the API returns URIs of related DBpedia resources like http://dbpedia.org/resource/Berlin.


Example: Top five resources for which a keyword starts with “berl”
http://lookup.dbpedia.org/api/search.asmx/PrefixSearch?QueryClass=&MaxHits=5&QueryString=berl

Parameters

The three parameters are

  • QueryString: a string for which a DBpedia URI should be found.
  • QueryClass: a DBpedia class from the Ontology that the results should have (for owl#Thing and untyped resource, leave this parameter empty).
    • CAUTION: specifying any values that do not represent a DBpedia class will lead to no results (contrary to the previous behavior of the service).
  • MaxHits: the maximum number of returned results (default: 5)

Results

DBpedia Lookup currently contains data from DBpedia 3.6. Resources of redirect pages are excluded in the results.
The service relies on a Lucene index that has been build based on the English Wikipedia dump from October 2010.


The following data is returned in XML format:

  • URI 
  • Label
  • (Short) Description
  • Classes (URI & label)
  • Categories (URI & label)
  • Refcount (number of Wikipedia page inlinks)

For backward compatibility only, empty <Templates /> and <Redirects /> tags are returned.


 
There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]

Information

Last Modification: 2011-03-11 13:12:19 by Max Jakob