Requests for comment/Wikidata API


 * We implemented a pageterms query module in 2014-11 and run Extension:Wikibase Client on most wikipedias to resolve T7279.

This proposal was abandoned due to lack of time by an implementor – would welcome a developer to take this over and reactivate it.

Introduction
This RFC proposes a slightly altered Wikidata API structure to make it more in line with the core API, as well as more feature rich and compact.

The goals of the RFC are
 * Minimalistic results - only retrieve the data that has been asked for, nothing else. This reduces server load, bandwidth costs, and improves speed.
 * Seamless integration - Wikibase extensions should be extending   when appropriate. This way all the other features of the query action becomes available, such as combining multiple pieces of information in one query (ask for aliases and what links here together), as well as query continuation.
 * Available locally - Should be queryable from the local wiki rather than having to make a cross-domain request.

list=wbsearch (wbs)
Exactly one of these parameters is required: This parameter can be used with any of the above:
 * : Search using a list of site links in the site+name format, e.g. enwiki:Marie Curie . Multiple sites and languages are allowed. Single result per sitelink. Multiple sitelinks may resolve into the same item page.
 * : Search using a list of aliases in the language title format, e.g. Marie Curie . Multiple languages are allowed. Multiple results per alias. Multiple aliases may resolve into the same item page.
 * : Search using a list of labels in the language title format, e.g. Marie Curie . Multiple languages are allowed. Multiple results per label. Multiple labels may resolve into the same item page.
 * : (Optional) Adds an extra result section  that contains a mapping of all searched terms to pageids. If this module is used as a generator, the section name will be.

prop=wikibase (wbp)

 * : Which data to get from the Qnnn page (will ignore any non-wikibase pages). Available values are:
 * : Get the description given to the page in a specific language (per wbplang)
 * : Get the list of aliases given to the page in a specific language (per wbplang)
 * : One or more languages for wbpprop
 * : List of global site ids (e.g. hewiki) to get the language links for