Shortcut: WD:JSON

维基数据:数据库下载

From Wikidata
Jump to navigation Jump to search
This page is a translated version of the page Wikidata:Database download and the translation is 20% complete.

Outdated translations are marked like this.
Other languages:
العربية • ‎беларуская • ‎বাংলা • ‎català • ‎čeština • ‎dansk • ‎Deutsch • ‎dolnoserbski • ‎Ελληνικά • ‎English • ‎Esperanto • ‎español • ‎فارسی • ‎suomi • ‎français • ‎Frysk • ‎ગુજરાતી • ‎עברית • ‎hornjoserbsce • ‎հայերեն • ‎Bahasa Indonesia • ‎italiano • ‎日本語 • ‎ქართული • ‎한국어 • ‎Ripoarisch • ‎Lëtzebuergesch • ‎latviešu • ‎македонски • ‎Bahasa Melayu • ‎norsk bokmål • ‎Nederlands • ‎occitan • ‎polski • ‎پښتو • ‎português do Brasil • ‎русский • ‎српски / srpski • ‎svenska • ‎ไทย • ‎Türkçe • ‎українська • ‎中文

Crystal Project Db update.png

Wikidata offers copies of the available content for anyone to download.

请注意另有几个其它方法以访问结构化的维基数据内容,这可能不会提供一个完整的数据库转储。

Database dumps

There are several different kinds of data dumps available. Note that while JSON and RDF dumps are considered stable interfaces, XML dumps are not. Changes to the data formats used by stable interfaces are subject to the Stable Interface Policy.

JSON dumps (recommended)

包含所有维基数据实体列表的JSON转储可在http://dumps.wikimedia.org/other/wikidata/找到。这些会每周一次更新。

This is the recommended dump format. Please refer to the JSON structure documentation for information about how Wikidata entities are represented.

Hint: Each entity object (data item or property) is placed on a separate line in the JSON file, so the file can be read line by line, and each line can be decoded separately as an individual JSON object.

Note that the files are using parallel compression, which means that some decompressors cannot reliably unpack the files. If you are using Windows you can use e.g. Bzip2.

JsonDumpReader is a PHP library for reading the dumps.

RDF dumps

First, canonical RDF dumps using the Turtle format can be found under https://dumps.wikimedia.org/wikidatawiki/entities/. The mapping is described here. These full statements are noted as all.

Secondly, so called truthy dumps are provided. They use the nt format. They are in the same format as the full dumps, but limited to direct, truthy statements. Therefore, they do not contain meta data such as qualifier and references.

The complete dumps together contain all entity information in Wikidata with the exception of order (of aliases, of statements, etc.), which is not naturally represented in RDF. Simplified dumps encode statements that have no qualifiers as single RDF triples (references are omitted).

XML dumps

维基数据完整的XML转储文件可以在http://dumps.wikimedia.org/wikidatawiki/找到。

Warning: The format of the JSON data embedded in the XML dumps is subject to change without notice, and may be inconsistent between revisions. It should be treated as opaque binary data. It is strongly recommended to use the JSON or RDF dumps instead, which use canonical representations of the data!

维基数据的增量转储(或新增/变更转储)同样可供下载。这些转储包含在过去24小时内新增的内容,以减少下载整个数据库转储的必要。这些转储会显著地小于整个数据库转储。

这些转储在这里可用。

Lexicographical data

Lexical data dumps are not yet available for download. See corresponding Phabricator ticket.

Old JSON and RDF dumps

Old RDF and JSON dumps can be found on the Internet Archive (Q461):

Data model

The data model can be looked up here. The data model describes the fundamental building blocks of Wikidata's data.

Database schema

An overview over the schema of the database can be found at this page. (This is not the schema of the data in Wikidata.)

License

维基数据已提供可用内容的副本以供下载。这些数据库可以用于个人或商业用途,备份或脱机使用。所有来自“主要”和“属性”命名空间的结构化数据均在知识共享 CC0 协议条款之下可用。其他名字空间的文本在知识共享 署名-相同方式共享协议条款之下可用;附加条款亦可能应用。多媒体项目和其他内容在其他协议之下提供,其详情页面有详细说明。