---
title: "GET /api/database/{id}/autocomplete_suggestions"
method: GET
path: "/api/database/{id}/autocomplete_suggestions"
tags: ["/api/database"]
---

# GET /api/database/{id}/autocomplete_suggestions

`GET /api/database/{id}/autocomplete_suggestions`

Return a list of autocomplete suggestions for a given `prefix`, or `substring`. Should only specify one, but
  `substring` will have priority if both are present.

  This is intended for use with the ACE Editor when the User is typing raw SQL. Suggestions include matching `Tables`
  and `Fields` in this `Database`.

  Tables are returned in the format `[table_name "Table"]`;
  When Fields have a semantic_type, they are returned in the format `[field_name "table_name base_type semantic_type"]`
  When Fields lack a semantic_type, they are returned in the format `[field_name "table_name base_type"]`

## Path parameters

- `id` integer, required

## Query parameters

- `prefix` string, nullable
- `substring` string, nullable

## Response `2XX`

Successful response

## Other responses

- `4XX` — Client error response
- `5XX` — Server error response

---

[API](https://skmtc.net/metabase/apis/metabase-api.md) · [All operations](https://skmtc.net/metabase/apis/metabase-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/metabase/metabase-api/versions/08b5a2bafb4f/schema)
