---
title: "Search Knowledge Base"
method: GET
path: "/kb/search"
tags: ["Knowledge Base"]
---

# Search Knowledge Base

`GET /kb/search`

Search Knowledge Base by a given search text and receive the first page of results

## Query parameters

- `query` string
- `products` string
- `pageNumber` number
- `pageSize` number

## Response `200`

Successful operation

- object
  - `ok` boolean
  - `result` object
    - `count` number — Number of data entries
    - `items` object[] — Items searched from Knowledge Base
      - `id` string — The ID for the searched item. The ID is guaranteed to be unique only among Knowledge Base search items.
      - `isFavorite` boolean
      - `accessLevel` 'private' | 'internal' | 'public'
      - `source` 'policy' | 'questionnaire' | 'report' | 'portal' | 'manual'
      - `subtype` object
        - `raw` string[] — Raw form of the item subtype's values. May begin with the product ID when source is portal. Note that product ID and product name are the same, but this is subject to change.
        - `pretty` string[] — Pretty form of the item subtype's values. May begin with the product name when source is portal.
      - `content` string — The item's content, which varies based on the source.
      - `product` object, nullable — When the source is portal, the product to which the item belongs.
        - `id` string
        - `name` string
        - `pretty` string — The name of the product as it appears in Knowledge Base.
      - `products` object[]
        - `id` union
          - string — When the entry applies to a specific product, this will be the product ID.
          - '--global--' — When the entry applies to the entire organization or all products, it is considered a global item and this will be the only product in the array.
      - `answer` string, nullable — When the source is questionnaire, the answer to the content's question.
      - `comment` string, nullable — When the source is questionnaire, a comment on the content's question, if it exists.
      - `pageNumber` integer, nullable — When the source is report, the 1-indexed page number of the report.
      - `questionNumber` integer, nullable — When the source is questionnaire, the 1-indexed number of the question.
      - `createdAt` string, date-time — ISO8601 format creation date.
      - `modifiedAt` string, date-time — ISO8601 format last-modified date. Defaults to creation date.
  - `pagination` Pagination — unresolved $ref

## Other responses

- `400` — Invalid request
- `403` — Invalid api key / missing scope
- `405` — Method not allowed

---

[API](https://skmtc.net/safebase/apis/safebase-api-documentation.md) · [All operations](https://skmtc.net/safebase/apis/safebase-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/safebase/safebase-api-documentation/revisions/019289073242/schema)
