How to Detect the Value of Any Badge!

Hello Developers!

I made a discovery yesterday while experimenting through many hours of API testing and learning many new things that I will share!

The value of badges can vary between:

  • Free (A Badge that is created without any Robux) [VALUE : 0]
  • Valuable (A Badge that is created with 100 Robux)[VALUE : 1]
  • Legacy (A Badge that was created with 100 Robux BEFORE February 2021)[VALUE : 2]
  • Non Valuable Legacy (No idea what this is; if you have any idea about what this means, please let me know.){VALUE : 3]

To detect if a badge is valuable or not, you must use a special API.

The API I use is:

https://bor-valuable-badge-database-production.up.railway.app/api/v3/query/bybadgeids?badgeIds=BADGEID

Here is a script to detect the value of a badge using just the badge ID.

YOU MUST HAVE HTTP REQUESTS ON FOR THIS TO WORK.

Go into your desired game in roblox studio and look for the button that says “Game Settings” at the top. MAKE SURE YOUR TASKBAR IS SELECTED TO HOME!
image
Then go to “Security”
image
“Allow HTTP Requests” is turned ON
image
and then save!
image

local HttpService = game:GetService("HttpService") --Http Service

local baseUrl = "https://bor-valuable-badge-database-production.up.railway.app/api/v3/query/bybadgeids?badgeIds=" --The API 

local BadgeId = 0 --Your badge id here.
	
local updatedUrl = baseUrl .. badgeId --Update the URL with the badge ID
	
local response = HttpService:GetAsync(baseUrl) --Getting information from the API

local data =  HttpService:JSONDecode(response) --Decoding the API into a table.

print(data) --The table containing the information about the badge including the value.
--return data["data"][1]["value"]

I wanted to share this because I found this fascinating and didn’t see anything with his type of information. I help this helps your creation with these free resources.

4 Likes

may I ask what the underlying roblox endpoint for this is? It’s not ideal to rely on a third party proxy.

3 Likes

There is no way to detect the value of a badge without using third-party APIs.

What makes the cutoff point February 2021?

1 Like

Before that date, badges HAD to be created using Robux. Now, badges can be free and paid.

1 Like

legacy badges are badges created before february 22, 2022, when roblox firstly introduced free badges
non valuable legacy is so called duped badge from 2011 that created for free due to roblox bug

also you can get badge value yourself using badges.roblox.com api
here is python script for that

import requests
import json
import datetime
from collections import Counter
n = 2860673459
c = ""
l = []
m = []
v = []
b = 0
k = 1
with requests.session() as s1:
  s1.cookies[".ROBLOSECURITY"] = ""
while k == 1:
  joa3 = (f"https://badges.roblox.com/v1/universes/{n}/badges?limit=100&cursor={c}&sortOrder=Asc")
  newa3 = (json.loads(s1.get(("".join(joa3))).text))
  li2 = []
  for i2 in range(len(newa3["data"])):
    li2.append(newa3["data"][i2])
  for i2 in range(len(li2)):
    if int(li2[i2]["id"]) > 2124949326:
      d = li2[i2]["created"]
      dyear = d[:4]
      dmonth = d[5:7]
      dday = d[8:10]
      dhour = d[11:13]
      dtzone = d[-5:-3]
      dhour = (int(dhour)+int(dtzone))
      dtime = datetime.datetime(int(dyear), int(dmonth), int(dday))
      if dhour >= 24:
        dtime  = dtime + datetime.timedelta(days=1)
      else:
        if dhour < 0:
          dtime  = dtime - datetime.timedelta(days=1)
      l.append(dtime)
      m.append(int(li2[i2]["id"]))
    else:
      v.append(int(li2[i2]["id"]))
    if newa3["nextPageCursor"] == None:
      k = 0
    else:
      c = newa3["nextPageCursor"]
  l3 = dict(Counter(l))
  l6 = 0
  l7 = ""
  for i4 in range(len(l)):
    if l3[l[i4]] > 5:
      if l6 <= 0:
        if l7 == l[i4]:
          if not m[i4] in v:
            v.append(m[i4])
        else:
          l6 = 4
          l7 = l[i4]
      else:
        l6 = l6 - 1
print(v)

bad news since roblox hides disabled badges from being shown in api it probably wont work :sob:

2 Likes