Wikibase indexing RDF export for wikibase indexing
|
This page describes the RDF dump and export format produced by Wikidata and used for export and indexing purposes.Note that while it is close to theformat used by theWikidata Toolkit, it is not the same code and not the same format.While we strive to keep divergence to a minimum, there may be differences, and one should use documentation only for the format that is actually being consumed.
This document describes the RDF dump as it can be downloaded from theWikimedia dump source, and while it can be used to create queries for the Wikidata Query Service, the service can have small differences in how the data there look like.See theWDQS data differences chapter for the full list.
The canonical URI of the Wikibase RDF ontology ishttp://wikiba.se/ontology.The current version can be found athttp://wikiba.se/ontology-1.0.owl.
Changes to the RDF mapping are subject to theStable Interface Policy.

The RDF format is a binding for theWikibase data model and it represents an export format for it.That means, in particular, that if the data model changes, the export format will be changed accordingly.This document will be updated for such changes.The following description assumes familiarity with the data model and the terminology used.
This RDF binding is based on the one designed for the Wikidata Toolkit by Denny Vrandecic and Markus Krötzsch, seehttps://web.archive.org/web/20190313052004/http://korrekt.org/papers/Wikidata-RDF-export-2014.pdf.
The following description uses prefixes to describe the IRIs of the RDF resources mentioned.See thePrefixes chapter for the full description.All examples below are given in theTurtle format.
The version of the data model is specified byschema:softwareVersion predicate of theschema:Dataset node, which is either dump node for the dump or entity data node (wdata:) for single entity page.
Released versions:
| Version | Description |
|---|---|
| 0.0.1 | Initial version. |
| 0.0.2 | Changed WKT coordinate order (T130049) |
| 0.0.3 | Added page props option towdata: (T129046) |
| 0.0.4 | Added unit conversion & normalisation support (T117031) |
| 0.0.5 | Added quantities without bounds. (T115269) |
| 0.1.0 | Changed link encoding (T131960) |
| 1.0.0 | Removed-beta from the ontology prefix (T112127). The RDF mapping is now considered stable. |
For the RDF dump, there is the header nodewikibase:Dump containing information about the license, the software version of the generator and the date the data was produced.In single-entity export, this data is attached to the data node (see below).
Example header:
wikibase:Dumpaschema:Dataset;cc:license<http://creativecommons.org/publicdomain/zero/1.0/>;schema:softwareVersion"1.0.1";schema:dateModified"2015-03-21T06:03:55Z"^^xsd:dateTime.
cc:license - specifies the IRI of the license that applies to the whole RDF document.schema:softwareVersion - specifies which version of the dump format is being used (currently1.0.0), will be updated when format changes, once the format is out of the beta period. The version updates will be done along the lines ofsemantic versioning, with major changes being BC breaking ones, minor being major BC-compatible changes and patch part changes on minor tweaks.schema:dateModified - specifies the date of the dump's data validity. Some data that is contained in a dump may be more recent than this date, but it is guaranteed that no data in the dump is older than this date. The date should be close to the time of the oldest data contained in the dump, but for technical reasons may not be exactly the same as the time of the oldest data in the dump.The entity is described in two nodes - data node and entity node.For entity Q1, data node iswdata:Q1 and entity node iswd:Q1.
Data node describes the metadata about the entity record in the Wikibase - i.e. data which are not part of the entity's information but instead describe the status of the entity inside Wikibase.It has type ofschema:Dataset and contains the following metadata:
schema:version) – this is a counter that increases with each modification of the entity dataschema:dateModified) – as anxsd:dateTime timestampschema:about predicateExample:
wdata:Q2schema:version"59"^^xsd:integer;schema:dateModified"2015-03-18T22:38:36Z"^^xsd:dateTime;aschema:Dataset;schema:aboutwd:Q2.
Entity node describes the actual entity data and has typewikibase:Item orwikibase:Property depending on the kind of entity.Other entity types can be introduced in the future.
Entity description includes the following:
schema:name,rdfs:label andskos:prefLabel predicates with objects being language-tagged string literals.skos:altLabel predicates with objects being language-tagged string literals.schema:description predicates with objects being language-tagged string literals.Example of the entity definition:
wd:Q3awikibase:Item;rdfs:label"The Universe"@en;skos:prefLabel"The Universe"@en;schema:name"The Universe"@en;schema:description"The Universe is big"@en;skos:altLabel"everything"@en;wdt:P2wd:Q3;wdt:P7"value1","value2";p:P2wds:Q3-4cc1f2d1-490e-c9c7-4560-46c3cce05bb7;p:P7wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37,wds:Q3-45abf5ca-4ebf-eb52-ca26-811152eb067c.
Entity node can also carry additional information about the entity, such as number of links or statements.
The data is sourced frompage properties and can be specified in config file.For example:
wdata:Q42aschema:Dataset;schema:aboutwd:Q42;wikibase:statements"275"^^xsd:integer;wikibase:identifiers"206"^^xsd:integer;wikibase:sitelinks"116"^^xsd:integer.
wikibase:statements specifies how many statements this entity has,wikibase:identifiers specifiers the number of statements withExternal ID values, andwikibase:sitelinks specifies the number ofsitelinks.Additional statements can be introduced in the future.
Entities that represent items have the common entity data as described above, plus can havesitelinks attached to them, as described below.
Entities that represent properties additionally feature the property type usingwikibase:propertyType predicate.The object of the predicate is the property type described inValue representation below, withwikibase: prefix and each word capitalised, with no separators.I.e.,wikibase-item becomeswikibase:WikibaseItem.
Each property is also linked to thepredicates that are derived from it.Example:
wd:P22awikibase:Property;rdfs:label"Item property"@en;wikibase:propertyTypewikibase:WikibaseItem;wikibase:directClaimwdt:P22;wikibase:claimp:P22;wikibase:statementPropertyps:P22;wikibase:statementValuepsv:P22;wikibase:qualifierpq:P22;wikibase:qualifierValuepqv:P22;wikibase:referencepr:P22;wikibase:referenceValueprv:P22;wikibase:novaluewdno:P22.
The property predicates also have type definitions:
prv:P22aowl:ObjectProperty.wdt:P22aowl:DatatypeProperty.
The type depends on the type of the original property - whether itsvalue is literal (DatatypeProperty) or IRI (ObjectProperty).However,p:,psv: ,pqv: andprv: predicates would always beowl:ObjectProperty.
Note that wdno:P22 mentioned above is not a predicate, unlike others, but a class.See the full description of it inNovalue section.
Please see full description atLexeme RDF mapping.
Lexemes are represented according toLexeme RDF mapping.Example:
wd:L64723aontolex:LexicalEntry;# lemmawikibase:lemma"hard"@en;# languagedct:languagewd:Q1860;# lexical categorywikibase:lexicalCategorywd:Q34698;# statementswdt:P2wd:Q3;wdt:P7"value1","value2";p:P2wds:Q3-4cc1f2d1-490e-c9c7-4560-46c3cce05bb7;p:P7wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37,wds:Q3-45abf5ca-4ebf-eb52-ca26-811152eb067c;# formsontolex:lexicalFormwd:L64723-F1;# sensesontolex:sensewd:L64723-S1.
Please see full description atMediaInfo RDF mapping.
MediaInfo entities are represented according toMediaInfo RDF mapping.Example:
@prefixsdc:<https://commons.wikimedia.org/entity/>.@prefixsdcdata:<https://commons.wikimedia.org/wiki/Special:EntityData/>.@prefixsdcs:<https://commons.wikimedia.org/entity/statement/>.@prefixsdcref:<https://commons.wikimedia.org/reference/>.@prefixsdcv:<https://commons.wikimedia.org/value/>.sdcdata:M6661797aschema:Dataset;schema:aboutsdc:M6661797;cc:license<http://creativecommons.org/publicdomain/zero/1.0/>;schema:softwareVersion"1.0.0";schema:version"407884644"^^xsd:integer;schema:dateModified"2020-03-29T15:25:01Z"^^xsd:dateTime.sdc:M6661797awikibase:Mediainfo,schema:MediaObject,schema:ImageObject;schema:encodingFormat"image/jpeg";schema:contentUrl<https://upload.wikimedia.org/wikipedia/commons/6/64/Douglas_adams_portrait.jpg>;schema:contentSize"38890"^^xsd:integer;schema:height"386"^^xsd:integer;schema:width"600"^^xsd:integer;schema:caption"Photo de Douglas Adams."@fr;rdfs:label"Photo de Douglas Adams."@fr;schema:caption"Douglas Adams' portrait"@en;rdfs:label"Douglas Adams' portrait"@en;schema:caption"Foto di Douglas Adams"@it;rdfs:label"Foto di Douglas Adams"@it;wdt:P180wd:Q42;p:P180sdcs:M6661797-25026d3f-444c-1915-1d5b-c29dbad8cbec.sdcs:M6661797-25026d3f-444c-1915-1d5b-c29dbad8cbecawikibase:Statement,wikibase:BestRank;wikibase:rankwikibase:PreferredRank;ps:P180wd:Q42.
This example demonstrates the MediaInfo data on wikimedia commons when used in federation with wikidata.
The RDF format represents statements in two forms - truthy and full statements.
Truthy statements represent statements that have the best non-deprecated rank for a given property.
Namely, if there is a preferred statement for property P2, then only preferred statements for P2 will be considered truthy.
Otherwise, all normal-rank statements for P2 are considered truthy.
Truthy statement predicates have the prefixwdt: with the property name (e.g.wdt:P2) and the object is the simple value (see below) for the statement.
The qualifiers are ignored.
If the value has simple value normalisation (currently true only for external ID), normalised value is listed underwdtn: prefix, e.g.wdtn:P2.
Full statements represent all data about the statement in the system.Full statement is represented as separate node, with prefixwds: with the id of the statement (e.g.wds:Q3-4cc1f2d1-490e-c9c7-4560-46c3cce05bb7).
There is no guaranteed format or meaning to the statement id.
The statements are linked to the entity with the predicate with prefixp: and the name of the property (e.g.p:P2).
| Itis possible that a statement refers to a property or item that no longer exists. Therefore you should not assume the predicates and objects are always defined. |
The statement node represents a single statement about the entity.It has typewikibase:Statement.The statement can contain the rank, the simple value (see below) of the statement, the link to the full value, the qualifiers and the references.
The statement rank is represented by the predicatewikibase:rank and the object being one of:wikibase:NormalRank ,wikibase:PreferredRank,wikibase:DeprecatedRank.
The statement that has the best rank for the property (i.e., preferred if there are any preferred statements in the property, otherwise normal) is also has type ofwikibase:BestRank.
The simple value is represented by the predicate with prefixps: and the name of the property (e.g.ps:P2) and the object being the simple value.
The full value (if required by the type) is represented by the predicate with prefixpsv: (e.g.psv:P2) and the object being the full value node.
The statement always has no more than one value, but can have multiple qualifiers and references.
The qualifiers are represented by predicates with prefixpq: and the name of the property (e.g.pq:P2) and the object being the simple value of the qualifier.
The full value (if required by the type) is represented by the predicate with prefixpqv: (e.g.pqv:P2) and the object being the full value node.
References are represented by the predicateprov:wasDerivedFrom with the object being the reference node (see below).
Example of the statement:
wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37awikibase:Statement,wikibase:BestRank;ps:P2wd:Q3;wikibase:rankwikibase:PreferredRank;pq:P8"-13000000000-01-01T00:00:00Z"^^xsd:dateTime;pqv:P8wdv:382603eaa501e15688076291fc47ae54;prov:wasDerivedFromwdref:87d0dc1c7847f19ac0f19be978015dfb202cf59a,wdref:d95dde070543a0e0115c8d5061fce6754bb82280.
References represent provenance information about statements.
Reference is represented as node, with prefixwdref: and the local name being the hash derived from the reference contents (e.g.wdref:d95dde070543a0e0115c8d5061fce6754bb82280).The exact value of the hash is not guaranteed beyond the fact that the same references (i.e. ones with identical content) will generate the same hash, and the different one will generate the different one.The same reference (i.e. reference having the same properties with the same values) will be usually represented with single node, though duplicate reference nodes are possible in the data.
The type of the node is awikibase:Reference.
The reference values are represented the same as statement values, with simple values using predicates withpr: prefix (e.g.pr:P2) and full values with prefixprv: (e.g.prv:P2) and the object being the full value node.Unlike statements, references can have any number of values.
Example of the reference node:
wdref:d95dde070543a0e0115c8d5061fce6754bb82280awikibase:Reference;pr:P7"Some data";pr:P8"1976-01-12T00:00:00Z"^^xsd:dateTime;prv:P8wdv:b74072c03a5ced412a336ff213d69ef1.
In the RDF format, the values are represented as two forms - simple value and full value.Simple value is always a literal or IRI, and is used as direct value that is convenient to search, index and match.The full value contains additional information about the value, such as ranges, precision, calendar used, etc.Note that while for many queries simple values will be enough, for other, more complex values, only full values will be adequate.
If the statement has a value (i.e. is not set tonovalue) then the simple value will always be present.
Full values are represented as nodes having prefixwdv: and the local name being the hash of the value contents (e.g.wdv:382603eaa501e15688076291fc47ae54).There is no guarantee of the value of the hash except for the fact that different values will be represented by different hashes, and same value mentioned in different places will have the same hash.Value node has typewikibase:Value.The content of the node is defined by the type of the value (see below).
Example of the value node:
wdv:b74072c03a5ced412a336ff213d69ef1awikibase:TimeValue;wikibase:timeValue"+1976-01-12T00:00:00Z"^^xsd:dateTime;wikibase:timePrecision"11"^^xsd:integer;wikibase:timeTimezone"0"^^xsd:integer;wikibase:timeCalendarModel<http://www.wikidata.org/entity/Q1985727>.
The following describes the handling of each kind of value, depending on the type of the value and the type of the property.Note that not all aspects of the data model are represented in RDF currently, some aspects that are currently unused (such as units or before/after values for dates) are omitted since they currently do not carry any useful information.This may change in the future if/when these aspects come into use by Wikidata.
Strings have value typestring and property typestring.
String is represented as a string literal.Strings only have simple value.
Media oncommons: have value typestring and property typecommonsMedia.
Commons media is represented as an IRI with the full Commons resource URL, derived from the Commons filename in the underlying data item.E.g.:<http://commons.wikimedia.org/wiki/Special:FilePath/Universe%20Photo.svg>.It has only simple value.
URL values have value typestring and property typeurl.
URL is represented as a an IRI matching the URL string (e.g.<http://www.wikidata.org/>).It has only simple value.
External ID values have value typestring and property typeexternal-id.They are represented by a string literal.It has only simple value.
If the property has a formatter URI for RDF configured (on Wikidata:formatter URI for RDF resource(P1921)), the RDF will also have normalised value, e.g.:
wd:Q123wdt:P234"External-ID";wdtn:P234<http://external.example.com/reference/External-ID>
Wikibase Entity ID values have value typewikibase-entityid and property typewikibase-item.
The entity is represented by its IRI, e.g.wd:Q2.It has only simple value.
Monolingual text values have value typemonolingualtext and property typemonolingualtext.
The text is represented as a string literal with language tag.It has only simple value.
Coordinate text values have value typeglobecoordinate and property typeglobe-coordinate.
The simple value of the coordinate is the WKT string with the coordinates, with typegeo:wktLiteral, e.g.:"Point(35.3 12.93)"^^geo:wktLiteral.The order of the coordinates in WKT is longitude, latitude (since format version 0.0.2).
The full value has latitude, longitude and precision as double, and the globe as IRI.
Example:
wdv:a10564107110b2d5739b8fe235cddf73awikibase:GlobecoordinateValue;wikibase:geoLatitude"12.933333333333"^^xsd:double;wikibase:geoLongitude"35.3"^^xsd:double;wikibase:geoPrecision"0.000277778"^^xsd:double;wikibase:geoGlobe<http://www.wikidata.org/entity/Q2>.
Quantity values have value typequantity and property typequantity.
The simple value of the quantity is the specified amount, as a decimal literal.
The full value includes amount, unit URI (the default for unit-less values beinghttp://www.wikidata.org/entity/Q199), and optionally upper and lower bound.If no upper and lower bound are given, the uncertainty of the quantity is undefined.Exact values are represented by quantities that have the same value for amount, upper bound and lower bound.
Example:
wdv:cb213eea7a0b90d1d7f65c6eabfab9daawikibase:QuantityValue;wikibase:quantityAmount"+123"^^xsd:decimal;wikibase:quantityUpperBound"+124"^^xsd:decimal;wikibase:quantityLowerBound"+122"^^xsd:decimal;wikibase:quantityUnit<http://www.wikimedia.org/entity/Q199>.
Time values have value typetime and property typetime.
The simple value of the time value is either datetime value of typexsd:dateTime, if the value can be converted to Gregorian date in ISO format, or a string as represented in the database, if not.Thexsd:dateTime dates followXSD 1.1 standard, which uses theproleptic Gregorian calendar, and represents the year 1 BCE as +0000.This is in contrast theJSON representation of Julian and Gregorian dates, which follows the traditional year numbering, representing the year 1 BCE as -0001.
The full value includes the simple value above underwikibase:timeValue,precision and timezone as integers and calendar model as IRI.Note that the calendar model is the original values calendar model even ifwikibase:timeValue was converted to Gregorian.
Example:
wdv:85374678f22bda99efb44a5617d76e51awikibase:Time;wikibase:timeValue"+1948-04-12T00:00:00Z"^^xsd:dateTime;wikibase:timePrecision"11"^^xsd:integer;wikibase:timeTimezone"0"^^xsd:integer;wikibase:timeCalendarModel<http://www.wikidata.org/entity/Q1985727>.
Some values can be represented in several forms, depending on the purpose.For example, length can be expressed in different units - feet, inches, meters, miles, etc.In order to provide means to unify these forms and thus make data more friendly for automatic processing, the normalised values are introduced, which represent diverse data in a unified way.
Right now, the only value normalisation that is supported is converting units for quantities into base units - e.g. length to meters.In the future, more units and more normalisations may be added, which will be documented here.The conversion table is availableon the Mediawiki gerrit if needed.
The only normalised simple values are external IDs (see below).
Normalised quantity values are value nodes that are parallel to the original data nodes but represented in base units.They are connected to their parent nodes by predicates with prefix having "v" replaced with "n" - i.e.psn:,prn: andpqn:, for example:
wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37awikibase:Statement,wikibase:BestRank;ps:P8"123"^^xsd:decimal;psv:P8wdv:382603eaa501e15688076291fc47ae54;psn:P8wdv:85374998f22bda54efb44a5617d76e51.
Original quantity value is connected to the normalised value bywikibase:quantityNormalized predicate:
wdv:382603eaa501e15688076291fc47ae54awikibase:QuantityValue;wikibase:quantityAmount"+123"^^xsd:decimal;wikibase:quantityUpperBound"+124"^^xsd:decimal;wikibase:quantityLowerBound"+122"^^xsd:decimal;wikibase:quantityUnit<http://www.wikidata.org/entity/Q218593>;wikibase:quantityNormalizedwdv:85374998f22bda54efb44a5617d76e51.
The normalised value haswikibase:quantityNormalized pointing to itself.
If the value is already normalised - i.e. is expressed in base units - then both "v" and "n" predicates point to the same value, andwikibase:quantityNormalized for this value points to itself.
Quantities with no units or with units that are not normalisable (have no base unit they can be reduced to) do not have normalised predicates and normalised values and do not includewikibase:quantityNormalized.
The recommendation is to have no more than one base unit per property.Base units depend on Wikibase configuration and usually are chosen to represent universally accepted standard units, such as SI units.
For external IDs, normalisation converts string value to URL, if the URL formatter for that purpose is defined in property data (viacanonicalUriProperty setting), then the normalised value will be listed aswdtn: value for truthy values, and as normalised value for the statements inpsn:,prn: andpqn: predicates, depending on the context where the value appears.
Wikibase data model has two special kinds of snaks - PropertySomeValueSnak, specifying a value that exists but whose identity or value is unknown, and PropertyNoValueSnak, specifying that a value does not exist.
Unknown value is represented as RDF blank node in both simplified and full statements:
wd:Q3awikibase:Item,wdt:P2_:genid1.wds:Q3-45abf5ca-4ebf-eb52-ca26-811152eb067cawikibase:Statement;ps:P2_:genid2;wikibase:rankwikibase:NormalRank.
Novalue is represented not by a regular value but as a class of the entity or statement or reference, with prefixwdno: and the name of the property.Example:
wd:Q3awikibase:Item,wdno:P7.wds:Q3-45abf5ca-4ebf-eb52-ca26-811152eb777cawikibase:Statement,wdno:P7;wikibase:rankwikibase:NormalRank.
The entity has awdno: class if it has a truthynovalue statement for that property.
Novalue in the main snak or qualifiers of a statement corresponds to awdno: class on the statement node, andnovalue in a reference snak corresponds to awdno: class on the reference node.
The classes forwdno: are defined as follows:
wdno:P2aowl:Class;owl:complementOf_:genid1._:genid1aowl:Restriction;owl:onPropertywdt:P2;owl:someValuesFromowl:Thing.
The links are represented as set of predicates describing the link URL.The type of the node isschema:Article and it linked with the entity viaschema:about predicate.
Badges are described withwikibase:badge predicates.schema:name predicate holds the plain-text name of the article, in the language of the linked wiki.
Example:
<https://en.wikipedia.org/wiki/Duck>aschema:Article;schema:aboutwd:Q3;schema:inLanguage"en";schema:isPartOf<https://en.wikipedia.org/>;schema:name"Duck"@en;wikibase:badgewd:Q5.<https://en.wikipedia.org/>wikibase:wikiGroup"wikipedia".
The subject URL is composed from the language site prefix and the article name, URL-encoded according toRFC 3986, e.g.:
<https://ru.wikipedia.org/wiki/%D0%A3%D1%82%D0%BA%D0%B0>More specifically, encoding used is as follows:
_).;:@$!*(),/-_~".Redirected entities are implemented asowl:sameAs predicates, for example if Q6 redirects to Q1, the dump would be:
wd:Q6owl:sameAswd:Q1.
The prefixes are used in RDF formats that allow short prefixes (such as Turtle and RDF).For other formats, the full URL is used.
All prefix URLs that do not contain hostname are prefixed with the hostname of the generating wiki.All prefix URLs that contain hostname are fixed and do not depend on generating wiki.
| Prefix | Full URL | Usage | Example |
|---|---|---|---|
| wikibase: | http://wikiba.se/ontology# | Wikibase ontology | wd:Q2awikibase:Item |
| Nodes | |||
| wdata: | /Special:EntityData/ | Data set describing certain entity | wdata:Q2schema:aboutwd:Q2. |
| wd: | /entity/ | Wikibase entity - item or property. | wd:Q2p:P9wds:Q2-82a6e009-4f93-28dc-3555-38bbfc3afe6a |
| wds: | /entity/statement/ | Statement node, describes claim about entity. | wds:Q2-a4078553-4ec1-a64a-79e7-c5b5e17b2782awikibase:Statement |
| wdv: | /value/ | Value node | wdv:87d0dc1c7847f19ac0f19be978015dfb202cf59aawikibase:Value |
| wdref: | /reference/ | Reference node | wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37prov:wasDerivedFromwdref:87d0dc1c7847f19ac0f19be978015dfb202cf59a.wdref:87d0dc1c7847f19ac0f19be978015dfb202cf59aawikibase:Reference. |
| Predicates | |||
| wdt: | /prop/direct/ | Truthy assertions about the data, links entity to value directly. | wd:Q2wdt:P9<http://acme.com/> |
| wdtn: | /prop/direct-normalized/ | Truthy assertions about the data, links entity tonormalised value directly. | wd:Q2wdtn:P9<http://acme.com/ABCDE> |
| p: | /prop/ | Links entity to statement | wd:Q2p:P9wds:Q2-82a6e009-4f93-28dc-3555-38bbfc3afe6awd |
| wdno: | /prop/novalue/ | Class to use when the entity hasnovalue for this property. | wd:Q2awdno:P9. |
| ps: | /prop/statement/ | Links value to statement | wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37ps:P8"-13000000000-01-01T00:00:00Z"^^xsd:dateTime |
| psv: | /prop/statement/value/ | Links deep value to statement | wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37psv:P8wdv:87d0dc1c7847f19ac0f19be978015dfb202cf59a |
| psn: | /prop/statement/value-normalized/ | Links normalised value to statement node | wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37psn:P8wdv:87d0dc1c7847f19ac0f19be978015dfb202cf59a |
| pq: | /prop/qualifier/ | Links qualifier to statement node | wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37pq:P8"-13000000000-01-01T00:00:00Z"^^xsd:dateTime |
| pqv: | /prop/qualifier/value/ | Links qualifier deep value to statement node | wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37pqv:P8wdv:87d0dc1c7847f19ac0f19be978015dfb202cf59a |
| pqn: | /prop/qualifier/value-normalized/ | Links normalised qualifier value to statement node | wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37pqn:P8wdv:87d0dc1c7847f19ac0f19be978015dfb202cf59a |
| pr: | /prop/reference/ | Links reference to value | wdref:87d0dc1c7847f19ac0f19be978015dfb202cf59apr:P8"-13000000000-01-01T00:00:00Z"^^xsd:dateTime |
| prv: | /prop/reference/value/ | Links reference to deep value | wdref:87d0dc1c7847f19ac0f19be978015dfb202cf59aprv:P8wdv:87d0dc1c7847f19ac0f19be978015dfb202cf59a |
| prn: | /prop/reference/value-normalized/ | Links reference to normalised value | wdref:87d0dc1c7847f19ac0f19be978015dfb202cf59aprn:P8wdv:87d0dc1c7847f19ac0f19be978015dfb202cf59a |
Standard prefixes used:
This list can be used for queries in SPARQL:
PREFIXbd:<http://www.bigdata.com/rdf#>PREFIXcc:<http://creativecommons.org/ns#>PREFIXdct:<http://purl.org/dc/terms/>PREFIXgeo:<http://www.opengis.net/ont/geosparql#>PREFIXhint:<http://www.bigdata.com/queryHints#>PREFIXontolex:<http://www.w3.org/ns/lemon/ontolex#>PREFIXowl:<http://www.w3.org/2002/07/owl#>PREFIXprov:<http://www.w3.org/ns/prov#>PREFIXrdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIXrdfs:<http://www.w3.org/2000/01/rdf-schema#>PREFIXschema:<http://schema.org/>PREFIXskos:<http://www.w3.org/2004/02/skos/core#>PREFIXxsd:<http://www.w3.org/2001/XMLSchema#>PREFIXp:<http://www.wikidata.org/prop/>PREFIXpq:<http://www.wikidata.org/prop/qualifier/>PREFIXpqn:<http://www.wikidata.org/prop/qualifier/value-normalized/>PREFIXpqv:<http://www.wikidata.org/prop/qualifier/value/>PREFIXpr:<http://www.wikidata.org/prop/reference/>PREFIXprn:<http://www.wikidata.org/prop/reference/value-normalized/>PREFIXprv:<http://www.wikidata.org/prop/reference/value/>PREFIXpsv:<http://www.wikidata.org/prop/statement/value/>PREFIXps:<http://www.wikidata.org/prop/statement/>PREFIXpsn:<http://www.wikidata.org/prop/statement/value-normalized/>PREFIXwd:<http://www.wikidata.org/entity/>PREFIXwdata:<http://www.wikidata.org/wiki/Special:EntityData/>PREFIXwdno:<http://www.wikidata.org/prop/novalue/>PREFIXwdref:<http://www.wikidata.org/reference/>PREFIXwds:<http://www.wikidata.org/entity/statement/>PREFIXwdt:<http://www.wikidata.org/prop/direct/>PREFIXwdtn:<http://www.wikidata.org/prop/direct-normalized/>PREFIXwdv:<http://www.wikidata.org/value/>PREFIXwikibase:<http://wikiba.se/ontology#>
This compiles the list of all objects and predicates that are internal to the format.For the meaning of the prefixes, see the prefixes list.
| Name | Usage | Context |
|---|---|---|
| wikibase:Item | Wikibase item | Type for wd:Q123 describing item |
| wikibase:Property | Wikibase property | Type for wd:P123 describing property |
| wikibase:Lexeme | Wikibase lexeme | Type for wd:L123 describing lexeme |
| wikibase:Form | Wikibase lexeme form | Type for wd:L123-F1 describing form |
| wikibase:Sense | Wikibase lexeme sense | Type for wd:L123-S1 describing sense |
| wikibase:Statement | Statement about the entity | Type for wds:1234 describing statement |
| wikibase:Reference | Reference node | Type for wdref:1234 describing reference |
| wikibase:TimeValue | Value node representing time value | Type for wdv:1234 describing time value |
| wikibase:QuantityValue | Value node representing quantity value | Type for wdv:1234 describing quantity value |
| wikibase:GlobecoordinateValue | Value node representing coordinate value | Type for wdv:1234 describing coordinate value |
| wikibase:Dump | Node describing the dump datatset | Used in dump header to describe metadata for whole dump |
| wikibase:PreferredRank | Represents preferred rank for the statement | Used as object of wikibase:rank |
| wikibase:NormalRank | Represents normal rank for the statement | Used as object of wikibase:rank |
| wikibase:DeprecatedRank | Represents deprecated rank for the statement | Used as object of wikibase:rank |
| wikibase:BestRank | Represents statement that has best rank for the property - i.e. suitable for inclusion as truthy statement | Used as type of wikibase:Statement |
| wikibase:WikibaseItem | Entity reference type | Used as object of wikibase:propertyType |
| wikibase:CommonsMedia | Commons media reference type | Used as object of wikibase:propertyType |
| wikibase:ExternalId | External identifier type | Used as object of wikibase:propertyType |
| wikibase:GlobeCoordinate | Geo coordinate type | Used as object of wikibase:propertyType |
| wikibase:Monolingualtext | Single language text value | Used as object of wikibase:propertyType |
| wikibase:Quantity | Quantity type | Used as object of wikibase:propertyType |
| wikibase:String | String value | Used as object of wikibase:propertyType |
| wikibase:Time | Time value | Used as object of wikibase:propertyType |
| wikibase:Url | URL reference type | Used as object of wikibase:propertyType |
Italicised names mean that any property name can be substituted instead of example name P123.
| Name | Usage | Domain | Range |
|---|---|---|---|
| wdt:P123 | Link entity to truthy statement value | wikibase:Item|wikibase:Property | Simple value |
| wdtn:P123 | Link entity to normalised truthy statement value | wikibase:Item|wikibase:Property | Simple value |
| p:P123 | Link entity to statement | wikibase:Item|wikibase:Property | wikibase:Statement |
| ps:P123 | Link statement to simple value | wikibase:Statement | Simple value |
| pr:P123 | Link reference to simple value | wikibase:Reference | Simple value |
| pq:P123 | Link statement to qualifier value | wikibase:Statement | Simple value |
| psv:P123 | Link statement to value node | wikibase:Statement | wikibase:Value |
| psn:P123 | Link statement to normalised value node | wikibase:Statement | wikibase:Value |
| prv:P123 | Link reference to value node | wikibase:Reference | wikibase:Value |
| prn:P123 | Link reference to normalised value node | wikibase:Reference | wikibase:Value |
| pqv:P123 | Link statement to qualifier value node | wikibase:Statement | wikibase:Value |
| pqn:P123 | Link statement to normalised qualifier value node | wikibase:Statement | wikibase:Value |
| wikibase:rank | Specifies rank of the statement | wikibase:Statement | One of the rank objects above |
| wikibase:badge | Badge attached to a sitelink | schema:Article | wikibase:Item - URL of the badge |
| wikibase:propertyType | Property type of the property entity | wikibase:Property | One of the property type objects above |
| wikibase:directClaim | Links property entity to direct claim predicate | wikibase:Property | wdt:P123 |
| wikibase:directClaimNormalized | Links property entity to normalised direct claim predicate | wikibase:Property | wdtn:P123 |
| wikibase:claim | Links property entity to claim/statement predicate | wikibase:Property | p:P123 |
| wikibase:statementProperty | Links property entity to statement simple value predicate | wikibase:Property | ps:P123 |
| wikibase:statementValue | Links property entity to statement full value predicate | wikibase:Property | psv:P123 |
| wikibase:statementValueNormalized | Links property entity to statement normalised value predicate | wikibase:Property | psn:P123 |
| wikibase:qualifier | Links property entity to qualifier simple value predicate | wikibase:Property | pq:P123 |
| wikibase:qualifierValue | Links property entity to qualifier full value predicate | wikibase:Property | pqv:P123 |
| wikibase:qualifierValueNormalized | Links property entity to qualifier normalised value predicate | wikibase:Property | pqn:P123 |
| wikibase:reference | Links property entity to reference simple value predicate | wikibase:Property | pr:P123 |
| wikibase:referenceValue | Links property entity to reference full value predicate | wikibase:Property | prv:P123 |
| wikibase:referenceValueNormalized | Links property entity to reference normalised value predicate | wikibase:Property | prn:P123 |
| wikibase:hasViolationForConstraint | Links statement violating a constraint to the constraint statement | wikibase:Statement | wikibase:Statement |
| wikibase:lemma | Links Wikibase lexeme with the lemma text | wikibase:Lexeme | Simple string value |
| wikibase:lexicalCategory | Links Wikibase lexeme with its lexical category item | wikibase:Lexeme | wikibase:Item |
| wikibase:grammaticalFeature | Links Wikibase lexeme form with its grammatical features | wikibase:Form/ontolex:Form | wikibase:Item |
The following predicates are used in deep values for the values of specific types.All these predicates have the domain ofwikibase:Value and the range depending on type below.
| Name | Type | Meaning |
|---|---|---|
| wikibase:geoLatitude | xsd:double | Latitude component of the coordinate |
| wikibase:geoLongitude | xsd:double | Longitude component of the coordinate |
| wikibase:geoPrecision | xsd:double | Precision of the coordinates |
| wikibase:geoGlobe | IRI | The URL of the globe, e.g.http://www.wikidata.org/entity/Q2 (Earth) |
| Name | Type | Meaning |
|---|---|---|
| wikibase:quantityAmount | xsd:decimal | The specified amount |
| wikibase:quantityUpperBound | xsd:decimal | The upper limit of the value range |
| wikibase:quantityLowerBound | xsd:decimal | The lower limit of the value range |
| wikibase:quantityUnit | IRI | The unit of measurement, for unit-less quantities ishttp://www.wikidata.org/entity/Q199 (i.e. "1") |
| wikibase:quantityNormalized | IRI | Points to the normalised value, if exists. |
| Name | Type | Meaning |
|---|---|---|
| wikibase:timeValue | xsd:dateTime|string | Gregorian time or string if the value can not be represented as Gregorian time |
| wikibase:timePrecision | xsd:integer | Time precision constant |
| wikibase:timeTimezone | xsd:integer | Timezone offset from UTC in minutes |
| wikibase:timeCalendarModel | IRI | URL of the calendar used, e.g.http://www.wikidata.org/entity/Q1985727 (Gregorian) |
TheWikidata query service has the data in the format described above, but there are small differences that can be important while writing SPARQL queries:
a orrdf:type) forwikibase:Item,wikibase:Statement,wikibase:Reference ,wikibase:Lexeme,wikibase:Form,wikibase:Sense are currently omitted for performance reasons.wikibase:sitelinks [] instead ofa wikibase:Item (only items have a number of sitelinks).wikibase:rank [] instead ofa wikibase:Statement (only statements have a rank).[] prov:wasDerivedFrom ?reference instead of?reference a wikibase:Reference, but note that this may return a reference more than once. (Usually, you’ll get references viaprov:wasDerivedFrom from a statement anyway.)ontolex:LexicalSense instead ofwikibase:Sense.ontolex:Form instead ofwikibase:Form.wdata:Q2) are not stored, all the information like version, revision andpage props is stored in the entity node (wd:Q2) instead. This is done for performance reasons.rdfs:label is stored but notschema:name orskos:prefLabel. Since they all have the same data, storing all three is redundant.FILTERwikibase:isSomeValue(?node) rather thanFILTERisBlank(?node)See alsoSPARQL query examples for how to query the data using WDQS service.