# Thrones API API

> Returns Game of Thrones characters with their titles and houses, house counts, and text search over names, titles and houses.

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

All characters of the series with their titles and houses.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `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: `family` (string), `firstName` (string), `fullName` (string), `id` (string), `imageUrl` (string), `lastName` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/thronesapi/characters" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/thronesapi/character

One character of the series by id.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | Character id, such as 1. (e.g. 1) |
| `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: `family` (string), `firstName` (string), `fullName` (string), `id` (string), `imageUrl` (string), `lastName` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/thronesapi/character?id=1" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/thronesapi/houses

The houses of the series, with how many listed characters each has, largest first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `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: `members` (integer (int64)), `name` (string)

```bash
curl "https://api.hoshime.com/v1/thronesapi/houses" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/thronesapi/search

Characters whose full name, title or house contains a text.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Text to look for, such as Arya or Stark. Case does not matter. (e.g. Arya) |
| `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: `family` (string), `firstName` (string), `fullName` (string), `id` (string), `imageUrl` (string), `lastName` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/thronesapi/search?query=Arya" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
