ウィキペディアAPIからのリダイレクトがありません

Aug 24 2020

このクエリを使用して、ウィキペディアページのリダイレクトを取得しようとしています。

https://en.wikipedia.org/w/api.php?action=query&generator=search&format=json&gsrsearch=iiroc&gsrlimit=10&prop=pageprops|description|redirects&redirects

ご覧のとおり、「カナダの投資業界規制機関」のページにはリダイレクトがありません。

            "18847030": {
                "pageid": 18847030,
                "ns": 0,
                "title": "Investment Industry Regulatory Organization of Canada",
                "index": 1,
                "pageprops": {
                    "page_image": "Investment_Industry_Regulatory_Organization_of_Canada_Logo.jpg",
                    "wikibase_item": "Q16987312"
                },
                "description": "organization",
                "descriptionsource": "central"
            }

ただし、 https://en.wikipedia.org/wiki/IIROC にリダイレクトされます https://en.wikipedia.org/wiki/Investment_Industry_Regulatory_Organization_of_Canada。

では、なぜ「IIROC」が「Investment_Industry_Regulatory_Organization_of_Canada」のリダイレクトに含まれていないのでしょうか。

ありがとうございました

回答

1 AXO Aug 24 2020 at 17:38

バッチが完了するまで、propクエリを続行する必要があります。

までクエリを続けると、次の結果になりました https://en.wikipedia.org/w/api.php?action=query&format=json&prop=pageprops%7Cdescription%7Credirects&continue=%7C%7Cpageprops%7Cdescription&generator=search&redirects=1&rdcontinue=Financial_adviser%7C52889338&gsrsearch=iiroc&gsrlimit=10

        "18847030": {
            "pageid": 18847030,
            "ns": 0,
            "title": "Investment Industry Regulatory Organization of Canada",
            "index": 1,
            "redirects": [
                {
                    "pageid": 18855542,
                    "ns": 0,
                    "title": "IIROC"
                },
                {
                    "pageid": 18936209,
                    "ns": 0,
                    "title": "Investment Dealers Assocation of Canada"
                },
                {
                    "pageid": 18936308,
                    "ns": 0,
                    "title": "Investment Dealers Assocation"
                },
                {
                    "pageid": 18936769,
                    "ns": 0,
                    "title": "Investment Dealers Association of Canada"
                }
            ]
        },