Page MenuHomePhabricator

Add option to output "iwurl" (interwiki target url) attribute in ApiQuery
Closed, ResolvedPublic


Please return the target url if a title contains an interwiki prefix like prop=langlinks&llurl=1 does.

At the momment it it not always possible to know the target url of an interwiki link. For language links llurl can be used which solves the problem. /api/query/interwiki only contains the interwiki prefix (@iw) without an possibility to request the url. Not all prefix are contained in the sitematrix (see bug 28743 / bug 19838), so there is no other sure possibility the build the url of the interwikitarget by your own.

My suggestion would be to add a new parameter interwikiurl, so that

    <i title="en:Main Page" iw="en" iwurl=" Page"/>


New the iwurl attributes should return the same value like /api/query/pages/page/langlinks/ll/@url on querying prop=langlinks&url=1

Version: unspecified
Severity: enhancement