# Genius API

> Returns songs, artists, albums, lyrics and annotated lines from Genius, including song details and an artist's song list.

Category: Music & Audio. Region: global. 5 endpoints at `https://api.hoshime.com/v1/genius/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/genius
## GET /v1/genius/search

Songs, artists and albums that match a search. The answer has no paging.

Scope: `social:read` · Units: 5 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Search terms. (e.g. bohemian rhapsody) |
| `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: `artistName` (string), `fullTitle` (string), `id` (string), `title` (string), `type` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/genius/search?query=bohemian+rhapsody" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/genius/song

Title, artist, album, release date, description and page views of one song.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | Song id, from search or from the song URL. (e.g. 5049949) |
| `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: `album` (string), `annotationCount` (integer (int64)), `artistId` (string), `artistName` (string), `description` (string), `fullTitle` (string), `id` (string), `imageUrl` (string), `language` (string), `pageviews` (integer (int64)), `releaseDate` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/genius/song?id=5049949" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/genius/artist

Name, followers, verification and description of one artist.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | Artist id, from search or from the artist URL. (e.g. 3043085) |
| `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), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `id` (string), `instagram` (string), `name` (string), `postCount` (integer (int64)), `twitter` (string), `url` (string), `username` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/genius/artist?id=3043085" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/genius/artistSongs

Songs of one artist in a sort order, 20 per page.

Scope: `social:read` · Units: 5 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | Artist id. (e.g. 3043085) |
| `sort` | string | no | Sort order. (one of popularity, title, release_date; default popularity) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `artistName` (string), `fullTitle` (string), `id` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/genius/artistSongs?id=3043085" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/genius/referents

Annotated lines of one song, each with its annotations, 20 per page.

Scope: `social:read` · Units: 5 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `songId` | integer | yes | Song id. (e.g. 5049949) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `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: `annotations` (Annotation[]), `annotations[].body` (string), `annotations[].id` (string), `annotations[].url` (string), `annotations[].verified` (boolean), `annotations[].votesTotal` (integer (int64)), `classification` (string), `fragment` (string), `id` (string)

```bash
curl "https://api.hoshime.com/v1/genius/referents?songId=5049949" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
