speedruncomorg / api

REST API Documentation for speedrun.com
346 stars 36 forks source link

`GET /runs` returning duplicates on some orderby filters #155

Open audiosalix opened 2 years ago

audiosalix commented 2 years ago

When getting a list of all runs in a category, I found that I was receiving duplicates of many runs instead of the full list of runs that matched the filter

To test, I ran a script that took every verified run from a particular category, and put the run IDs into a set. (https://www.speedrun.com/api/v1/runs?category=n2y9z41d&status=verified)

orderby=game and orderby=level returned 802 unique runs, and 606 duplicate runs orderby=date returned 1398 unique runs and 10 duplicates orderby=category and orderby=verify-date returned 1408 unique runs and no duplicates

No idea what is causing this behaviour and didn't seem to be any logic to which runs were duplicated, although it was deterministic. Another moderator also tested with their own script and got the same results.