For a project, I am looking to obtain the data on runs for Minecraft: Java Edition. More specifically, I am looking to get the data on RSG glitchless any% runs on Minecraft version 1.16+. In short, I want to obtain the same data that is displayed to website browsers on this page: https://www.speedrun.com/mc?h=Any_Glitchless-Random_Seed-1.16&x=mkeyl926-r8rg67rn.21d4zvp1-wl33kewl.4qye4731
My initial strategy was to simply download all of the runs for Java Edition and then separate or otherwise filter out the ones that I do not need. According to some preliminary testing and https://github.com/speedruncomorg/api/issues/125, the limit on the number of runs that I would have access to is 10,000 (20,000 if I used a workaround where I obtain the first and last 10,000 runs, ordered by date. This doesn't help, though, because Java Edition has over 30,000 runs in total).
Because there are simply too many runs in total, I want to instead obtain the ~4000 runs which have the specific version (1.16+) and category (RSG any% glitchless).
What I believe I need to do in order to do this is query the API for runs where the game id is for MC: Java Edition (game ID being "j1npme6p"), the category is Any% glitchless (category ID being "mkeyl926"). Additionally I need to set the value of "Version" to "1.16+" (I believe this is done by setting the variable "wl33kewl" to "4qye4731") and the value of "Seed generation" to "Random" (done I believe by setting the variable "r8rg67rn" to "21d4zvp1").
The resulting API query, I believe, would be: https://www.speedrun.com/api/v1/runs?game=j1npme6p&category=mkeyl926&var-wl33kewl=4qye4731&var-r8rg67rn=21d4zvp1&max=1 (I have set max to 1 for debugging purposes. The goal is to set it to 200 later)
Unfortunately, this yields a run (run ID "8m7po60m") which does not have the correct "Version" and "Seed generation" values. This query does not successfully filter out the runs with unwanted versions and seed generation variables. This means that I would not be able to obtain all ~4000 runs with the desired variables.
Can somebody help me figure out why my query is not working? I'm hoping I'm just making a simple error here, but from what I can find online, I can't determine what that might be. Any help would be appreciated, thanks!
You haven't used the correct URL path and query for "max", where it should be "top" here instead.
Here's the correct URL: https://www.speedrun.com/api/v1/leaderboards/j1npme6p/category/mkeyl926?var-wl33kewl=4qye4731&var-r8rg67rn=21d4zvp1&top=1
You need to use leaderboards if you want to filter by variables in API v1