---
title: "Search boards and items"
method: GET
path: "/search"
tags: ["Search"]
---

# Search boards and items

`GET /search`

## Request

- Base URL: `https://api.mockflow.com/v1`
- URL: `https://api.mockflow.com/v1/search`
- Auth: HTTP bearer

Two searches in one. Board titles are matched across every board the token can see, paged,
the way the dashboard search works. Item text is searched the way Mida's own board search
works: `q` is a regular expression (a plain string when it does not compile), matched line by
line against each item's content, label matches first. Item search opens boards, so it is
bounded: one board with `boardId`, otherwise the most recently updated boards up to a ceiling,
and the answer says when the ceiling was hit. It reads saved pages; an edit nobody has saved
yet is not searchable.

## Query parameters

- `q` string, required
- `type` 'board' | 'item'
- `spaceId` string
- `boardId` string
- `itemType` string
- `caseSensitive` boolean
- `cursor` string
- `limit` integer

## Response `200`

With `type`, one paged list. Without it, `boards` and `items`, each paged.

- union
  - SearchPage
    - `nextCursor` string, nullable
    - `hasMore` boolean
    - `data` SearchHit[]
      - `type` 'board' | 'item'
      - `boardId` string
      - `boardTitle` string
      - `itemId` string, nullable
      - `itemType` string
      - `title` string
      - `labelMatch` boolean: Items only: the match is in the item's label, which ranks first.
      - `matches` object[]: Items only: matching lines, numbered as GET /items/{itemId}/text numbers them.
        - `n` integer
        - `text` string
        - `html` string: The line with <mark> around matches.
      - `snippet` string: HTML with <mark> around matches.
      - `url` string, uri
    - `pattern` object
      - `regex` boolean
      - `caseSensitive` boolean
    - `scannedBoards` integer
    - `truncated` boolean
    - `note` string
  - object
    - `boards` SearchPage
      - `nextCursor` string, nullable
      - `hasMore` boolean
      - `data` SearchHit[]
        - `type` 'board' | 'item'
        - `boardId` string
        - `boardTitle` string
        - `itemId` string, nullable
        - `itemType` string
        - `title` string
        - `labelMatch` boolean: Items only: the match is in the item's label, which ranks first.
        - `matches` object[]: Items only: matching lines, numbered as GET /items/{itemId}/text numbers them.
          - `n` integer
          - `text` string
          - `html` string: The line with <mark> around matches.
        - `snippet` string: HTML with <mark> around matches.
        - `url` string, uri
      - `pattern` object
        - `regex` boolean
        - `caseSensitive` boolean
      - `scannedBoards` integer
      - `truncated` boolean
      - `note` string
    - `items` SearchPage
      - `nextCursor` string, nullable
      - `hasMore` boolean
      - `data` SearchHit[]
        - `type` 'board' | 'item'
        - `boardId` string
        - `boardTitle` string
        - `itemId` string, nullable
        - `itemType` string
        - `title` string
        - `labelMatch` boolean: Items only: the match is in the item's label, which ranks first.
        - `matches` object[]: Items only: matching lines, numbered as GET /items/{itemId}/text numbers them.
          - `n` integer
          - `text` string
          - `html` string: The line with <mark> around matches.
        - `snippet` string: HTML with <mark> around matches.
        - `url` string, uri
      - `pattern` object
        - `regex` boolean
        - `caseSensitive` boolean
      - `scannedBoards` integer
      - `truncated` boolean
      - `note` string

## Other responses

- `429`: Too many requests.
- `4XX`: An error. See the envelope and the code list on the Errors page.

---

[API](https://skmtc.dev/mockflow/apis/mockflow-boards-api.md) - [All operations](https://skmtc.dev/mockflow/apis/mockflow-boards-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mockflow/apis/mockflow-boards-api/revisions/1a890390518c?raw)
