# GOG API

> Returns GOG game catalogue data: search, product details, popular and trending lists, and store prices by country.

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

Search the GOG catalogue of games by text. Pages with cursor, the page number.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Text to search for, such as witcher. (e.g. witcher) |
| `limit` | integer | no | Items per page, 1 to 48. (default 10; e.g. 2) |
| `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: `description` (string), `genres` (Term[]), `genres[].name` (string), `id` (string), `images` (Image[]), `images[].height` (any), `images[].url` (string), `images[].width` (any), `price` (Money), `price.amount` (string), `price.currency` (string), `rating` (number (double)), `releaseDate` (string), `reviewCount` (integer (int64)), `seller` (string), `slug` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/gog/search?query=witcher&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/gog/product

One GOG product by its numeric id: title, release date, platforms and languages.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | GOG product id, such as 1207658924. (e.g. 1207658924) |
| `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: `id` (string), `languages` (Term[]), `languages[].name` (string), `linux` (boolean), `mac` (boolean), `releasedAt` (string), `slug` (string), `storeUrl` (string), `title` (string), `type` (string), `windows` (boolean)

```bash
curl "https://api.hoshime.com/v1/gog/product?id=1207658924" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/gog/browse

Games of the GOG store front sorted by popularity or rating, 48 per page; pages with cursor.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `sort` | string | no | Sort order of the list. (one of popularity, rating; default popularity; e.g. 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: `description` (string), `developer` (string), `discountPercent` (integer (int64)), `genres` (Term[]), `genres[].name` (string), `id` (string), `images` (Image[]), `images[].height` (any), `images[].url` (string), `images[].width` (any), `price` (Money), `price.amount` (string), `price.currency` (string), `publisher` (string), `rating` (number (double)), `reviewCount` (integer (int64)), `seller` (string), `slug` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/gog/browse?sort=popularity" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/gog/trending

Games ranked by trending on GOG, up to 48 per page; pages with cursor.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 48. (default 24; e.g. 3) |
| `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: `description` (string), `genres` (Term[]), `genres[].name` (string), `id` (string), `images` (Image[]), `images[].height` (any), `images[].url` (string), `images[].width` (any), `price` (Money), `price.amount` (string), `price.currency` (string), `rating` (number (double)), `releaseDate` (string), `reviewCount` (integer (int64)), `seller` (string), `slug` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/gog/trending?limit=3" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/gog/productsByIds

Up to 20 GOG products by id in one call, with their descriptions.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `ids` | string | yes | Comma-separated GOG product ids, 20 at most. (e.g. 1207658924,1207659107) |
| `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: `id` (string), `languages` (Term[]), `languages[].name` (string), `linux` (boolean), `mac` (boolean), `releasedAt` (string), `slug` (string), `storeUrl` (string), `title` (string), `type` (string), `windows` (boolean)

```bash
curl "https://api.hoshime.com/v1/gog/productsByIds?ids=1207658924%2C1207659107" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/gog/prices

The store prices of one GOG product in a country, in its currency.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | GOG product id, such as 1207658924. (e.g. 1207658924) |
| `countryCode` | string | no | Two-letter country code that sets the prices, such as US or ID. (default US) |
| `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: `basePrice` (string), `bonusWalletFunds` (string), `currency` (string), `finalPrice` (string)

```bash
curl "https://api.hoshime.com/v1/gog/prices?id=1207658924" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/gog/dlcs

The DLC and add-on products of one GOG game, with their titles, release dates and platforms.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | integer | yes | GOG id of the game, such as 1446213994. (e.g. 1446213994) |
| `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: `id` (string), `languages` (Term[]), `languages[].name` (string), `linux` (boolean), `mac` (boolean), `releasedAt` (string), `slug` (string), `storeUrl` (string), `title` (string), `type` (string), `windows` (boolean)

```bash
curl "https://api.hoshime.com/v1/gog/dlcs?id=1446213994" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
