### Install osrsreboxed Package Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Installs the osrsreboxed Python package using pip. This command fetches and installs the latest version of the package from the Python Package Index. ```bash pip install osrsreboxed ``` -------------------------------- ### Set up osrsreboxed-db Development Repository on Ubuntu Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This section outlines the steps to set up the osrsreboxed-db development repository on an Ubuntu system. It includes installing Python 3 pip, cloning the repository, creating and activating a virtual environment, and installing project dependencies from requirements.txt. ```bash sudo apt update sudo apt install python3-pip ``` ```bash git clone --recursive https://github.com/0xNeffarion/osrsreboxed-db.git cd osrsreboxed-db python -m venv venv source venv/bin/activate pip3 install -r requirements.txt ``` ```bash deactivate ``` -------------------------------- ### Python Prayer Object Example Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md An example of a PrayerProperties object as loaded in the osrsbox Python package. It demonstrates the structure and data types for a specific prayer, Rigour. ```python PrayerProperties( id=28, name='Rigour', members=True, description='Increases your Ranged attack by 20% and damage by 23%, and your defence by 25%.', drain_per_minute=40.0, wiki_url='https://oldschool.runescape.wiki/w/Rigour', requirements={'prayer': 74, 'defence': 70}, bonuses={'ranged': 20, 'ranged_strength': 25, 'defence': 23}, icon='iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAABMklEQVR42rWW3Q0CIRCEjwJ8tgBrMPHZFmzAIny0gOvA+izAGjCYcMwNswucSrLJHT/7McvyM02bSojTfwo7Tv8h3h/PqKFfTSTEYqUuwTRQ9R8Erp0XdV79ANBWw7Y/7Mw2W7mhqDSGxTkC0vf5eqqg2I99CKAOVXZ0mY+Lw/SdgFjHk7DD3xE+hLZsINR2+BQMlXG7Gu8Cc2jyt4KketWWw22HWYTUWqcMsYzVcmIBMFQZqBSxmvl1+xj2Z7XdQByQHbKSDET1qNCB1uuHs1ZhY2NgQ2W9fpbCEaAT0jpLeZAKaQvmJI3OUs5QhHoZqoDuWcr7jDe4lURqL3bcIOsTxwJbxmvdcV0FeQPgPmydpZ3KJvcg904bVNi+GwegCPYgG2D1g6nXfvCu4cdRy9rlDXGzl98mKbMMAAAAAElFTkSuQmCC' ) ``` -------------------------------- ### Load and Iterate Through OSRS Prayers (Python) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Loads all OSRS prayers from the database and iterates through them, printing each prayer's name. Requires the osrsreboxed package to be installed. ```python from osrsreboxed import prayers_api prayers = prayers_api.load() for prayer in prayers: print(prayer.name) ``` -------------------------------- ### Load and Iterate Through OSRS Items (Python) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Loads all OSRS items from the database and iterates through them, printing each item's ID and name. Requires the osrsreboxed package to be installed. ```python from osrsreboxed import items_api items = items_api.load() for item in items: print(item.id, item.name) ``` -------------------------------- ### Load and Iterate Through OSRS Monsters (Python) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Loads all OSRS monsters from the database and iterates through them, printing each monster's ID and name. Requires the osrsreboxed package to be installed. ```python #!/usr/bin/python3 from osrsreboxed import monsters_api monsters = monsters_api.load() for monster in monsters: print(monster.id, monster.name) ``` -------------------------------- ### Python Object Example: OSRS Monster Data Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Demonstrates the structure of a monster object in Python, including its properties like ID, name, combat stats, and item drops. This format is useful for programmatic access and manipulation of monster data. ```python MonsterProperties( id=415, name='Abyssal demon', last_updated='2020-12-25', incomplete=False, members=True, release_date='2005-01-26', combat_level=124, size=1, hitpoints=150, max_hit=8, attack_type=['stab'], attack_speed=4, aggressive=False, poisonous=False, venomous=False, immune_poison=False, immune_venom=False, attributes=['demon'], category=['abyssal demon'], slayer_monster=True, slayer_level=85, slayer_xp=150.0, slayer_masters=[ 'vannaka', 'chaeldar', 'konar', 'nieve', 'duradel' ], duplicate=False, examine='A denizen of the Abyss!', wiki_name='Abyssal demon (Standard)', wiki_url='https://oldschool.runescape.wiki/w/Abyssal_demon#Standard', attack_level=97, strength_level=67, defence_level=135, magic_level=1, ranged_level=1, attack_bonus=0, strength_bonus=0, attack_magic=0, magic_bonus=0, attack_ranged=0, ranged_bonus=0, defence_stab=20, defence_slash=20, defence_crush=20, defence_magic=0, defence_ranged=20, drops= [ MonsterDrop( id=592, name='Ashes', members=False, quantity='1', noted=False, rarity=1.0, rolls=1 ), ... MonsterDrop( id=4151, name='Abyssal whip', members=True, quantity='1', noted=False, rarity=0.001953125, rolls=1 ) ] ) ``` -------------------------------- ### JSON Prayer Object Example Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md A JSON representation of a Prayer object, specifically the Rigour prayer. This format is useful for data exchange and storage. ```json { "id": 28, "name": "Rigour", "members": true, "description": "Increases your Ranged attack by 20% and damage by 23%, and your defence by 25.", "drain_per_minute": 40.0, "wiki_url": "https://oldschool.runescape.wiki/w/Rigour", "requirements": { "prayer": 74, "defence": 70 }, "bonuses": { "ranged": 20, "ranged_strength": 25, "defence": 23 }, "icon": "iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAABMklEQVR42rWW3Q0CIRCEjwJ8tgBrMPHZFmzAIny0gOvA+izAGjCYcMwNswucSrLJHT/7McvyM02bSojTfwo7Tv8h3h/PqKFfTSTEYqUuwTRQ9R8Erp0XdV79ANBWw7Y/7Mw2W7mhqDSGxTkC0vf5eqqg2I99CKAOVXZ0mY+Lw/SdgFjHk7DD3xE+hLZsINR2+BQMlXG7Gu8Cc2jyt4KketWWw22HWYTUWqcMsYzVcmIBMFQZqBSxmvl1+xj2Z7XdQByQHbKSDET1qNCB1uuHs1ZhY2NgQ2W9fpbCEaAT0jpLeZAKaQvmJI3OUs5QhHoZqoDuWcr7jDe4lURqL3bcIOsTxwJbxmvdcV0FeQPgPmydpZ3KJvcg904bVNi+GwegCPYgG2D1g6nXfvCu4cdRy9rlDXGzl98mKbMMAAAAAElFTkSuQmCC" } ``` -------------------------------- ### JSON Example: OSRS Monster Data Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Presents the same monster data in JSON format, suitable for data interchange and storage. This structure is commonly used for APIs and configuration files. ```json { "id": 415, "name": "Abyssal demon", "last_updated": "2020-12-25", "incomplete": false, "members": true, "release_date": "2005-01-26", "combat_level": 124, "size": 1, "hitpoints": 150, "max_hit": 8, "attack_type": [ "stab" ], "attack_speed": 4, "aggressive": false, "poisonous": false, "venomous": false, "immune_poison": false, "immune_venom": false, "attributes": [ "demon" ], "category": [ "abyssal demon" ], "slayer_monster": true, "slayer_level": 85, "slayer_xp": 150.0, "slayer_masters": [ "vannaka", "chaeldar", "konar", "nieve", "duradel" ], "duplicate": false, "examine": "A denizen of the Abyss!", "wiki_name": "Abyssal demon (Standard)", "wiki_url": "https://oldschool.runescape.wiki/w/Abyssal_demon#Standard", "attack_level": 97, "strength_level": 67, "defence_level": 135, "magic_level": 1, "ranged_level": 1, "attack_bonus": 0, "strength_bonus": 0, "attack_magic": 0, "magic_bonus": 0, "attack_ranged": 0, "ranged_bonus": 0, "defence_stab": 20, "defence_slash": 20, "defence_crush": 20, "defence_magic": 0, "defence_ranged": 20, "drops": [ { "id": 1623, "name": "Uncut sapphire", "members": true, "quantity": "1", "noted": false, "rarity": 0.009765625, "rolls": 1 }, ... { "id": 4151, "name": "Abyssal whip", "members": true, "quantity": "1", "noted": false, "rarity": 0.001953125, "rolls": 1 } ] } ``` -------------------------------- ### Fetch OSRS Data via Static JSON API using Bash Source: https://context7.com/0xneffarion/osrsreboxed-db/llms.txt This section provides Bash commands to fetch OSRS game data directly from the project's static JSON API hosted on GitHub. It demonstrates how to use `curl` to retrieve individual items or monsters by their IDs, fetch complete databases (items, monsters), get a summary of items (ID and name only), and download item icons. ```bash # Fetch a single item by ID (Abyssal whip) curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/4151.json # Fetch the complete items database curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-complete.json # Fetch a single monster by ID (Abyssal demon) curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/monsters-json/415.json # Fetch the complete monsters database curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/monsters-complete.json # Fetch items summary (ID and name only - smaller file) curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-summary.json # Fetch item icons by ID curl -O https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-icons/4151.png ``` -------------------------------- ### Python Item Object Example - Abyssal Whip Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This snippet demonstrates the structure of an item object in Python, specifically for the 'Abyssal whip'. It includes general item properties, nested 'EquipmentProperties' for combat bonuses, and 'WeaponProperties' for weapon-specific details. If an item lacks certain properties, corresponding nested objects or boolean flags would be set to None or False. ```python ItemProperties( id=4151, name='Abyssal whip', last_updated='2020-12-27', incomplete=False, members=True, tradeable=True, tradeable_on_ge=True, stackable=False, stacked=None, noted=False, noteable=True, linked_id_item=None, linked_id_noted=4152, linked_id_placeholder=14032, placeholder=False, equipable=True, equipable_by_player=True, equipable_weapon=True, cost=120001, lowalch=48000, highalch=72000, weight=0.453, buy_limit=70, quest_item=False, release_date='2005-01-26', duplicate=False, examine='A weapon from the abyss.', icon='iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAABvUlEQVR4Xu2Xv26DMBDG4QEyZECKIkVCKIoyVR26dOrQpUOHDn3/V3F7nL7689kGAo6z9JNuiH1wP+6PIU3zr2Jq3bRVkQ/Y7feBvfcn93o8upfDwT11XQKwOGQMwfYx9O7rcnaf52GEezuFgNdfn4JQ7RjAQojZLAAMcPJbAOH73PcloBTIQiEAG8MB7Pt6MQ+wSW1QAs6Kh1A/NgtnHyKMcZMUCP3AIBw0XcqmgU9qb4W0JwTIwuRAYHETF4FSIMkORjn1xCnjayy8lN/vLVY7TglfvBRGTJpZrpXM+my1f6DhPRdJs8M3nAPibGDseY9hVgHxzbh3chC22dkPQ8EnufddpBgI69Lk3B8hnPrwOsPEw7FYqUzoOsqBUtps8XUASh0bYbxZxUCcJZzCNnjOBGgDDBRD8d4tQAVgRAqEs2jusLOGEhaCgTQTgApLp/s5A0RBGMg3shx2YZb0fZUz9issD4VpsR4PkJ+uYbczJQr94rW7KT3yDJcegLtqeuRlAFa+0bdoeuTxPV2538Ixt1D86Vutr8IR16CSndzfoSpQLIDh09dmscL5lJICMUClw3JKD8tGXiVgfgACr1tEhnw7UAAAAABJRU5ErkJggg==', wiki_name='Abyssal whip', wiki_url='https://oldschool.runescape.wiki/w/Abyssal_whip', equipment=ItemEquipment( attack_stab=0, attack_slash=82, attack_crush=0, attack_magic=0, attack_ranged=0, defence_stab=0, defence_slash=0, defence_crush=0, defence_magic=0, defence_ranged=0, melee_strength=82, ranged_strength=0, magic_damage=0, prayer=0, slot='weapon', requirements={'attack': 70} ), weapon=ItemWeapon( attack_speed=4, weapon_type='whip', stances=[ { 'combat_style': 'flick', 'attack_type': 'slash', 'attack_style': 'accurate', 'experience': 'attack', 'boosts': None }, { 'combat_style': 'lash', 'attack_type': 'slash', 'attack_style': 'controlled', 'experience': 'shared', 'boosts': None }, { 'combat_style': 'deflect', 'attack_type': 'slash', 'attack_style': 'defensive', 'experience': 'defence', 'boosts': None } ] ) ) ``` -------------------------------- ### OSRS Item JSON Example - Abyssal Whip Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This JSON object represents an OSRS item, the Abyssal whip. It includes general item properties, tradeability, cost, and specific details for equipable items like combat bonuses within the 'equipment' key and weapon characteristics in the 'weapon' key. If an item is not equipable or not a weapon, corresponding keys would be null or have 'false' boolean values. ```json { "id": 4151, "name": "Abyssal whip", "last_updated": "2020-12-27", "incomplete": false, "members": true, "tradeable": true, "tradeable_on_ge": true, "stackable": false, "stacked": null, "noted": false, "noteable": true, "linked_id_item": null, "linked_id_noted": 4152, "linked_id_placeholder": 14032, "placeholder": false, "equipable": true, "equipable_by_player": true, "equipable_weapon": true, "cost": 120001, "lowalch": 48000, "highalch": 72000, "weight": 0.453, "buy_limit": 70, "quest_item": false, "release_date": "2005-01-26", "duplicate": false, "examine": "A weapon from the abyss.", "icon": "iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAABvUlEQVR4Xu2Xv26DMBDG4QEyZECKIkVCKIoyVR26dOrQpUOHDn3/V3F7nL7689kGAo6z9JNuiH1wP+6PIU3zr2Jq3bRVkQ/Y7feBvfcn93o8upfDwT11XQKwOGQMwfYx9O7rcnaf52GEezuFgNdfn4JQ7RjAQojZLAAMcPJbAOH73PcloBTIQiEAG8MB7Pt6MQ+wSW1QAs6Kh1A/NgtnHyKMcZMUCP3AIBw0XcqmgU9qb4W0JwTIwuRAYHETF4FSIMkORjn1xCnjayy8lN/vLVY7TglfvBRGTJpZrpXM+my1f6DhPRdJs8M3nAPibGDseY9hVgHxzbh3chC22dkPQ8EnufddpBgI69Lk3B8hnPrwOsPEw7FYqUzoOsqBUtps8XUASh0bYbxZxUCcJZzCNnjOBGgDDBRD8d4tQAVgRAqEs2jusLOGEhaCgTQTgApLp/s5A0RBGMg3shx2YZb0fZUz9issD4VpsR4PkJ+uYbczJQr94rW7KT3yDJcegLtqeuRlAFa+0bdoeuTxPV2538Ixt1D86Vutr8IR16CSndzfoSpQLIDh09dmscL5lJICMUClw3JKD8tGXiVgfgACr1tEhnw7UAAAAABJRU5ErkJggg==", "wiki_name": "Abyssal whip", "wiki_url": "https://oldschool.runescape.wiki/w/Abyssal_whip", "equipment": { "attack_stab": 0, "attack_slash": 82, "attack_crush": 0, "attack_magic": 0, "attack_ranged": 0, "defence_stab": 0, "defence_slash": 0, "defence_crush": 0, "defence_magic": 0, "defence_ranged": 0, "melee_strength": 82, "ranged_strength": 0, "magic_damage": 0, "prayer": 0, "slot": "weapon", "requirements": { "attack": 70 } }, "weapon": { "attack_speed": 4, "weapon_type": "whip", "stances": [ { "combat_style": "flick", "attack_type": "slash", "attack_style": "accurate", "experience": "attack", "boosts": null }, { "combat_style": "lash", "attack_type": "slash", "attack_style": "controlled", "experience": "shared", "boosts": null }, { "combat_style": "deflect", "attack_type": "slash", "attack_style": "defensive", "experience": "defence", "boosts": null } ] } } ``` -------------------------------- ### Fetch JSON Data with Python Source: https://context7.com/0xneffarion/osrsreboxed-db/llms.txt This Python script illustrates how to fetch and parse JSON data from the OSRS Reboxed DB static API using the `urllib` library. It shows how to make an HTTP request to a specific JSON endpoint (e.g., for an item), read the response, decode it, and parse it into a Python dictionary. The example then accesses and prints various properties of the fetched item. ```python import json from urllib.request import urlopen # Fetch a single item url = "https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/4151.json" response = urlopen(url) data = json.loads(response.read().decode("utf-8")) print(f"Item: {data['name']}") print(f"ID: {data['id']}") print(f"Members: {data['members']}") print(f"High Alch: {data['highalch']}") if data['equipable_by_player']: equip = data['equipment'] print(f"Attack Slash: {equip['attack_slash']}") print(f"Melee Strength: {equip['melee_strength']}") print(f"Requirements: {equip['requirements']}") ``` -------------------------------- ### Objects API Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Access summary information for in-game objects. ```APIDOC ## GET /objects-summary.json ### Description Fetches a JSON file containing only object names and their corresponding ID numbers. Useful for downloading a small file to quickly scan or process in-game object data when only names and IDs are needed. ### Method GET ### Endpoint /objects-summary.json ### Parameters None ### Request Example None ### Response #### Success Response (200) - **objects** (array) - An array of objects, each containing an 'id' and 'name' for an object. #### Response Example { "objects": [ { "id": 1000, "name": "Oak tree" }, { "id": 1001, "name": "Willow tree" } ] } ``` -------------------------------- ### Download Single JSON File using wget (Linux) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This command-line snippet uses `wget` to download a single JSON file from the osrsreboxed-db repository. It's a straightforward method for fetching specific data files on Linux systems. ```bash wget https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/12453.json ``` -------------------------------- ### Fetch and Parse JSON File using Python Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This Python script demonstrates how to fetch a JSON file from the osrsreboxed-db repository using the `urllib` library. It handles compatibility for both Python 2 and 3, decodes the response, parses it into a JSON object, and prints the content. This is useful for programmatic access to OSRS item data. ```python import json try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen url = ("https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/12453.json") response = urlopen(url) data = response.read().decode("utf-8") json_obj = json.loads(data) print(json_obj) ``` -------------------------------- ### Download Single JSON File using PowerShell (Windows) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This command-line snippet uses PowerShell's `Invoke-WebRequest` cmdlet to download a single JSON file from the osrsreboxed-db repository and save it to the current directory. This is the Windows equivalent for fetching specific data files. ```powershell Invoke-WebRequest -Uri "https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/12453.json" -OutFile "12453.json" ``` -------------------------------- ### Accessing Complete Datasets Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Fetch complete JSON files containing all items, monsters, or other categorized data. These are useful for bulk operations or offline analysis. ```APIDOC ## GET /[items-complete.json|monsters-complete.json|items-summary.json|items-json-slot/items-[slot].json|prayer-json/[prayer].json] ### Description Retrieves comprehensive JSON files for various categories of OSRS data, such as all items, all monsters, item summaries, items by slot, or specific prayers. ### Method GET ### Endpoint - `https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-complete.json` - `https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/monsters-complete.json` - `https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-summary.json` - `https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json-slot/items-[slot].json` (e.g., `items-cape.json`) - `https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/prayer-json/[prayer].json` (e.g., `protect-from-magic.json`) ### Parameters None for these endpoints, as they provide complete datasets. ### Request Example ```bash curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-complete.json ``` ### Response #### Success Response (200) - **[JSON Array/Object]** (object/array) - Contains a collection of item, monster, or other data objects based on the requested file. #### Response Example (items-complete.json) ```json [ { "id": 1, "name": "Cabbage", "description": "A common farm crop.", "type": "Default", "attack_bonus": 0, "strength_bonus": 0, "defence_bonus": 0, "magic_bonus": 0, "ranged_bonus": 0, "attack_speed": 0, "combat_level": 0, "weight": 0.001, "quest_item": false, "examine_message": "It's a cabbage.", "release_date": "2001-01-01", "wiki_url": "https://oldschool.runescape.wiki/w/Cabbage" }, // ... more items ] ``` ``` -------------------------------- ### Export Item Data to JSON using Python Source: https://context7.com/0xneffarion/osrsreboxed-db/llms.txt Demonstrates how to load all OSRS items, retrieve a specific item by ID, convert it to a JSON-serializable dictionary using `construct_json()`, and then pretty-print it. It also shows how to filter items (e.g., F2P weapons) and export them to a custom JSON format. ```python from osrsreboxed import items_api import json all_items = items_api.load() # Get item as dictionary whip = all_items.lookup_by_item_id(4151) item_dict = whip.construct_json() # Pretty print JSON print(json.dumps(item_dict, indent=2)) # Export single item to file # whip.export_json(pretty=True, export_path="/path/to/output/") # Export filtered items to custom format f2p_weapons = [] for item in all_items: if item.equipable_weapon and not item.members: f2p_weapons.append({ "id": item.id, "name": item.name, "attack_speed": item.weapon.attack_speed, "weapon_type": item.weapon.weapon_type }) print(f"\nF2P Weapons: {len(f2p_weapons)}") print(json.dumps(f2p_weapons[:3], indent=2)) ``` -------------------------------- ### Upgrade osrsreboxed Package Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Upgrades the osrsreboxed Python package to the latest version. This command is useful for ensuring you have the most up-to-date game data. ```bash pip install --upgrade osrsreboxed ``` -------------------------------- ### Download Single JSON File using curl (Linux) Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md This command-line snippet uses `curl` to download a single JSON file from the osrsreboxed-db repository. It's an alternative to `wget` for fetching specific data files on Linux systems. ```bash curl https://raw.githubusercontent.com/0xNeffarion/osrsreboxed-db/master/docs/items-json/12453.json ``` -------------------------------- ### Items API Source: https://github.com/0xneffarion/osrsreboxed-db/blob/master/README.md Access comprehensive item data, individual item details, icons, and summary information. ```APIDOC ## GET /items-complete.json ### Description Fetches a single JSON file containing the entire OSRSBox item database. Useful for retrieving data for all items at once. ### Method GET ### Endpoint /items-complete.json ### Parameters None ### Request Example None ### Response #### Success Response (200) - **items** (array) - An array of item objects, each containing detailed metadata. #### Response Example { "items": [ { "id": 1, "name": "Rusty sword", "examine": "A sword that has seen better days.", "members": false, "tradeable": true, "stackable": false, "noted": false, "equipment": { "slot": "weapon", "requirements": { "attack": 1 } }, "weight": 1.814375 } ] } ## GET /items-icons ### Description Provides a collection of PNG files for every item inventory icon in OSRS. Icons are named using their unique item ID number. ### Method GET ### Endpoint /items-icons/{itemId}.png ### Parameters #### Path Parameters - **itemId** (integer) - Required - The unique ID of the item whose icon is to be fetched. ### Request Example None ### Response #### Success Response (200) - **image/png** - The PNG image file for the specified item icon. ## GET /items-json ### Description Fetches individual JSON files for extensive item metadata, with each file named using the unique item ID number. Useful for retrieving data for a specific item when the ID is known. ### Method GET ### Endpoint /items-json/{itemId}.json ### Parameters #### Path Parameters - **itemId** (integer) - Required - The unique ID of the item whose metadata is to be fetched. ### Request Example None ### Response #### Success Response (200) - **item_metadata** (object) - An object containing detailed metadata for the specified item. #### Response Example { "id": 1, "name": "Rusty sword", "examine": "A sword that has seen better days.", "members": false, "tradeable": true, "stackable": false, "noted": false, "equipment": { "slot": "weapon", "requirements": { "attack": 1 } }, "weight": 1.814375 } ## GET /items-json-slot ### Description Fetches JSON files specific to equipment slots (e.g., head, legs). Useful for retrieving item data only for equipable items in specific slots. ### Method GET ### Endpoint /items-json-slot/{slotName}.json ### Parameters #### Path Parameters - **slotName** (string) - Required - The name of the equipment slot (e.g., 'head', 'legs', 'amulet'). ### Request Example None ### Response #### Success Response (200) - **items_in_slot** (array) - An array of item objects that belong to the specified equipment slot. #### Response Example { "items_in_slot": [ { "id": 1153, "name": "Bronze helm", "examine": "A basic bronze helmet.", "members": false, "tradeable": true, "stackable": false, "noted": false, "equipment": { "slot": "head", "requirements": { "defence": 1 } }, "weight": 0.90719995 } ] } ## GET /items-summary.json ### Description Fetches a JSON file containing only item names and their corresponding ID numbers. Useful for downloading a small file to quickly scan or process item data when only names and IDs are needed. ### Method GET ### Endpoint /items-summary.json ### Parameters None ### Request Example None ### Response #### Success Response (200) - **items** (array) - An array of objects, each containing an 'id' and 'name' for an item. #### Response Example { "items": [ { "id": 1, "name": "Rusty sword" }, { "id": 2, "name": "Shortbow" } ] } ``` -------------------------------- ### Loading the OSRS Monsters Database in Python Source: https://context7.com/0xneffarion/osrsreboxed-db/llms.txt Shows how to load the entire OSRS monster database using `monsters_api.load()`. The function returns an `AllMonsters` object that supports iteration and indexing. This allows for easy access to the total number of monsters and individual monster data. ```python from osrsreboxed import monsters_api # Load all monsters from the database all_monsters = monsters_api.load() # Print total number of monsters print(f"Total monsters: {len(all_monsters)}") # Iterate through monsters for monster in all_monsters: if monster.combat_level and monster.combat_level >= 300: print(f"{monster.id}: {monster.name} (Combat: {monster.combat_level})") ``` -------------------------------- ### Load OSRS Items Database (Python) Source: https://context7.com/0xneffarion/osrsreboxed-db/llms.txt Loads the entire OSRS item database into memory using the `osrsreboxed` Python package. Returns an `AllItems` object for iteration and lookup. Requires Python 3.6+. ```python from osrsreboxed import items_api # Load all items from the database all_items = items_api.load() # Print total number of items print(f"Total items: {len(all_items)}") # Iterate through items for item in all_items: print(f"{item.id:<6} {item.name}") ```