Page MenuHomePhabricator

Fix or deprecate wbsearchentities "props" param
Open, Needs TriagePublic

Description

wbsearchentities has a "props" param with only one available value: “url”. The URL is already included in search results by default, which means that this parameter does nothing.

We should either fix the parameter, or remove it. Either is would be a breaking change, since existing clients might rely on the API returning the URL by default now, and removing the parameter is of course also a breaking change.

Example:
https://www.wikidata.org/w/api.php?action=wbsearchentities&format=json&search=potato&language=en
https://www.wikidata.org/w/api.php?action=wbsearchentities&format=json&search=potato&language=en&props=url

Event Timeline

If I understand correctly, the default value is the same of the only possible value. This may have sense in this corner case.

Maybe we can "don't care" until a new prop added. For example we can add as sub-task the introduction of "prop=description" or "prop=label" or whatever other prop, to then activate only that property successfully, and omitting all the other properties.

Additionally, props surprisingly works! For example to remove the props.

Default, with prop URL:

https://www.wikidata.org/w/api.php?action=wbsearchentities&format=json&search=potato&language=en

And without props (without URL):

https://www.wikidata.org/w/api.php?action=wbsearchentities&format=json&search=potato&language=en&props=

So maybe we can keep and do not deprecate.