Speedrun Record Custom API?

Hello everyone. I’m trying to get a command that will fetch the speedrun record of Outlast Whistblower glitchless. I’ve tried taking other people’s speedrun record commands and changing them to fit my game and category but no luck. Any help would be greatly appreciated.

I can make a command for you if you link the game on speedrun.com

Is it https://www.speedrun.com/Outlast or https://www.speedrun.com/outlastmemes?

Here is the link. https://www.speedrun.com/Outlast#Glitchless

It doesn’t change the link for the whistelblower DLC though.

here is a command that will get you what you want:

!commands add !top $(eval var j = $(urlfetch json https://www.speedrun.com/api/v1/leaderboards/76r43l18/category/9d863ql2?var-kn04v9dl=9qjz7w01); var sec = new Date(null); sec.setSeconds(j["data"]["runs"]["0"]["run"]["times"]["primary_t"]); sec.toISOString().substr(11, 8))

It doesn’t do anything other than return the top time, sadly because of how the api works it’s really difficult to get the runner at the same time, but its possible if you need that. You can format it however you want, just write the surrounding sentence around the eval. e.g.

!commands add !top The current world record for Outlast Whistleblower is: $(eval var j = $(urlfetch json https://www.speedrun.com/api/v1/leaderboards/76r43l18/category/9d863ql2?var-kn04v9dl=9qjz7w01); var sec = new Date(null); sec.setSeconds(j["data"]["runs"]["0"]["run"]["times"]["primary_t"]); sec.toISOString().substr(11, 8))

If you have any questions about how it works feel free to ask in this thread or on the discord

!commands add !record $(urlfetch https://speedrun.travisadaily.com/api/v1/command/record/Outlast%20Glitchless)

There doesn’t seem to be a way to only get Whistleblower times but luckily they all seem to be lower than the Main Game times, so this isn’t an issue.

Thank you both so much, greatly appreciated :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.