Page MenuHomePhabricator

redirect not provided in the query API
Closed, InvalidPublic

Description

example API call where the actual redirect is given empty instead of "Thessaloniki"
https://en.wikipedia.org/w/api.php?action=query&continue=&format=xml&prop=revisions|info&titles=Salonica&rvprop=ids|content|timestamp|user|userid

<page _idx="13441713" ... redirect="">

while it should be

<page _idx="13441713" ... redirect="Thessaloniki">

is this a bug or is there another way to get the redirect target filled correctly?

Event Timeline

Jimkont created this task.Aug 17 2016, 11:09 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 17 2016, 11:09 AM
Anomie closed this task as Invalid.Aug 17 2016, 2:08 PM
Anomie added a subscriber: Anomie.

The "redirect" property you are looking at is not intended to contain the target of the redirect, it is simply a flag indicating that the page is a redirect.

You can use the redirects query parameter to have redirects be automatically resolved. For a request to add the redirect target to prop=info, see T31115: add redirect target value on page info (ApiQueryInfo).