In [[ https://wiki.archlinux.org/api.php?action=query&generator=allredirects&garlimit=max&garunique&prop=redirects&rdprop=title&rdlimit=max | this query ]], `garunique` should force `generator=allredirects` to yield only target redirect pages and `prop=redirects` is used to get the lists of pages redirecting to the generated pages.For example, But the query contains:
"8986": {
"pageid": 8986,
"ns": 0,
"title": "ABS FAQ"
},
"3540": {
"pageid": 3540,
"ns": 0,
"title": "ACPI modules",
"redirects": [
{
"ns": 0,
"title": "Acpi modules"
},
{
"ns": 0,
"title": "Acpi"
}
]
},
There are no source links shown for the "ABS FAQ" pageconsider [[https://wiki.archlinux.org/?curid=10405&redirect=no|this redirect on wiki.archlinux.org]], and it is not a result of query-continuationfrom title `ABS FAQ (日本語)` to `ja:ABS FAQ`. Further investigation shows that the "ABS FAQ" page in fact redirects to another page, i.e. it is a //redirect source//.This gets returned appropriately from [[https://wiki.archlinux.org/api.php?action=query&list=allredirects&arfrom=ABS%20FAQ&arlimit=1&arprop=ids%7Ctitle%7Cfragment%7Cinterwiki|a non-unique query]], There are many more similar entries in the query.
Another incorrect entry a valid // target redirect // page being marked as "missing" (whatever that means) and as a result `prop=redirects` did not provide any pages redirecting to it:
"-4": {
"ns": 0,
"title": "ArchWiki:About",
"missing": ""
},
Is this a bug in the API or an inconsistency in the database? Any idea how the latter might happen?
I have also tried the same query on different wikis and the results seem valid,but if you [[https://wiki.archlinux.org/api.php?action=query&list=allredirects&arfrom=ABS%20FAQ&arlimit=1&arprop=title&arunique=1|add arunique]] you lose any indication that it's interwiki and [[https://wiki.archlinux.org/api.php?action=query&generator=allredirects&garfrom=ABS%20FAQ&garlimit=1&garunique=1|in generator mode]] it generates a page on the local wiki instead of the correct interwiki title. but I'm not acquainted with other wikis so well.