- 1. Introduction
- 2. Games
- 3. Players
- 4. Maps
- 5. Survivors
- 6. Achievements
- 7. Message of the day
- 8. Error handling
Accessing the CreepTD data API
CreepTD is open in design and allows you as a developer to access lots of publicly available data directly via our API.
1. Introduction
The CreepTD API provides you with a variety of possibilities to easily access player and game data. So, if you have an idea for an interesting statistics, league or similar application, this section is for you.
The API is a common subject to changes, so that I will just note things that need an explaination. For everything else, the sample link should provide you with an idea of the generated data.
Base path | http://www.creeptd.com/api |
---|---|
Data format | JSON |
2. Games
Base path | http://www.creeptd.com/api/games |
---|---|
Data format | JSON |
- Accessing a specific game
- Example: http://www.creeptd.com/api/games?key=mxh8f3fbmbqx0po54wtgf485cn6qzg3d
- Accessing a player's recent games
- Example: http://www.creeptd.com/api/games?player=EasyX
- Accessing recent games on a specific map
- Example: http://www.creeptd.com/api/games?map=SPEEDVECTOR
3. Players
Base path | http://www.creeptd.com/api/players |
---|---|
Data format | JSON |
- Accessing a specific player
- Example: http://www.creeptd.com/api/players?name=EasyX
4. Maps
Base path | http://www.creeptd.com/api/maps |
---|---|
Data format | JSON |
- Accessing a specific map
- Example: http://www.creeptd.com/api/maps?name=SPEEDVECTOR
- Accessing a map listing
- All maps: http://www.creeptd.com/api/maps?list=all
- Tournament maps: http://www.creeptd.com/api/maps?list=tournament
- Favorite maps: http://www.creeptd.com/api/maps?list=favorite&player=dcode
5. Survivors
Base path | http://www.creeptd.com/api/survivors |
---|---|
Data format | JSON |
- Accessing the top highscore on a specific map
- Example: http://www.creeptd.com/api/survivors?highscore=SPEEDVECTOR&scenario=TBCH
- Accessing a list of highscores on a specific map
- Example: http://www.creeptd.com/api/survivors?map=SPEEDVECTOR&scenario=TBCH
- Accessing a player's highscores
- Example: http://www.creeptd.com/api/survivors?name=EasyX
6. Achievements
Base path | http://www.creeptd.com/api/achievements |
---|---|
Data format | JSON |
- Accessing a player's achievements
- Example: http://www.creeptd.com/api/achievements?player=EasyX
7. Message of the day
Base path | http://www.creeptd.com/api/motd |
---|---|
Data format | JSON |
- Accessing the message of the day shown on login
- Example: http://www.creeptd.com/api/motd
8. Error handling
- If parameters are missing, invalid or similar, the API returns an error
- Example: http://www.creeptd.com/api/games?invalidparameter=true
Hint: Store API results in cache or a database for as long as possible (games for example never ever change) because the API may throttle requests depending on how often and how much data is requested.