Wikidata:Identifiers

(Redirected from Wikidata:Identifier)

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 external identifiers pointing to authority control systems or databases. Examples include an ISBN for a book (ISBN-13 (P212), ISBN-10 (P957)) and the identifier 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 2023-01-10
datatype Wikidata property for an identifier (Q19847637) examples
external identifier 7721 VIAF ID (P214), ISBN-13 (P212), MeSH tree code (P672)...
string 132 Linguasphere code (P1396), FAA airport code (P240), IATA airport code (P238)...
item 89 intangible cultural heritage status (P3259), World Heritage criteria (P2614), mapping relation type (P4390)...
ExternalID 39 (ISBN-13 (P212), (IMDb ID (P345))
url 32 biography at the Bundestag of Germany URL (P1713), GRIN URL (P1421), Belarus Globe URL (P2488)
quantity 2 IPA number order (BEING DELETED) (P3917)
monolingualtext 2 ?
CommonsMedia 2 ?
Math 2 ?
Time 1 ?
WikibaseProperty 1 ?
total 5810

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

What to do when the original source goes offline / the identifier system is retired?
The standard procedure on Wikidata is to keep old identifiers even when a website goes offline. You may tag it with Wikidata property for a discontinued website (Q60457486), and if applicable update the formatter URL (P1630) to use the Wayback Machine (Q648266)

Items about identifiers edit

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

Wikidata contains several items about identifiers from general (unique identifier (Q6545185), code (Q188889), biometric identifier (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 Wikidata 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