# Get help center search gaps (https://notert.io/docs/api/reference/get-help-center-search-gaps)

`GET /api/v1/insights/help-search-gaps`

What readers searched the help center for and couldn't find over the past 7, 30 or 90 days, a page at a time, the most searched first: the searches that found no article and that no article answers now, or those that found articles no reader opened, whose titles may miss what readers look for.

Access: A token with help:read.

## Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | string | No | Which searches: no_results (the default, found no article, and none answers them now) or no_clicks (found articles, but no reader opened one). One of: `no_results`, `no_clicks`. Default "no_results". |
| `period` | string | No | How far back, today counted: 7d, 30d (the default) or 90d. One of: `7d`, `30d`, `90d`. Default "30d". |
| `limit` | integer | No | How many to answer on the page, up to 100. 50 by default. 1 to 100. Default 50. |
| `cursor` | string | No | The nextCursor of the page before, to read on, sent with the same other parameters. At most 4096 characters. |

## Response 200

| Field | Type | Description |
| --- | --- | --- |
| `gaps` | object[] | The page's searches, the most searched first. |
| `gaps.words` | string | What readers searched the help center for, in a customer's words. |
| `gaps.searches` | integer | How many searched it in the period, once a reader a day. |
| `counts` | object | How many searches each kind lists in the period. |
| `counts.noResults` | integer | How many searches found no article, and none answers now, at most 100. |
| `counts.noClicks` | integer | How many searches found articles no reader opened, at most 100. |
| `nextCursor` | string or null | Where the next page starts, to send as cursor. Null on the last page. |

## Errors

| Status | Code | Message |
| --- | --- | --- |
| 400 | `BAD_REQUEST` | Input validation failed. |
| 401 | `UNAUTHORIZED` | Send a valid API token as a Bearer token. |
| 403 | `HOLDER_NOT_ALLOWED` | The teammate who holds this API token's secret can't do this in the workspace now. A teammate who can should roll it in the workspace's settings. |
| 403 | `INSUFFICIENT_SCOPE` | This API token can't read the help center. Create one that may in the workspace's settings. |
| 403 | `NETWORK_NOT_ALLOWED` | This API token works only from the networks it was made for. Call from one of them, or create a token for this one in the workspace's settings. |
| 429 | `TOO_MANY_REQUESTS` | Too Many Requests. Its data holds `retryAfter`. |

## Example request

```sh
curl "https://app.notert.io/api/v1/insights/help-search-gaps?kind=no_clicks" \
  -H "Authorization: Bearer $NOTERT_API_TOKEN"
```

## Example response 200

```json
{
  "gaps": [
    {
      "words": "export to csv",
      "searches": 14
    }
  ],
  "counts": {
    "noResults": 23,
    "noClicks": 8
  },
  "nextCursor": "WzUwXQ"
}
```
