# Mojang API

> Returns Minecraft player uuids, names, skins and capes looked up by username or uuid.

Category: Sports & Gaming. Region: global. 4 endpoints at `https://api.hoshime.com/v1/mojang/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/mojang
## GET /v1/mojang/profile

A Minecraft player's uuid and exact name, looked up by the username.

Scope: `social:read` · Units: 1 · Cached: 360 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Minecraft Java Edition username, such as Notch. (e.g. Notch) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatarUrl` (string), `bio` (string), `capeUrl` (string), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `id` (string), `name` (string), `postCount` (integer (int64)), `skinModel` (string), `skinUrl` (string), `url` (string), `username` (string), `uuid` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/mojang/profile?username=Notch" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mojang/profileByUuid

A Minecraft player's name, skin and cape, looked up by uuid.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `uuid` | string | yes | Player uuid, with or without dashes. (e.g. 069a79f444e94726a5befca90e38aaf5) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatarUrl` (string), `bio` (string), `capeUrl` (string), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `id` (string), `name` (string), `postCount` (integer (int64)), `skinModel` (string), `skinUrl` (string), `url` (string), `username` (string), `uuid` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/mojang/profileByUuid?uuid=069a79f444e94726a5befca90e38aaf5" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mojang/profileAt

The uuid a username belonged to at a moment, given in Unix milliseconds, for names that were changed or taken.

Scope: `social:read` · Units: 1 · Cached: 1440 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Minecraft Java Edition username, such as Notch. (e.g. Notch) |
| `at` | integer | yes | Moment in Unix milliseconds, such as 1500000000000. (e.g. 1500000000000) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatarUrl` (string), `bio` (string), `capeUrl` (string), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `id` (string), `name` (string), `postCount` (integer (int64)), `skinModel` (string), `skinUrl` (string), `url` (string), `username` (string), `uuid` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/mojang/profileAt?username=Notch&at=1500000000000" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mojang/profilesByNames

Up to ten Minecraft usernames looked up in one call; unknown names are left out.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `usernames` | string | yes | Comma-separated Minecraft usernames, ten at most. (e.g. Notch,jeb_) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatarUrl` (string), `bio` (string), `capeUrl` (string), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `id` (string), `name` (string), `postCount` (integer (int64)), `skinModel` (string), `skinUrl` (string), `url` (string), `username` (string), `uuid` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/mojang/profilesByNames?usernames=Notch%2Cjeb_" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
