Mismatch between API documentation and the response received

When I make a request to return the ranklist for a particular contest using the following code:


api\_call\_headers = {'Authorization': 'Bearer ' + access\_token}
ratings\_url = 'https://api.codechef.com/rankings/JAN18'
fields ={
            'limit': 50,
            'sortBy': 'rank',
            'sortOrder': 'asc',
        }
sub\_response = requests.get(ratings\_url, headers = api\_call\_headers, params = fields)

I am able to get only the first 25 users in the ranklist though I have mentioned the limit as 50. In the API documentation, it is mentioned that the maximum number of rankings in the list can be 100 but I am not able to get more than 25 in any case. Even, when I filter the ranklist by the institution, I get the ranklist consisting of only 25 users from that institution.

Please help me to sort out the issue!

@rounak217, max limit is 25, not 100 for ranklist. We’ll change it in the documentation.

1 Like