JSON File Format
42 |Get extensive item, equipment, weapon, monster and prayer data in the popular JSON file format. Also get icons in base64 format.
43 |The osrsbox-api project is an open, free, complete and up-to-date RESTful API for Old School RuneScape (OSRS) items, monsters and prayers. The API is built using the structured and verified data from the popular osrsbox-db project which is a complete and up-to-date database of Old School Runescape (OSRS) items, monsters and prayers.
30 |This API is a recent release, using data from the osrsbox-db project - which has been in active development since 2017. This feature-packed API is the newest addition to the services provided. Get reliable, updated, and accurate data for OSRS projects with the following headline features.
35 |Get extensive item, equipment, weapon, monster and prayer data in the popular JSON file format. Also get icons in base64 format.
43 |Internet accessible, web programming friendly API for you OSRS project that needs item/monster data and icons.
52 |Write detailed, rich queries to filter, sort, project and group data that is strictly validated for items, monsters and prayers.
61 |Open source project with code on GitHub. Completely free to use, but feel free to donate to help with server costs.
70 |Serious-ish, security concious, solo (full-stack!) developer, with a part-time OSRS addiction, and upsettingly... a real job as well.
79 |Sadly, this project has nothing to do with kiwi birds that have lasers for eyes. But it would be a lot cooler if it did!
88 |APIs are comprised of endpoints that you can query to get specific data that you are interested in. Simply put, you can do things like ask the /items
endpoint to give you data (e.g.,name, id, members status, equipment stats) about the Abyssal whip. This API provides the following endpoints...
For those who have not used an API before, the process can be a little daunting. This section presents some basic examples, and a general quickstart tutorial to the osrsbox-api project. The key to using this API is to construct queries. So the quick start includes a summary of some interesting and useful queries. Just copy are paste some of the API URL examples into your browser to see the results. You could also use the curl
command, or write a simple script in Bash, Python or PowerShell.
To help with constructing queries it is recommended that you review the properties available for items, equipment and weapons, for monsters, and for prayers. The links provide tables of available properties and give an idea of what parameters are available to use in queries for each API endpoint. Additionally, the tables display data types of each property.
178 |Get the first 25 items. Get a list of items a page at a time. Each page/request will have 25 items. By default the list of items starts from the lowest item ID number.
179 |https://api.osrsbox.com/items
180 | Get the second 25 items. Get the next 25 items available in the API.
181 |https://api.osrsbox.com/items?page=2
182 | Get the Abyssal whip. You can find a specifc item using the where
statement followed by a query. In this query, we add in a name
search and also filter duplicate items using the duplicate
property.
https://api.osrsbox.com/items?where={ "name": "Abyssal whip", "duplicate": false }
184 | Get the Abyssal demon. You can query monsters just like items, but they have different properties. In this query, we add in a name
search and also filter duplicate monsters using the duplicate
property.
https://api.osrsbox.com/monsters?where={ "name": "Abyssal demon", "duplicate": false }
186 | Get weapons with negative prayer bonus. You can query the equipment and weapon endpoints just like items, and they have the same properties. In this query, we search for weapons that have a prayer
bonus of less than 0, so a negative prayer bonus. Again, we filter duplicates using the duplicate
property.
https://api.osrsbox.com/weapons?where={ "equipment.prayer": { "$lt": 0 }, "duplicate": false }
188 | Get weapons with negative prayer bonus. Same query written a different way. The API supports native MongoDB queries - which we have already seen. We can also use native Python syntax, as displayed in the following example.
189 |https://api.osrsbox.com/weapons?where=equipment.prayer<0
190 | Projection example to find an items ID number. You may have noticed that we have been getting long, JSON formatted data back from the API. What happens if you only want a specific property? The following example finds the Bandos chestplate and returns only the id
property.
https://api.osrsbox.com/equipment?where={ "name": "Bandos chestplate" }&projection={ "id": 1 }
192 | Element match example to find a monster that drops a specific item. A useful search is to perform a lookup on the monsters API endpoint and search for monsters that drop a specific item. The following example finds monsters that drop the Smoke battlestaff, which has the item ID of 11998
The key factor to this search, is the $elemMatch
query which searches a list (array), in this case the drops
list of a monster.
https://api.osrsbox.com/monsters?where={ "drops": { "$elemMatch": { "id":11998 } } }
194 | Advanced query for finding equipment with specifc stats. A useful search is to perform a lookup on the items API endpoint and search for equipment with specific stats. The following example finds items that have a ranged_strength
property of over 80, which are two-handed.
https://api.osrsbox.com/weapons?where={ "equipment.slot": "2h", "duplicate": false, "equipment.ranged_strength": { "$gte": 80 } }
196 | This API comes with additional documentation from a variety of sources. The project is completely open source, and the Docker build environment is available on GitHub. Additionally, the item, monster and prayer data is also openly available on GitHub. To investigate the API endpoints the Swagger specification, and SwaggerUI are especially useful.
201 |This project is completely open source, and freely accessible. This means that no revenue is generated from membership. There is also no advertising on the API website. To help with the continual development of this project, a donation would be grately appreciated. If you feel like contributing you can buy me a beer or help with the server costs.
254 | 255 |