Василиса▶ Я жду вашего обращения. Что Вы хотите узнать?
|
![]() |
||
|
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 the format used by the Wikidata 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 can be downloaded from Wikimedia dump source , and while it can be used to create queries for Wikidata query service, the service can have small differences in how the data there look like. See the chapter for the full list.
The canonical URI of the Wikibase RDF ontology is < http://wikiba.se/ontology >. The current version can be found at < http://wikiba.se/ontology-1.0.owl >.
Changes to the RDF mapping are subject to the Stable Interface Policy .
ContentsData model[ edit ]The RDF format is a binding for on the Wikibase data model and represents an export format for it. That means, in particular, that if/when 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, see http://korrekt.org/papers/Wikidata-RDF-export-2014.pdf .
The following description uses prefixes to describe the IRIs of the RDF resources mentioned. See the for the full description. All examples below are given in Turtle format.

The version of the data model is specified by
schema:softwareVersion
predicate of the
schema: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 (see T130049 ) |
0.0.3 |
Added page props option to
wdata:
(see
T129046
)
|
0.0.4 | Added unit conversion & normalization support (see T117031 ) |
0.0.5 | Added quantities without bounds. (see T115269 ) |
0.1.0 | Changed link encoding (see T131960 ) |
1.0.0 |
Removed
-beta
from the ontology prefix (see
T112127
). The RDF mapping is now considered stable.
|
For the RDF dump, there is the header node
wikibase: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 (currently 1.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 of semantic 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.Entity representation[ edit ]
The entity is described in two nodes - data node and entity node. For entity Q1, data node is
wdata:Q1
and entity node is
wd: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 of
schema:Dataset
and contains the following metadata:
Example:
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 type
wikibase:Item
or
wikibase:Property
depending on the kind of entity. Other entity types can be introduced in the future.
Entity description includes the following:
Entity labels - the main name of the entity. Labels are defined as schema:name, rdfs:label and skos:prefLabel predicates with objects being language-tagged string literals.Entity aliases - the secondary names of the entity. Aliases are defined as skos:altLabel predicates with objects being language-tagged string literals.Entity description - the longer description of the entity. Defined as schema:description predicates with objects being language-tagged string literals.Truthy statements (see below)Predicates linking it to full statementsExample 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.Page properties[ edit ]Entity node can also carry additional information about the entity, such as number of links or statements. The data is sourced from page properties and can be specified in config file. For example:
wdata:Q42aschema:Dataset;schema:aboutwd:Q42;wikibase:statements"112"^^xsd:integer;wikibase:sitelinks"99"^^xsd:integer.
wikibase:statements
specifies how many statements this entity has, and
wikibase:sitelinks
specifies the number of
sitelinks
. Additional statements can be introduced in the future.
Entities that represent items have the common entity data as described above, plus can have attached to them, as described below.
Properties[ edit ]
Entities that represent properties additionally feature the property type using
wikibase:propertyType
predicate. The object of the predicate is the property type described in below, with
wikibase:
prefix and each word capitalized, with no separators. I.e.,
wikibase-item
becomes
wikibase:WikibaseItem
.
Each property is also linked to the 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 its is literal (
DatatypeProperty
) or IRI (
ObjectProperty
). However,
p:
,
psv:
,
pqv:
and
prv:
predicates would always be
owl:ObjectProperty
.
Note that wdno:P22 mentioned above is not a predicate, unlike others, but a class. See the full description of it in section.
Lexemes[ edit ]Please see full description at Lexeme RDF mapping .
Lexemes are represented according to Lexeme 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.MediaInfo (beta)[ edit ]this section is not yet subject to Wikidata:Stable Interface PolicyPlease see full description at MediaInfo RDF mapping .
MediaInfo entities are represented according to MediaInfo 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.
Statement types[ edit ]The RDF format represents statements in two forms - truthy and full statements.
Truthy statements[ edit ]Truthy statements represent statements that have the best non-deprecated rank for 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 prefix
wdt:
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 normalization (currently true only for external ID), normalized value is listed under
wdtn:
prefix, e.g.
wdtn:P2
.
Full statements represent all data about the statement in the system. Full statement is represented as separate node, with prefix
wds:
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 prefix
p:
and the name of the property (e.g.
p:P2
).
The statement node represents a single statement about the entity. It has type
wikibase: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 predicate
wikibase: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 of
wikibase:BestRank
.
The simple value is represented by the predicate with prefix
ps:
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 prefix
psv:
(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.
Qualifiers[ edit ]
The qualifiers are represented by predicates with prefix
pq:
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 prefix
pqv:
(e.g.
pqv:P2
) and the object being the full value node.
References are represented by the predicate
prov: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.Constraints[ edit ]
The service also may contain data for
Wikibase Quality Constraints
violations, via
wikibase:hasViolationForConstraint
predicate. The predicate links violating statement to the statement describing the constraint, e.g.:
Note that constraint violations are loaded from constraint cache and are not guaranteed to be up-to-date or present for all items (which means if you find no constraint violation statements for an item, that doesn't mean it doesn't have any - check Wikibase Quality tools for more up-to-date information).
Reference representation[ edit ]References represent provenance information about statements.
Reference is represented as node, with prefix
wdref:
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 a
wikibase:Reference
.
The reference values are represented the same as statement values, with simple values using predicates with
pr:
prefix (e.g.
pr:P2
) and full values with prefix
prv:
(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.Value representation[ edit ]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 to novalue ) then the simple value will always be present.
Full values are represented as nodes having prefix
wdv:
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 type
wikibase: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.
String[ edit ]
Strings have value type
string
and property type
string
.
String is represented as a string literal. Strings only have simple value.
Commons media[ edit ]
Media on
commons:
have value type
string
and property type
commonsMedia
.
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 Photo.svg
>
. It has only simple value.
URL values have value type
string
and property type
url
.
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 type
string
and property type
external-id
. They are represented by a string literal. It has only simple value.
If the property has URL formatter for RDF configured, the RDF will also have normalized value, e.g.:
wd:Q123wdt:P234"External-ID"; wdtn:P234<http://external.example.com/reference/External-ID>Wikibase Entity Id[ edit ]
Wikibase Entity Id values have value type
wikibase-entityid
and property type
wikibase-item
.
The entity is represented by its IRI, e.g.
wd:Q2
. It has only simple value.
Monolingual text values have value type
monolingualtext
and property type
monolingualtext
.
The text is represented as a string literal with language tag. It has only simple value.
Globe coordinate[ edit ]
Coordinate text values have value type
globecoordinate
and property type
globe-coordinate
.
The simple value of the coordinate is the WKT string with the coordinates, with type
geo: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:
v: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[ edit ]
Quantity values have value type
quantity
and property type
quantity
.
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 being http://www.wikidata.org/entity/Q199 ), and optionally upper and lower bound. If no upper an 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:
v: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[ edit ]
Time values have value type
time
and property type
time
.
The simple value of the time value is either datetime value of type
xsd:dateTime
, if the value can be converted to Gregorian date in ISO format, or a string as represented in the database, if not. The
xsd:dateTime
dates follow
XSD 1.1 standard
, which uses the
proleptic Gregorian calendar
, and represents the year 1 BCE as +0000. This is in contrast the
JSON 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 under
wikibase:timeValue
,
precision
and timezone as integers and calendar model as IRI. Note that the calendar model is the original values calendar model even if
wikibase:timeValue
was converted to Gregorian.
Example:
v: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>.Normalized values[ edit ]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 normalized values are introduced, which represent diverse data in a unified way.
Right now, the only value normalization that is supported is converting units for quantities into base units - e.g. length to meters. In the future, more units and more normalizations may be added, which will be documented here. The conversion table is available on the Mediawiki gerrit if needed.
The only normalized simple values are external IDs (see below).
Normalized quantity[ edit ]
Normalized 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:
and
pqn:
, for example:
Original quantity value is connected to the normalized value by
wikibase:quantityNormalized
predicate:
The normalized value has
wikibase:quantityNormalized
pointing to itself.
If the value is already normalized - i.e. is expressed in base units - then both "v" and "n" predicates point to the same value, and
wikibase:quantityNormalized
for this value points to itself.
Quantities with no units or with units that are not normalizable (have no base unit they can be reduced to) do not have normalized predicates and normalized values and do not include
wikibase: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.
Normalized External ID[ edit ]
For external IDs, normalization converts string value to URL, if the URL formatter for that purpose is defined in property data (via
canonicalUriProperty
setting), then the normalized value will be listed as
wdtn:
value for truthy values, and as normalized value for the statements in
psn:
,
prn:
and
pqn:
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.
Somevalue[ edit ]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[ edit ]
Novalue
is represented not by a regular value but as a class of the entity or statement or reference, with prefix
wdno:
and the name of the property. Example:
The entity has a
wdno:
class if it has a truthy
novalue
statement for that property.
Novalue
in the main snak or qualifiers of a statement corresponds to a
wdno:
class on the statement node,
and
novalue
in a reference snak corresponds to a
wdno:
class on the reference node.
The classes for
wdno:
are defined as follows:
The links are represented as set of predicates describing the link URL. The type of the node is
schema:Article
and it linked with the entity via
schema:about
predicate.
Badges are described with
wikibase: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 to RFC 3986 , e.g.:
<https://ru.wikipedia.org/wiki/Утка>More specifically, encoding used is as follows:
Normalize the title by replacing spaces with underscores (_).Apply wfUrlencode () function, which percent-encodes all non-alphanumeric characters except ";:@$!*(),/-_~".Redirects[ edit ]
Redirected entities are implemented as
owl:sameAs
predicates, for example if Q6 redirects to Q1, the dump would be:
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
:
Q2
a
wikibase
:
Item
|
Nodes | |||
wdata: | /Special:EntityData/ | Data set describing certain entity |
wdata:
Q2
schema:
about
wd:
Q2
.
|
wd: | /entity/ | Wikibase entity - item or property. |
wd:
Q2
p:
P9
wds:
Q2-82a6e009-4f93-28dc-3555-38bbfc3afe6a
|
wds: | /entity/statement/ | Statement node, describes claim about entity. |
wds
:
Q2-a4078553-4ec1-a64a-79e7-c5b5e17b2782
a
wikibase
:
Statement
|
wdv: | /value/ | Value node |
wdv
:
87d0dc1c7847f19ac0f19be978015dfb202cf59a
a
wikibase
:
Value
|
wdref: | /reference/ | Reference node |
wds
:
Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37
prov
:
wasDerivedFrom
wdref
:
87d0dc1c7847f19ac0f19be978015dfb202cf59a
.
wdref
:
87d0dc1c7847f19ac0f19be978015dfb202cf59a
a
wikibase
:
Reference
.
|
Predicates | |||
wdt: | /prop/direct/ | Truthy assertions about the data, links entity to value directly. |
wd:
Q2
wdt:
P9
<http://acme.com/>
|
wdtn: | /prop/direct-normalized/ | Truthy assertions about the data, links entity to normalized value directly. |
wd
:
Q2
wdtn
:
P9
<http://acme.com/ABCDE>
|
p: | /prop/ | Links entity to statement |
wd:
Q2
p:
P9
wds:
Q2-82a6e009-4f93-28dc-3555-38bbfc3afe6awd
|
wdno: | /prop/novalue/ | Class to use when the entity has novalue for this property. |
wd
:
Q2
a
wdno
:
P9
.
|
ps: | /prop/statement/ | Links value to statement |
wds
:
Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37
ps
:
P8
"-13000000000-01-01T00:00:00Z"
^^
xsd
:
dateTime
|
psv: | /prop/statement/value/ | Links deep value to statement |
wds
:
Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37
psv
:
P8
wdv
:
87d0dc1c7847f19ac0f19be978015dfb202cf59a
|
psn: | /prop/statement/value-normalized/ | Links normalized value to statement node |
wds
:
Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37
psn
:
P8
wdv
:
87d0dc1c7847f19ac0f19be978015dfb202cf59a
|
pq: | /prop/qualifier/ | Links qualifier to statement node |
wds
:
Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37
pq
:
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-1881f82b6b37
pqv
:
P8
wdv
:
87d0dc1c7847f19ac0f19be978015dfb202cf59a
|
pqn: | /prop/qualifier/value-normalized/ | Links normalized qualifier value to statement node |
wds
:
Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37
pqn
:
P8
wdv
:
87d0dc1c7847f19ac0f19be978015dfb202cf59a
|
pr: | /prop/reference/ | Links reference to value |
wdref
:
87d0dc1c7847f19ac0f19be978015dfb202cf59a
pr
:
P8
"-13000000000-01-01T00:00:00Z"
^^
xsd
:
dateTime
|
prv: | /prop/reference/value/ | Links reference to deep value |
wdref
:
87
d
0
dc
1
c
7847
f
19
ac
0
f
19
b
e978015
dfb
202
cf
59
a
prv:
P8
wdv
:
87
d
0
dc
1
c
7847
f
19
ac
0
f
19
b
e978015
dfb
202
cf
59
a
|
prn: | /prop/reference/value-normalized/ | Links reference to normalized value |
wdref
:
87d0dc1c7847f19ac0f19be978015dfb202cf59a
prn
:
P8
wdv
:
87d0dc1c7847f19ac0f19be978015dfb202cf59a
|
Standard prefixes used:
Prefix | Full URL |
---|---|
rdf: | http://www.w3.org/1999/02/22-rdf-syntax-ns# |
rdfs: | http://www.w3.org/2000/01/rdf-schema# |
xsd: | http://www.w3.org/2001/XMLSchema# |
owl: | http://www.w3.org/2002/07/owl# |
skos: | http://www.w3.org/2004/02/skos/core# |
schema: | http://schema.org/ |
prov: | http://www.w3.org/ns/prov# |
geo: | http://www.opengis.net/ont/geosparql# |
This list can be used for queries in SPARQL:
PREFIXrdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIXxsd:<http://www.w3.org/2001/XMLSchema#>PREFIXontolex:<http://www.w3.org/ns/lemon/ontolex#>PREFIXdct:<http://purl.org/dc/terms/>PREFIXrdfs:<http://www.w3.org/2000/01/rdf-schema#>PREFIXowl:<http://www.w3.org/2002/07/owl#>PREFIXskos:<http://www.w3.org/2004/02/skos/core#>PREFIXschema:<http://schema.org/>PREFIXcc:<http://creativecommons.org/ns#>PREFIXgeo:<http://www.opengis.net/ont/geosparql#>PREFIXprov:<http://www.w3.org/ns/prov#>PREFIXwikibase:<http://wikiba.se/ontology#>PREFIXwdata:<http://www.wikidata.org/wiki/Special:EntityData/>PREFIXbd:<http://www.bigdata.com/rdf#>PREFIXwd:<http://www.wikidata.org/entity/>PREFIXwdt:<http://www.wikidata.org/prop/direct/>PREFIXwdtn:<http://www.wikidata.org/prop/direct-normalized/>PREFIXwds:<http://www.wikidata.org/entity/statement/>PREFIXp:<http://www.wikidata.org/prop/>PREFIXwdref:<http://www.wikidata.org/reference/>PREFIXwdv:<http://www.wikidata.org/value/>PREFIXps:<http://www.wikidata.org/prop/statement/>PREFIXpsv:<http://www.wikidata.org/prop/statement/value/>PREFIXpsn:<http://www.wikidata.org/prop/statement/value-normalized/>PREFIXpq:<http://www.wikidata.org/prop/qualifier/>PREFIXpqv:<http://www.wikidata.org/prop/qualifier/value/>PREFIXpqn:<http://www.wikidata.org/prop/qualifier/value-normalized/>PREFIXpr:<http://www.wikidata.org/prop/reference/>PREFIXprv:<http://www.wikidata.org/prop/reference/value/>PREFIXprn:<http://www.wikidata.org/prop/reference/value-normalized/>PREFIXwdno:<http://www.wikidata.org/prop/novalue/>PREFIXhint:<http://www.bigdata.com/queryHints#>Ontology[ edit ]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.
Objects[ edit ]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: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 |
Italicized 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 normalized 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 normalized value node | wikibase:Statement | wikibase:Value |
prv: P123 | Link reference to value node | wikibase:Reference | wikibase:Value |
prn: P123 | Link reference to normalized value node | wikibase:Reference | wikibase:Value |
pqv: P123 | Link statement to qualifier value node | wikibase:Statement | wikibase:Value |
pqn: P123 | Link statement to normalized 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 normalized 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 normalized 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 normalized 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 normalized 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 of
wikibase: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 is http://www.wikidata.org/entity/Q199 (i.e. "1") |
wikibase:quantityNormalized | IRI | Points to the normalized 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) |
The Wikidata query service has the data in the format described above, but there are small differences that can be important while writing SPARQL queries:
Types (a or rdf:type) for wikibase:Item, wikibase:Statement, wikibase:Reference , wikibase:Lexeme, wikibase:Form, wikibase:Sense are currently omitted for performance reasons.Data nodes (wdata:Q2) are not stored, all the information like version, revision and page props is stored in the entity node (wd:Q2) instead. This is done for performance reasons.For labels, only rdfs:label is stored but not schema:name or skos:prefLabel. Since they all have the same data, storing all three is redundant.Redirects are recorded but currently have no additional semantics implemented.See also SPARQL query examples for how to query the data using WDQS service.

