Shortcut: WD:ID

Wikidata:Identifiers

From Wikidata
(Redirected from Help:Identifiers)
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 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: 1 August 2024
Wikibase datatype (Q19798645) Wikidata property for an identifier (Q19847637) example (Q14944328)
external identifier (Q21754218) 8,946 ISBN-13 (P212), VIAF ID (P214), IMDb ID (P345), MeSH tree code (P672), ISBN-10 (P957), Linguasphere code (P1396)...
Wikibase item datatype (Q115470359) 1,661 IMA status and/or rank (P579), World Heritage criteria (P2614), intangible cultural heritage status (P3259), mapping relation type (P4390)...
quantity (Q29934271) 658 Human Development Index (P1081), population (P1082), maximum capacity (P1083)...
Wikibase string datatype (Q29934246) 345 IATA airport code (P238), ICAO airport code (P239), FAA airport code (P240), catalog code (P528), house number (P670), formatter URL (P1630)...
Wikibase URL datatype (Q29934281) 109 GRIN URL (P1421), equivalent class (P1709), biography at the Bundestag of Germany URL (P1713), external subproperty (P2236), Belarus Globe URL (P2488)...
CommonsMedia (Q29934260) 81 video (P10), audio (P51), astronomic symbol image (P367), Sandbox-CommonsMediaFile (P368)...
time (Q29934149) 67 first flight (P606), time of object orbit decay (P621), date of disappearance (P746)...
monolingual text (Q21044568) 62 official name (P1448), nickname (P1449), Sandbox-Monolingual text (P1450), motto text (P1451)...
Wikibase Math datatype (Q42742777) 36 defining formula (P2534), Sandbox-Mathematical expression (P2535), in defining formula (P7235)...
Wikibase property datatype (Q115468759) 21 subproperty of (P1647), related property (P1659), Wikidata property (P1687), inverse property (P1696)...
Wikibase sense datatype (Q115630354) 19 periphrastic definition (P7219), lexeme sense for periphrastic definition (P7220), link for periphrastic definition (P7221)...
Wikibase lexeme datatype (Q115470231) 15 Sandbox-Lexeme (P5188), derived from lexeme (P5191), Wikidata property example for lexemes (P5192), classifier (P5978)...
GlobeCoordinate (Q29934236) 10 coordinate location (P625), Sandbox-GeoCoordinateValue (P626), coordinates of the point of view (P1259)...
Wikibase form (Q54285143) 10 Sandbox-Form (P5189), Wikidata property example for forms (P5193), generational suffix (P8017), form decomposition (P12527)...
TabularData (Q42743260) 6 Sandbox-Tabular data (P4045), weather history (P4150), based on tabular data (P8265)...
Wikibase Musical Notation datatype (Q62080777) 6 Sandbox-Musical Notation (P6604), ascending scale (P7598), descending scale (P7599)...
GeoShape (Q42742911) 3 geoshape (P3896), Sandbox-Geographic shape (P4047), distribution map of taxon (P8485)
Entity Schema (Q66305346) 2 EntitySchema for this class (P12861), Sandbox-EntitySchema (P12886)
total 12,057 18

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]