# List published games

`GET /v1/public/store/games`

URL: https://docs.spacerun.co/docs/platform/reference/public-store/listPublicStoreGames

- **Operation ID:** `listPublicStoreGames`
- **Tags:** Public store
- **Base URL:** `http://localhost:8787`

Public catalog of all published games with genre/company ids and art URLs, ordered by title. Not paginated. Runs as the anonymous role so row security limits it to published games. Cached for 60s (`Cache-Control: public, max-age=60`).

**Workflow:** [Integration guide](https://docs.spacerun.co/docs/platform/guides/support-and-public-api).

**Authentication:** none (public).

## Authentication

- **Auth:** none (public endpoint, no token required).

## Responses

### 200

Published games.

- Header `x-request-id`: Request identifier; quote it when reporting an error.
- Header `Cache-Control`: Public cache lifetime. Example: `"public, max-age=60"`.
Content type: `application/json`

Schema: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `(object (StorePublicGame))[]` | yes | - |
| `data[].id` | `integer` | yes | - |
| `data[].slug` | `string` | yes | - |
| `data[].title` | `string` | yes | - |
| `data[].summary` | `string \| null` | yes | - |
| `data[].description` | `string \| null` | yes | - |
| `data[].game_type` | `string` | yes | One of: `"app"`, `"game"`, `"launcher"` |
| `data[].status` | `string` | yes | One of: `"draft"`, `"published"`, `"hidden"` |
| `data[].release_date` | `string \| null` | yes | Date, YYYY-MM-DD. |
| `data[].controller_support` | `string` | yes | One of: `"none"`, `"partial"`, `"full"` |
| `data[].website` | `string \| null` | yes | - |
| `data[].required_age` | `integer` | yes | - |
| `data[].legal_notice` | `string \| null` | yes | - |
| `data[].license_required` | `boolean` | yes | - |
| `data[].content_description` | `string \| null` | yes | - |
| `data[].metadata` | `object` | yes | - |
| `data[].created_at` | `string` | yes | ISO 8601 timestamp. |
| `data[].updated_at` | `string` | yes | ISO 8601 timestamp. |
| `data[].genre_ids` | `integer[]` | yes | - |
| `data[].developer_ids` | `integer[]` | yes | - |
| `data[].publisher_ids` | `integer[]` | yes | - |
| `data[].media` | `(object (StoreGameMedia))[]` | yes | - |
| `data[].media[].id` | `string<uuid>` | yes | - |
| `data[].media[].kind` | `string` | yes | One of: `"header"`, `"main_capsule"`, `"small_capsule"`, `"hero_capsule"`, `"library_capsule"`, `"library_hero"` |
| `data[].media[].width` | `integer \| null` | yes | - |
| `data[].media[].height` | `integer \| null` | yes | - |
| `data[].media[].updated_at` | `string` | yes | ISO 8601 timestamp. |
| `data[].media[].url` | `string` | yes | Public asset URL (cache-busted with `?t=`). |
| `data[].screenshots` | `(object (StoreGameScreenshot))[]` | yes | - |
| `data[].screenshots[].id` | `string<uuid>` | yes | - |
| `data[].screenshots[].width` | `integer \| null` | yes | - |
| `data[].screenshots[].height` | `integer \| null` | yes | - |
| `data[].screenshots[].updated_at` | `string` | yes | ISO 8601 timestamp. |
| `data[].screenshots[].url` | `string` | yes | - |
| `data[].screenshots[].thumbnail_url` | `string` | yes | - |

## Errors

### 500

Unexpected server error (`internal`). No details are returned.

- Header `x-request-id`: Request identifier; quote it when reporting an error.
Content type: `application/json`

Schema: `object (ErrorBody)`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | yes | Stable machine-readable error code, e.g. `forbidden`, `not_found`. |
| `details` | `any` | no | Optional structured context. For 403 it is `{ perm }`. |

**Error response**

```json
{
  "error": "internal"
}
```

## Examples

### curl

```bash
curl -X GET 'http://localhost:8787/v1/public/store/games'
```

### TypeScript

```ts
const response = await fetch("http://localhost:8787/v1/public/store/games", {
  method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const data = response.status === 204 || response.status === 205
  ? undefined
  : response.headers.get("content-type")?.includes("json")
    ? await response.json()
    : await response.text();
```
