---
title: "Price Badge"
method: GET
path: "/api/badge/{slug}.svg"
tags: ["outbound"]
---

# Price Badge

`GET /api/badge/{slug}.svg`

## Request

- Base URL: `https://api.getcheapgames.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getcheapgames.com/api/badge/{slug}.svg`
- Auth: none declared

A game's cheapest price as an image, for other sites to embed.

The site's backlinks: a blog, a stream overlay or a forum post shows it
linked to the game's page here (the snippet is on every product page), and
the price stays true because it is drawn when fetched — the cheapest key
that activates in `country`, the same offer `/api/out/game/…` sends a buyer
to. Only text we escaped goes in, and an `<img>` runs no script besides.

In the market's language (`lang=` overrides it, any of the site's 25) and
money as that market writes it. "−X% vs Steam" only where Steam sells the
game in that currency for more. `theme=dark|light`, `size=sm|md`. An
unknown game or one with no key to sell draws a neutral "Compare key
prices" badge, never a made-up price, rather than a broken image on
somebody else's page.

## Path parameters

- `slug` string, required

## Query parameters

- `country` string, nullable
- `lang` string, nullable
- `theme` string, nullable
- `size` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getcheapgames/apis/getcheapgames-api.md) · [All operations](https://skmtc.dev/getcheapgames/apis/getcheapgames-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getcheapgames/apis/getcheapgames-api/revisions/57333a690301?raw)
