mp94
mp94

Reputation: 47

Missing redirects from Wikipedia API

I'm trying to get redirects for a Wikipedia page by mean of this query:

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

As you can see, the page "Investment Industry Regulatory Organization of Canada" gets no 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"
            }

However, if a go to https://en.wikipedia.org/wiki/IIROC I get redirected to https://en.wikipedia.org/wiki/Investment_Industry_Regulatory_Organization_of_Canada.

So why "IIROC" is not included in the redirects for "Investment_Industry_Regulatory_Organization_of_Canada"?

Thank you

Upvotes: 1

Views: 176

Answers (1)

AXO
AXO

Reputation: 9086

You should continue your prop query until the batch is complete.

I reached the following result by continuing the query until 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"
                }
            ]
        },

Upvotes: 1

Related Questions