Article History

74% puke7

BotB API v1


  1. Basic Syntax
  2. Commands
  3. Examples
  4. Response Formats
Battle of the Bits offers a fully public API. Please do not abuse; request throttling and/or api access tokens might be implemented in the future. Please enjoy.

Basic Syntax{object_type}/{command}(/{param0}(/{param1}(/{param2(..))))

Current object types : botbr, entry, battle, format, lyceum_article




Lists can be sorted by property values by using the GET method
The desc variable is optional; defaults to ascending.

Filters can be applied using the GET method.
Filters are defined by pairing a key and value with ~. Multiple filters can be defined by using ^ for separation.
(example: /api/v1/botbr/list/?filters=level~17^class~chipist)
*this may be deprecated in future versions

Conditionals can be applied using the POST method. The API expects an array of objects in JSON format. These are much more versatile than the Filters using GET.

"conditions": [
{ "property": "title", "operator": "LIKE", "operand": "%ass%" },
{ "property": "score_favs", "operator": ">", "operand": "40" },
{ "property": "format_token", "operator": "like", "operand": "%mod%" },
{ "property": "yt", "operator": "is", "operand": "NULL" }

Pagination is optional. The page_number is zero based and the default page_length is 25 objects. The maximum number of objects that can be pulled in a single call is 250.


Here are some example-requests to make it more clear:

Getting all currently ongoing battles:
Search for a battle by name:
Search for a lyceum article by name:
Get a BotBr by name:
Get a random entry:
Get an entry by id:
Get the top 5 BotBr:
Get the top 5 BotBr filtered by class Chipist:
Get all (or the first 250) entries of a battle:

Response Formats

The BotB API v1 default response format is a JSON object. XML is also available by either setting the format via GET ?format=xml or adding the .xml extension to the URI.