Original Link: https://rentry.co/roblox_vm_game_recommendations/

import requests
import time
import json
import os
import re

def clean_filename(name):
    return re.sub(r'[\*"/\\<>:|?]', '', name).strip()

def get_universe_id(place_id):
    url = f"https://apis.roblox.com/universes/v1/places/{place_id}/universe"

    while True:
            response = requests.get(url)

            if response.status_code == 200:
                data = response.json()
                universe_id = data.get("universeId")

                if universe_id is not None:
                    return universe_id
            else:
                print("Error")
                time.sleep(5)

def get_place_name(universe_id):
    url = f"https://games.roblox.com/v1/games?universeIds={universe_id}"

    while True:
        response = requests.get(url)

        if response.status_code == 200:
            data = response.json()
            game_list = data.get("data")

            if game_list:
                game = game_list[0]
                return game.get("name")
        else:
            print("Error")
            time.sleep(5)

def get_gamepasses(universe_id):
    url = f"https://games.roblox.com/v1/games/{universe_id}/game-passes?limit=100&sortOrder=Asc"

    while True:
        response = requests.get(url)

        if response.status_code == 200:
            data = response.json()
            gamepasses_list = data.get("data")

            # store list
            gamepasses = []

            if gamepasses_list:
                # the great filter
                for gamepass in gamepasses_list:
                    price = gamepass.get("price")

                    # check if price isn't null
                    if price is not None:
                        gamepasses_info = {
                            "id": gamepass.get("id"),
                            "name": gamepass.get("name"),
                            "price": gamepass.get("price")
                        }
                        gamepasses.append(gamepasses_info)      
            return gamepasses           

def get_developer_products(universe_id):
    url = f"https://apis.roblox.com/developer-products/v2/universes/{universe_id}/developerproducts?limit=100"

    while True:
        response = requests.get(url)

        if response.status_code == 200:
            data = response.json()
            products_list = data.get("developerProducts")


            # store list
            products = []

            if products_list:
                # the great filter
                for product in products_list:
                    product_info = {
                        "ProductId": product.get("ProductId"),
                        "DisplayName": product.get("displayName"),
                        "IsForSale": product.get("IsForSale"),
                        "PriceInRobux": product.get("PriceInRobux"),
                        "Created": product.get("Created"),
                        "Updated": product.get("Updated")
                    }
                    products.append(product_info)
            return products
        else:
            print("Error")
            time.sleep(5)

while True:
    place_id = input("Insert ROBLOX place ID: ")
    universe_id = get_universe_id(place_id)
    print("Universe ID: " + str(universe_id))

    game_name = get_place_name(universe_id)
    folder_name = f"{clean_filename(game_name)} [{place_id}]"
    os.makedirs(folder_name, exist_ok=True)

    gamepasses_list = get_gamepasses(universe_id)
    with open(os.path.join(folder_name, "gamepasses.txt"), "w", encoding="utf-8") as f:
        f.write(json.dumps(gamepasses_list, indent=4))

    products_list = get_developer_products(universe_id)
    with open(os.path.join(folder_name, "products.txt"), "w", encoding="utf-8") as f:
        f.write(json.dumps(products_list, indent=4))

    print("Saved gamepasses and developer products info.")
Edit

Pub: 09 Oct 2025 23:55 UTC

Edit: 16 Oct 2025 20:12 UTC

Views: 25