Python Example
Use the v2 API in Python scripts, bots or tools.
pip install requests
import requests
API_KEY = 'your_key_here'
BASE_URL = 'https://api.rblxvalue.com/v2'
HEADERS = {'X-Api-Key': API_KEY}
def api(path: str, **params) -> dict:
r = requests.get(BASE_URL + path, headers=HEADERS, params=params, timeout=5)
return r.json()
Item lookup (slug or acronym)
def get_item(ident: str) -> dict | None:
return api(f'/items/{ident}').get('item')
item = get_item('corrupt') # also 'CORR', 'Corrupt'
if item:
print(f"{item['name']}: {item['value']:,} (demand: {item['demand']}/10)")
print(f"MM2Values {item['value_source_a']} · Supreme {item['value_source_b']}")
Search items
def search_items(query: str, limit: int = 10) -> list:
return api('/items', search=query, limit=limit).get('items', [])
for item in search_items('chroma'):
print(item['name'], item['value'])
Set lookup
def get_set(ident: str) -> dict | None:
return api(f'/sets/{ident}').get('set')
mm2_set = get_set('celestial') # 'constellation' resolves to the same set
if mm2_set:
print(f"{mm2_set['name']}: {mm2_set['total_value']:,} total")
for i in mm2_set.get('items', []):
print(f" - {i['name']}: {i['value']:,}")
Value history
def get_history(ident: str, period: str = '1Y', source: str = 'all') -> list:
return api(f'/history/{ident}', period=period, source=source).get('history', [])
for point in get_history('corrupt', period='ALL'):
print(point['date'], point['source'], point['value'])
Profile & meta
print(api('/profile/UN6107617').get('profile'))
print(api('/meta')) # last_updated, totals, last_run
Batch all items
import time
def get_all_items() -> list:
items, offset = [], 0
while True:
batch = api('/items', limit=100, offset=offset).get('items', [])
if not batch:
break
items.extend(batch)
offset += 100
time.sleep(0.1) # respect rate limit
return items
print('Total items:', len(get_all_items()))