---
title: "GET /query"
method: GET
path: "/query"
tags: ["Search"]
---

# GET /query

`GET /query`

Query documents with a given filter.

## Query parameters

- `term` string
- `filters` JsonObject
- `types` string[]
- `pageCursor` string
- `pageLimit` integer
- `unknown` object

## Response `200`

Ok

- object
  - `results` object[], required
    - `type` string, required — The "type" of the given document.
    - `document` object, required — The raw value of the document, as indexed.
      - `title` string — The primary name of the document (e.g. name, title, identifier, etc).
      - `text` string — Free-form text of the document (e.g. description, content, etc).
      - `location` string — The relative or absolute URL of the document (target when a search result is clicked).
    - `highlight` object — Optional result highlight. Useful for improving the search result display/experience.
    - `rank` integer — Optional result rank, where 1 is the first/top result returned. Useful for understanding search effectiveness in analytics.
  - `nextPageCursor` string
  - `previousPageCursor` string
  - `numberOfResults` integer

## Other responses

- `default` — An error response from the backend.

## Changes

- **2024-12-12** `521f5ec445b4` — 1 info
  - api tag `Search` added
- **2024-09-24** `bc75feb483c2` — 1 info
  - added the new optional `query` request parameter `unknown`
- **2023-07-16** `1ad4ede8fbcf` — 1 info
  - removed the non-success response with the status `400`
- **2023-04-13** `5eec23e38d9e` — 1 warning, 2 info
  - deleted the `query` request parameter `unknown`
  - api tag `Search` removed
  - added the non-success response with the status `400`

[Change history](https://skmtc.dev/backstage/apis/search/changes/query/get.md)

---

[API](https://skmtc.dev/backstage/apis/search.md) · [All operations](https://skmtc.dev/backstage/apis/search/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/backstage/search/revisions/b53b7597776d/schema)
