# Minneapolis Institute of Art API

> Returns artworks from the Minneapolis Institute of Art collection by search or id, a random artwork, and related people.

Category: Religion & Culture. Region: US. 4 endpoints at `https://api.hoshime.com/v1/artsmia/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/artsmia
## GET /v1/artsmia/search

Artworks of the collection that match words, such as a title, an artist or a medium, 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words to search for, such as monet. (e.g. monet) |
| `limit` | integer | no | Artworks per page, from 1 to 100. (default 20) |
| `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: `accessionNumber` (string), `artist` (string), `classification` (string), `creditLine` (string), `dated` (string), `department` (string), `dimension` (string), `hasImage` (boolean), `highlight` (boolean), `id` (string), `medium` (string), `nationality` (string), `title` (string), `url` (string)

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

## GET /v1/artsmia/object

One artwork of the collection by its object id: title, artist, date, medium and credit line.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | Object id, such as 10436. (e.g. 10436) |
| `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: `accessionNumber` (string), `artist` (string), `classification` (string), `creditLine` (string), `dated` (string), `department` (string), `dimension` (string), `hasImage` (boolean), `highlight` (boolean), `id` (string), `medium` (string), `nationality` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/artsmia/object?id=10436" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/artsmia/randomArt

A random artwork of the collection. Each call returns a new one, so it is not cached.

Scope: `social:read` · Units: 1

| 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: `accessionNumber` (string), `artist` (string), `classification` (string), `creditLine` (string), `dated` (string), `department` (string), `dimension` (string), `hasImage` (boolean), `highlight` (boolean), `id` (string), `medium` (string), `nationality` (string), `title` (string), `url` (string)

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

## GET /v1/artsmia/person

A person or organization related to the collection, such as an artist, with nationality and dates.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | Person id, such as 4419. (e.g. 4419) |
| `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: `beginDate` (integer (int64)), `description` (string), `endDate` (integer (int64)), `id` (string), `name` (string), `nationality` (string)

```bash
curl "https://api.hoshime.com/v1/artsmia/person?id=4419" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
