# Openverse API

> Returns openly licensed images and audio matching a search, single item details, related images and image sources.

Category: Search & Knowledge. Region: global. 8 endpoints at `https://api.hoshime.com/v1/openverse/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/openverse
## GET /v1/openverse/images

Openly licensed images that match a search, 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Search terms. (e.g. cat) |
| `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: `creator` (string), `creatorUrl` (string), `height` (integer (int64)), `id` (string), `license` (string), `licenseUrl` (string), `provider` (string), `source` (string), `sourceUrl` (string), `tags` (string[]), `thumbnail` (string), `title` (string), `url` (string), `width` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/openverse/images?query=cat" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openverse/audio

Openly licensed audio tracks that match a search, 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Search terms. (e.g. piano) |
| `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: `creator` (string), `creatorUrl` (string), `durationMs` (integer (int64)), `id` (string), `license` (string), `licenseUrl` (string), `provider` (string), `source` (string), `sourceUrl` (string), `tags` (string[]), `thumbnail` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/openverse/audio?query=piano" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openverse/image

One image with its license, creator, source page and tags.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Openverse image id, such as 1c5442f6-6bb6-4ab7-b603-f598e7579dd2. (e.g. 1c5442f6-6bb6-4ab7-b603-f598e7579dd2) |
| `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: `creator` (string), `creatorUrl` (string), `height` (integer (int64)), `id` (string), `license` (string), `licenseUrl` (string), `provider` (string), `source` (string), `sourceUrl` (string), `tags` (string[]), `thumbnail` (string), `title` (string), `url` (string), `width` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/openverse/image?id=1c5442f6-6bb6-4ab7-b603-f598e7579dd2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openverse/relatedImages

Images that Openverse finds similar to one image, 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Openverse image id, such as 1c5442f6-6bb6-4ab7-b603-f598e7579dd2. (e.g. 1c5442f6-6bb6-4ab7-b603-f598e7579dd2) |
| `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: `creator` (string), `creatorUrl` (string), `height` (integer (int64)), `id` (string), `license` (string), `licenseUrl` (string), `provider` (string), `source` (string), `sourceUrl` (string), `tags` (string[]), `thumbnail` (string), `title` (string), `url` (string), `width` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/openverse/relatedImages?id=1c5442f6-6bb6-4ab7-b603-f598e7579dd2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openverse/imageSources

The sources of openly licensed images that Openverse indexes, with how many images each has.

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: `displayName` (string), `mediaCount` (integer (int64)), `name` (string), `url` (string)

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

## GET /v1/openverse/audioItem

One audio track with its license, creator, duration and tags.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Openverse audio id, such as 2c51e4eb-dbe7-468c-ba6c-d1c85a1b71ae. (e.g. 2c51e4eb-dbe7-468c-ba6c-d1c85a1b71ae) |
| `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: `creator` (string), `creatorUrl` (string), `durationMs` (integer (int64)), `id` (string), `license` (string), `licenseUrl` (string), `provider` (string), `source` (string), `sourceUrl` (string), `tags` (string[]), `thumbnail` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/openverse/audioItem?id=2c51e4eb-dbe7-468c-ba6c-d1c85a1b71ae" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openverse/relatedAudio

Audio tracks that Openverse finds similar to one track, 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Openverse audio id, such as 2c51e4eb-dbe7-468c-ba6c-d1c85a1b71ae. (e.g. 2c51e4eb-dbe7-468c-ba6c-d1c85a1b71ae) |
| `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: `creator` (string), `creatorUrl` (string), `durationMs` (integer (int64)), `id` (string), `license` (string), `licenseUrl` (string), `provider` (string), `source` (string), `sourceUrl` (string), `tags` (string[]), `thumbnail` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/openverse/relatedAudio?id=2c51e4eb-dbe7-468c-ba6c-d1c85a1b71ae" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openverse/audioSources

The sources of openly licensed audio that Openverse indexes, with how many tracks each has.

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: `displayName` (string), `mediaCount` (integer (int64)), `name` (string), `url` (string)

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