Wikidata:Data access

From Wikidata
Jump to: navigation, search
Translate this page; This page contains changes which are not marked for translation.

Other languages:
català • ‎dansk • ‎Deutsch • ‎English • ‎suomi • ‎français • ‎हिन्दी • ‎italiano • ‎日本語 • ‎polski • ‎русский • ‎中文

This page is a starting point for you if you are an institution, company or organisation that wants to use data from Wikidata.

Basic important things to know

Volunteers like these people - and you - make Wikidata

Wikidata offers a wide range of general data about our universe as well as links to other databases. The data is published under CC-0. It can be edited by anyone and is maintained by Wikidata's editor community.

How can I get data out of Wikidata?

There are several ways to access and edit the data from Wikidata. You can access data per item, or the entirety of the data as dumps.

Per-item access to data

Data can be accessed either via dereferencable URIs following linked data standards, or through the MediaWiki API.

Linked Data interface

Meet Q42

Each item or property has a URI that is obtained by appending its ID (such as Q42 or P12) to the Wikidata namespace:

http://www.wikidata.org/entity/

For example, the URI of Douglas Adams is http://www.wikidata.org/entity/Q42. Data about the item or property can be obtained from this URI, where the file format of the data can be selected through content negotiation. When opening the URI in a normal Web browser, the HTML content will be displayed.

For cases where it is inconvenient to use content negotiation (like in a normal Web browser), one can also access per-entity data in specific formats by extending the URI with a postfix to indicate the file type, such as .json, .rdf, .ttl or .nt. For example, http://www.wikidata.org/entity/Q42.json leads to a JSON export for item Q42. Specific revisions can be obtained by appending a revision query parameter like so http://www.wikidata.org/entity/Q42.json?revision=112.

MediaWiki API

See the documentation of the API.

Wikidata Query

See the homepage of this API

A properly integrated query service is being worked on. You can track the progress of it in this Phabricator project.

SPARQL endpoints

There are currently the following SPARQL endpoints with Wikidata data. They are all maintained by third parties and experimental.

  • University of Chile: Virtuoso-based endpoint; set up to assist the RDF/SPARQL work at Wikimedia
  • Metaphacts: BlazeGraph-based endpoint; set up to assist the RDF/SPARQL work at Wikimedia
  • OpenLink: Virtuoso-based endpoint; LOD Cloud Cache which tracks 5-star Linked Open Datasets in general
  • LDF: Demonstration of Linked-Data-Fragments (client-based query answering) for Wikidata

The end points that were set up to assist RDF/SPARQL work at Wikimedia are also use to gather logs of queries, and it is particularly welcomed if you use them to try important queries. Issues should be discussed on the wikidata-l mailing list.

Note that the underlying RDF model used in each store to represent Wikidata contents may differ, since the discussion of this is still in flux as of early 2015. Moreover, some endpoints may only use part of the data (e.g., only simplified statements but not the full ones) or be based on dumps that are not the most recent.

Bots

We welcome well-behaved bots

You can also access the API by using a bot. See Wikidata:Bots for more on bots.

Access to dumps

See the database dumps documentation.

Best practices to follow

Our logo

Wikidata offers you the data in Wikidata for free with no requirement to attribute under CC-0. We would however greatly appreciate if you would mention Wikidata as the origin of your data. This will allow us to ensure that the projects stays around for a long time and provides you with up-to-date and high quality data. We will also promote the best projects using Wikidata's data. Some examples for attributing Wikidata: "Powered by Wikidata", "Powered by Wikidata Tags", "Powered by Wikidata data", "Powered by the magic of Wikidata", "Using Wikidata data", "With data from Wikidata", "Data from Wikidata", "Source: Wikidata", "Including data from Wikidata", ...

You may also use the Wikidata logo (see above), but should not do so in any way that implies endorsement by Wikidata, or the Wikimedia Foundation.

Please offer your users a way to report issues in the data and find a way to feed this back to Wikidata's editor community. We are currently working on streamlining this process. Until then please announce where you collect issues on the Project chat.

Examples and showcases

A number of great tools are being built on top of Wikidata. The external tools page collects them.

See also