---
title: "List schema recommendations"
method: GET
path: "/organizations/{organization}/databases/{database}/schema-recommendations"
tags: ["Schema recommendations"]
---

# List schema recommendations

`GET /organizations/{organization}/databases/{database}/schema-recommendations`

### Authorization
A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:

**Service Token Accesses**
 `read_database`

**OAuth Scopes**

 | Resource | Scopes |
| :------- | :---------- |
| Organization | `read_databases` |
| Database | `read_database` |

## Path parameters

- `organization` string, required
- `database` string, required

## Query parameters

- `state` 'open' | 'closed'
- `page` integer
- `per_page` integer

## Response `200`

Returns schema recommendations

- object
  - `type` string, required — The response type. Always "list" for paginated responses.
  - `current_page` integer, required — The current page number
  - `per_page` integer, required — The maximum number of results per page
  - `next_page` integer, nullable, required — The next page number, or null when this is the last page
  - `next_page_url` string, nullable, required — The next page of results, or null when this is the last page
  - `prev_page` integer, nullable, required — The previous page number, or null when this is the first page
  - `prev_page_url` string, nullable, required — The previous page of results, or null when this is the first page
  - `total_count` integer, required — The total number of matching results
  - `total_pages` integer, required — The total number of pages of matching results
  - `data` object[], required
    - `id` string, required — The ID of the schema recommendation
    - `html_url` string, required — The URL to the schema recommendation in the app
    - `title` string, required — The title of the schema recommendation
    - `table_name` string, required — The name of the table the recommendation applies to
    - `keyspace` string, required — The keyspace the recommendation applies to
    - `ddl_statement` string, required — The DDL statement to apply the recommendation
    - `number` integer, required — The number of the schema recommendation
    - `state` 'open' | 'applied' | 'dismissed' | 'stale', required — The state of the recommendation
    - `recommendation_type` 'unused_table' | 'unused_index' | 'duplicate_index' | 'sequence_overflow' | 'sequence_overflow_foreign_key' | 'new_index' | 'encoding_upgrade' | 'bloated_table' | 'bloated_index', required — The type of recommendation
    - `created_at` string, required — When the recommendation was created
    - `updated_at` string, required — When the recommendation was last updated
    - `applied_at` string, nullable, required — When the recommendation was applied
    - `dismissed_at` string, nullable, required — When the recommendation was dismissed
    - `closed_by_deploy_request` object, nullable, required
      - `id` string, required — The ID of the deploy request
      - `branch_id` string, required — The ID of the branch
      - `number` integer, required — The number of the deploy request
    - `dismissed_by` object, nullable, required
      - `id` string, required — The ID of the actor
      - `display_name` string, required — The name of the actor
      - `avatar_url` string, required — The URL of the actor's avatar

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-08-18** `249942995489` — 2 info
  - added the required property `total_count` to the response with the `200` status
  - added the required property `total_pages` to the response with the `200` status
- **2026-08-11** `4b2e4f05bda2` — 1 info
  - added the required property `per_page` to the response with the `200` status
- **2026-06-01** `72506953f367` — 8 breaking, 3 info
  - the response property `data/items/applied_at` became nullable for the status `200`
  - the response property `data/items/closed_by_deploy_request` became nullable for the status `200`
  - the response property `data/items/dismissed_at` became nullable for the status `200`
  - the response property `data/items/dismissed_by` became nullable for the status `200`
  - …7 more
- **2026-02-10** `ed1825db11c6` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/planetscale/apis/planetscale-api/changes/organizations/:organization/databases/:database/schema-recommendations/get.md)

---

[API](https://skmtc.dev/planetscale/apis/planetscale-api.md) · [All operations](https://skmtc.dev/planetscale/apis/planetscale-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/planetscale/planetscale-api/revisions/6d28c038c4fd/schema)
