# Search boards and items

> GET /search

Source: https://mockflow.com/developers/reference/search/search

**GET** `https://api.mockflow.com/v1/search`  
Scopes: `boards:read`

**curl**

```bash
curl https://api.mockflow.com/v1/search?q=string \
  -H "Authorization: Bearer $MOCKFLOW_API_KEY"
```

**JavaScript**

```javascript
const response = await fetch("https://api.mockflow.com/v1/search?q=string", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MOCKFLOW_API_KEY}`
  }
});

const data = await response.json();
```

**Python**

```python
import os, requests

response = requests.get(
    "https://api.mockflow.com/v1/search?q=string",
    headers={"Authorization": f"Bearer {os.environ['MOCKFLOW_API_KEY']}"},
)

response.raise_for_status()
data = response.json()
```

**200**

```json
{
  "nextCursor": "string",
  "hasMore": false,
  "data": [
    {
      "type": "board",
      "boardId": "brd_3f9e2a",
      "boardTitle": "Q4 Launch Planning",
      "itemId": "itm_k9",
      "itemType": "string",
      "title": "Q4 Launch Planning"
    }
  ],
  "pattern": {
    "regex": false,
    "caseSensitive": false
  },
  "scannedBoards": 0,
  "truncated": false,
  "note": "string"
}
```

**429**

```json
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests.",
    "docsUrl": "https://mockflow.com/developers/concepts/errors#rate_limited"
  },
  "requestId": "req_45d49816999bac40"
}
```

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.

### Authorization

- `Authorization` (string, required): `Bearer <key>`. The key needs `boards:read` scope. Create and manage keys in the [developer console](/developers/console/), or use an [OAuth app](/developers/concepts/oauth-apps) to act for other people; what each scope unlocks is on the [scopes page](/developers/concepts/scopes).

### Query parameters

- `q` (string, required)
- `type` (enum<string>): Only boards, only items, or both when omitted. One of `board` or `item`.
- `spaceId` (string)
- `boardId` (string): Search inside one board.
- `itemType` (string): Item types to search, comma separated.
- `caseSensitive` (boolean): Defaults to `false`.
- `cursor` (string): Opaque cursor from a previous response's `nextCursor`.
- `limit` (integer): Defaults to `50`.

### Errors

- 429 `rate_limited`: Too many requests.
