> For the complete documentation index, see [llms.txt](https://pondwadermc.gitbook.io/cubed-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pondwadermc.gitbook.io/cubed-api/documentation/api.md).

# API

The API methods are used to get information directly from the player servers API documented at https\://api.playerservers.com/

The API section is used to make API requests to the public CubedCraft/Player Servers API.

| **Methods (Click a method to view documentation for the method)**                      |
| -------------------------------------------------------------------------------------- |
| [.servers()](https://pondwadermc.gitbook.io/cubed-api/documentation/api/servers)       |
| [.server()](https://pondwadermc.gitbook.io/cubed-api/documentation/api/server)         |
| [.topboosted()](https://pondwadermc.gitbook.io/cubed-api/documentation/api/topboosted) |
| [.topvoted()](https://pondwadermc.gitbook.io/cubed-api/documentation/api/topvoted)     |

| **Properties (Click a property to view documentation for the method)**       |
| ---------------------------------------------------------------------------- |
| [.player](https://pondwadermc.gitbook.io/cubed-api/documentation/api/player) |

You can find the official CubedCraft API documentation at <https://api.playerservers.com/>. This will show example responses as well.

If you are making a request where you require the player's UUID you can use [.utils.playerUUID(playerName)](https://pondwadermc.gitbook.io/cubed-api/documentation/utils/playeruuid) to get a player's UUID.

Documentation: <https://pondwadermc.gitbook.io/cubed-api/documentation/utils/playeruuid>

Example:

```javascript
const CubedCraft = require('cubed-api');

const player = 'PLAYER_NAME';

CubedCraft.utils.playerUUID(player).then(uuid => {
  console.log(uuid);
})
.catch(error => {})
```

It will return  an error if the player is not an actual player so you should catch the error!
