Wikidata:Identifiers

From Wikidata
Jump to navigation Jump to search

Wikidata makes use of identifiers for both internal organization of the knowledge base and for its connection to other databases. This page gives an overview about identifiers in Wikidata.

Identifier types[edit]

Wikidata identifiers[edit]

Each Wikidata entity is identified by an entity ID, which is a number prefixed by a letter.

Entity IDs can also be used as globally unique URIs that follow the pattern http://www.wikidata.org/entity/ID where ID is an entity ID.

External identifiers[edit]

External identifiers can have

Properties to store external identifiers[edit]

Some properties have values that are identifiers in external identifier systems or databases. Examples include an ISBN for a book (ISBN-13 (P212), ISBN-10 (P957)) and the identfier of a movie or an actor in the Internet Movie Database (IMDb ID (P345)). Most of these identifier properties have datatype external identifier (external-id). All properties with datatype external identifier are listed here and here.

A special subset of identifier properties are used to map Wikidata items to corresponding entities in other databases. These properties should be organized as instances of Wikidata property for authority control (Q18614948) in particular and Wikidata property for an identifier (Q19847637) with its subclasses in general.

A SPARQL query gives all identifier properties with their datatype and class.

last updated 2018-08-21
datatype Wikidata property for an identifier (Q19847637) other examples
external identifier 3037 31 VIAF ID (P214), ISBN-13 (P212), MeSH Code (P672)...
string 96 Linguasphere code (P1396), FAA airport code (P240), IATA airport code (P238)...
url 13 biography at the Bundestag of Germany (P1713), GRIN URL (P1421), LinkedIn personal profile URL (P2035), page at Belarus Globe website (P2488)
item 5 intangible cultural heritage status (P3259), World Heritage criteria (P2614), mapping relation type (P4390)...
quantity 1 IPA number order (P3917)
total (3183) 3152 31

Some special identifers properties exist to map Wikidata entities to miltiple different external identifier systems or databases:

Items about identifiers[edit]

Identifier items in Wikidata are disputed so there is no best practice by now!

Wikidata contains several items about identifiers from general (unique identifier (Q6545185), code (Q188889), biometric identifer (Q11854279), ...) to specific (...). Most of these items are connected via properties such as instance of (P31), subclass of (P279), and part of (P361) but there is no consensus because definitions of identifiers differ with context and language. An attempt to differentiate identifier items gives three types of items:

Most identifier systems belong to an organization, database, and/or knowledge organization system (Q6423319) so there is not always an independent Wikidata item for the identifier but sometimes only for the system or organization which identifiers belong to.

Identifier items and identifier properties can be connected via Wikidata property (P1687) and subject item of this property (P1629).

Identifier values[edit]

Identifier values include all statements with identifier properties and some individual identifer items. If an identifier property has a statement with formatter URI for RDF resource (P1921), the identifier value in RDF can be constructed with this URI template.

Wikidata items having a given identifier as value with some given identifier property can be queried via SPARQL query service, Linked Data Fragments, and additional tools such as Wikidata resolver. To find a match you must use the full exact string form of the identifier. Finding a match based on just part of an identifier requires a significantly more complex SPARQL query.

Identifier lookup[edit]

List all identifiers of a given property that are stored in Wikidata[edit]

SPARQL query service

SELECT ?item ?itemLabel ?id WHERE {
  ?item wdt:P4466 ?id
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

Linked Data Fragments

Wikidata BEACON generator

wdmapper command line tool

$ wdmapper -g en get P4466


See also[edit]