Needing help with catalog api

Hey there, im DaCoolDevv, a developer since 2018.

  • I want to get the latest items on the catalog, like get notified when something is uploaded to the catalog.

  • The api just gives me details, id, name, creator name, ect…

  • I tried refreshing the json page for the roblox catalog (api) every 2 minutes, but it misses some of the newest items.

    • Thanks for reading.
2 Likes

You can refresh it faster if you’re doing this from a Roblox server, max requests are 500 per minute. So you can check for items every 0.5 seconds and you will only make 120 requests every minute(far away from the max, so I assume if you implement this correctly no issues will occur).

Then you just need to write code that receives the old and new JSON, does some comparisons, and returns the items that have been determined to be new.

1 Like

I’m not in roblox, im using python, but i think it requires js

If you mean the request specifically then no. If I’m not mistaken all simple requests made from a browser using javascript can be replicated to Python. You just need to see how the communication is made(url, method, headers, etc.) and the format of the response and act accordingly.

For this, inspect element network tab is your friend.

1 Like

well maybe a web developer will know how to help tho

In the json page, i want to know when something is added to it, like, for example, in a web page, its a json page, there is {test1}, i refreshed, and i saw the test1 json page, but the owner of the web page added changed it to {test2}, in my page its still test1, i want to know when he changes/adds/removes, so i can refresh, so to be simple, i wanna remake rolimon discord bot

To do that you need to check for changes, in a loop. This entire thing involves fetching the json each x seconds and comparing it to the old one to get the new values.

Isn’t there another way for refreshing every x seconds?

There is no way to find out if a webpage has changed unless the server pings you or you send a request periodically and compare the old response to the new response. In Roblox’s case, you don’t have control over the server, so you’ll have to send a request to the API every X amount of time and compare the responses. If the responses are different, then you’ll know something has been changed.

I don’t know what you mean when you said you need JS while using Python. However, in Python, let’s say you wanted to check for a new Roblox limited:

import requests
import time

url = "https://catalog.roblox.com/v2/search/items/details?Category=1&CreatorName=Roblox&salesTypeFilter=2&SortType=3&limit=10"
previous_content = "" # Stores the previous content

while True:
    try:
        response = requests.get(url)
        response.raise_for_status()

        current_content = response.text

        if current_content != previous_content:
            print("a limited was added:")
            print(current_content)

        previous_content = current_content

        time.sleep(60)

    except requests.exceptions.RequestException as e:
        print(f"error: {e}")

    except KeyboardInterrupt:
        break

That script will check the catalog search API (creator: Roblox, limiteds only, sort: recently created, limit: 10) every 60 seconds for an update. When one is detected, it will print the changes to the console. You’ll need to make your own to do what you need.

Obviously, Roblox has ratelimits. They aren’t too extreme but they aren’t low either. They also change frequently so there’s no exact number. So if you’re planning on making requests really fast, you’ll have to use proxy some in order to bypass the limit. That’s how sites like Rolimon’s do it.

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