# CheapShark API

> Returns PC game deals, game price histories, searchable games and the list of stores that CheapShark compares.

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

Current game deals, 60 per page, best deal rating first; filter by title or store.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Game title to search for. Omit it for the best current deals. |
| `storeID` | integer | no | Only deals of this CheapShark store id, such as 1 for Steam. |
| `upperPrice` | integer | no | Only deals at or under this price in USD. |
| `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: `dealId` (string), `dealRating` (number (double)), `gameId` (string), `metacriticScore` (integer (int64)), `price` (Money), `price.amount` (string), `price.currency` (string), `releaseDate` (string), `retailPrice` (Money), `retailPrice.amount` (string), `retailPrice.currency` (string), `savings` (number (double)), `steamAppId` (string), `steamRatingCount` (integer (int64)), `steamRatingPercent` (integer (int64)), `steamRatingText` (string), `storeId` (string), `thumb` (string), `title` (string), `url` (string)

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

## GET /v1/cheapshark/game

One game with its cheapest price ever and its current deals in every store.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | CheapShark game id, as the deals endpoint prints it in gameId. (e.g. 612) |
| `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: `cheapestEver` (Cheapest | null), `cheapestEver.price` (Money), `cheapestEver.seenAt` (string), `deals` (GameDeal[]), `deals[].dealId` (string), `deals[].price` (Money), `deals[].retailPrice` (Money), `deals[].savings` (number (double)), `deals[].storeId` (string), `deals[].url` (string), `id` (string), `steamAppId` (string), `thumb` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/cheapshark/game?id=612" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/cheapshark/stores

The stores CheapShark compares, with the storeID to filter deals by.

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: `isActive` (boolean), `logo` (string), `name` (string), `storeId` (string)

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

## GET /v1/cheapshark/gameSearch

Games whose title contains the query, with the cheapest current deal of each.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | string | yes | Title fragment to search for, at least 3 characters. (e.g. batman) |
| `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: `cheapest` (Money), `cheapest.amount` (string), `cheapest.currency` (string), `cheapestDealUrl` (string), `gameId` (string), `internalName` (string), `steamAppId` (string), `thumb` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/cheapshark/gameSearch?title=batman" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/cheapshark/gamesByIds

Up to 25 games by CheapShark game id, with their cheapest price ever and current deals.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `ids` | string | yes | Comma-separated CheapShark game ids, 25 at most, such as 612,613. (e.g. 612,613) |
| `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: `cheapestEver` (Cheapest | null), `cheapestEver.price` (Money), `cheapestEver.seenAt` (string), `deals` (GameDeal[]), `deals[].dealId` (string), `deals[].price` (Money), `deals[].retailPrice` (Money), `deals[].savings` (number (double)), `deals[].storeId` (string), `deals[].url` (string), `id` (string), `steamAppId` (string), `thumb` (string), `title` (string)

```bash
curl "https://api.hoshime.com/v1/cheapshark/gamesByIds?ids=612%2C613" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
