How to fetch game of the gamepass

The api so far returns only this data and i have no idea how to map it to the game destination

{
    "TargetId": 1085970113,
    "ProductType": "Game Pass",
    "AssetId": 0,
    "ProductId": 3396277272,
    "Name": "2x Energy",
    "Description": "⚡ Increases the amount of Energy you get from Trainings by x2!\r\n",
    "AssetTypeId": 0,
    "Creator": {
        "Id": 4593127032,
        "Name": "TPC Games",
        "CreatorType": "Group",
        "CreatorTargetId": 32350554
    },
    "IconImageAssetId": 110496713079306,
    "Created": "2025-09-06T14:27:13.993Z",
    "Updated": "2025-10-13T16:55:10.113Z",
    "PriceInRobux": 30,
    "PriceInTickets": null,
    "Sales": 0,
    "IsNew": false,
    "IsForSale": true,
    "IsPublicDomain": false,
    "IsLimited": false,
    "IsLimitedUnique": false,
    "Remaining": null,
    "MinimumMembershipLevel": 0
}

Roblox does not return the game (universe/place) directly in that response. The key field is:
I’m not sure if I should even say it. So, I’ll just stick with that.

1 Like

Key field? what is it didn’t quite understand you

1 Like

I’m saying, Roblox does not return the game (universe/place) directly in that response.
I can’t think of any reason anyone would legitimately want to know that, so..
You can safely check Game Passes for games you own without violating any rules.
Other than that, it starts to get iffy, and it’s not directly shown for a reason.

Turn Around Adventure, this is a dead end.

1 Like

I wanna link it to the dedicated gamepass page

2 Likes

Sweet, use your games description to link it to the dedicated gamepass page. That breaks no TOS rules as far as I know. There is also a store tab on all games that is a perfect spot for gamepasses.
Just click; Add Pass.

1 Like

Well I think I got what you meant, scraping the data from the html file itself

1 Like

You can scrap the html page returned by the Roblox website to fetch the gamepass place.

All you have to do is:

  1. Make a request to https://www.roblox.com/game-pass/{gamepassId}, it should redirect to https://www.roblox.com/game-pass/{gamepassId}/{HttpEncodedGamepassName}
  2. Save the response and look for the target place id using a tool like control+F. As of writing this it’s located between the strings Use this Pass in: <a class="text-name text-overflow font-caption-body" href=https://www.roblox.com/games/ and >
  3. Given the above info, write a small script, that after fetching the HTTP page, cuts/splits the string two times, so it starts after the first string and ends before the second string. Then tonumber it if you want.

I wont give you a code snippet because I feel it may change in the future, it’s the process that matters. If for some reason the first request returns a 302 error status code instead of 200, it didn’t do the redirect automatically. You can fetch the correct page by checking the location response header of that failed request, if that happens. Basically make two get requests.

1 Like

Yes, but use a proxy, requests to https://roblox.com/ won’t succeed. Also projects like this might come in handy for automating finding the correct element: GitHub - msva/lua-htmlparser: An HTML parser for lua.

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