# gog.product

**stable** **Standard**

GOG product details by numeric id.

`GET /v1/gog/product`

## What you get

One Gog record in Onekey's unified shape, in `data`. If the record does not exist you get a `404 not_found` and are not charged.

## What it costs

- **Standard · 1 credit** for a fresh fetch, charged only when it succeeds.
- **Free when served from cache (0.2 credit for a cached response over 100 KB).**
- **Free** if the request is invalid (never charged) or the source fails or reports not found (refunded).

## Parameters

| Name | Type | Required | Default | What it is | Constraints |
| --- | --- | --- | --- | --- | --- |
| `id` | string | yes | (required) | GOG product id | max 14 chars; must match `[0-9]{1,18}`; trimmed |

## Request

```bash
curl "https://api.onekey.dev/v1/gog/product?id=1207658924" \
  -H "x-api-key: YOUR_API_KEY"
```

```python
import requests

res = requests.get(
    "https://api.onekey.dev/v1/gog/product",
    params={"id": "1207658924"},
    headers={"x-api-key": "YOUR_API_KEY"},
)
body = res.json()

if body["success"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
```

```javascript
const params = new URLSearchParams({ id: "1207658924" });
const res = await fetch(`https://api.onekey.dev/v1/gog/product?${params}`, {
  headers: { "x-api-key": "YOUR_API_KEY" },
});
const body = await res.json();

if (body.success) console.log(body.data);
else console.error(body.error.code, body.error.message);
```

## Recorded response

A real Gog response, recorded and returned in Onekey's shape. Fields the platform does not provide are `null`.

```json
{
  "success": true,
  "data": {
    "entity": {
      "id": "1207658924",
      "name": "The Witcher: Enhanced Edition",
      "slug": "the_witcher",
      "url": "https://www.gog.com/game/the_witcher",
      "description": "The Witcher is a role-playing game set in a dark fantasy world where moral ambiguity reigns. Shattering the line between good and evil, the game emphasizes story and character development, while incorporating a tactically-deep, real-time combat system. Become The Witcher, Geralt of Rivia, and get caught in a web of intrigue woven by forces vying for control of the world. Make difficult decisions and live with the consequences in a game that will immerse you in an extraordinary tale like no other. KEY FEATURES GERALT OF RIVIA: A ONE-OF-A-KIND PROTAGONIST Take on the role of Geralt of Rivia: a charismatic swordmaster and professional monster slayer. Choose from over 250 special abilities, combat skills and magical powers to build a character best suited to your style of play. ORIGINAL FANTASY WORLD DRAWN FROM LITERATURE Enter a harsh fantasy world inspired by the writings of renowned Polish author Andrzej Sapkowski, where nothing is truly black or white, right or wrong. NON-LINEAR STORYLINE Immerse yourself in an epic narrative full of turns, twists and ambiguous moral decisions which have real impact on the storyline. Accomplish quests in a variety of ways and see how the narrative culminates in one of three different endings depending on your actions. STUNNING TACTICAL ACTION Engage in elaborate, yet intuitive real-time combat based on real medieval sword-fighting techniques. Battle using six combat styles, dozens of potions, complex alchemy system, modifiable weapons and powerful magic which all add tactical depth to the fluid real-time experience. Motion capture performed by medieval fighting experts at Frankfurt's renowned Metric Minds studio, resulting in 600 spectacular and authentic in-game combat animations. ABOUT THE WITCHER: ENHANCED EDITION The Witcher: Enhanced Edition takes all of the acclaimed gameplay that garnered the original game more than 90 industry awards and introduces a number of gameplay and technical improvements. Superior dialogue and cutscenes: Over 5000 rewritten and re-recorded lines of dialogue in English, completely redone German language version, as well as over 200 new gesture animations create a more consistent experience and make characters behave more believably in dialogue and cutscenes. Enhanced inventory: A separate sack for alchemy ingredients, as well as a simple sort-and-stack function streamline item organization and usage. Technical improvements: Numerous technical enhancements feature greatly reduced loading times, improved stability, combat responsiveness, faster inventory loading, an option to turn auto-saving on or off, and more. Character differentiation system: The system randomizes the appearance of dozens of in-game models in order to add more variety to monsters and NPCs. The Witcher Enhanced Edition comes with these bonus items : An interactive comic book D'jinni Adventure Editor Two new adventures offering 5 hours of gameplay Official Soundtrack “Music Inspired by The Witcher” album “Making of” videos Official Game Guide Two maps of The Witcher's world",
      "type": "game"
    },
    "content": {
      "createdAt": "2011-05-09T21:00:00Z"
    },
    "media": {
      "thumbnailUrl": null
    }
  },
  "metadata": {
    "platform": "gog",
    "endpoint": "product",
    "cached": false,
    "stale": false,
    "age_s": 0,
    "fetched_at": "2026-01-01T12:00:00+00:00",
    "credits_charged": 1,
    "request_id": "7f3a9c2e5b1d4c8fa2e6d0b9c4f18e37"
  },
  "error": null
}
```

## Field mapping

How this endpoint's source fields become Onekey's [unified schema](https://onekey.dev/docs/schema.md). Fields the source lacks come back as `null`.

| Source path | Onekey field | Transform |
| --- | --- | --- |
| `id` | `entity.id` | `toString` |
| `title` | `entity.name` | - |
| `slug` | `entity.slug` | - |
| `links.product_card` | `entity.url` | `safeUrl` |
| `description.lead` | `entity.description` | `stripHtml` |
| `release_date` | `content.createdAt` | `toIsoDate` |
| `game_type` | `entity.type` | - |
| `images.logo2x` | `media.thumbnailUrl` | `safeUrl` |

## Caching and freshness

- Fresh for about 30 minutes. Repeat calls in that window are served from cache and are free.
- Between 30 minutes and 6 hours the cached copy is still served instantly and marked `stale: true` while Onekey refreshes it in the background.
- If the source is down when a refresh is needed, the last copy can be served for up to 1 day more (marked stale).
- A "not found" is remembered for 5 minutes and is free.
- The cache is shared across all customers, which is what keeps repeat calls cheap.

## What can go wrong

| Status | Code | What to do |
| --- | --- | --- |
| 401 | `unauthorized` | Check the `x-api-key` header. |
| 402 | `insufficient_credits` | [Add credits](https://onekey.dev/pricing); your balance must cover the price. |
| 404 | `not_found` | That record does not exist. Free; do not retry. |
| 422 | `invalid_params` | Fix the parameters using the table above. Free. |
| 429 | `rate_limited` | Wait `Retry-After` seconds, then retry. |
| 502 | `upstream_error` | The source failed. Refunded; retry with backoff. |

See [Errors](https://onekey.dev/docs/errors.md) for the full list and retry guidance.

Status: stable (verified against the live source).
