# Search GitHub or Linear issues (https://notert.io/docs/api/reference/search-github-or-linear-issues)

`GET /api/v1/issues`

Searches the issues of the workspace's connected GitHub or Linear, as the request page's issue picker does, as the token's holder: by words of a title, a number, owner/repo#12 or an address on GitHub, or a name such as ENG-123 in Linear. A tracker the workspace hasn't connected is TRACKER_NOT_CONNECTED.

Access: A token with requests:manage.

## Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tracker` | string | Yes | The tracker: github or linear, either one the workspace connected. One of: `linear`, `github`. |
| `query` | string | Yes | Words of its title, its number, or its name: owner/repo#12 or an issue's address on GitHub, ENG-123 in Linear. At least 1 character. At most 100 characters. |

## Response 200

| Field | Type | Description |
| --- | --- | --- |
| `items` | object[] | The issues that match, best first. |
| `items.tracker` | string | The tracker: github or linear, either one the workspace connected. One of: `linear`, `github`. |
| `items.name` | string | What people call the issue in its tracker: owner/repo#12 on GitHub, ENG-123 in Linear. A link takes it back. |
| `items.title` | string | The issue's title in the tracker. |
| `items.state` | string | Where the issue stands, as its tracker says: open or closed, or a Linear state. |
| `items.url` | string | The issue's page in its tracker. |

## 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 change or delete requests, their status or their place on the roadmap. 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. |
| 403 | `NO_SEAT` | This workspace's plan has no seat for you. |
| 403 | `WORKSPACE_SUSPENDED` | This workspace is suspended. |
| 409 | `CHANGED_MEANWHILE` | Something changed meanwhile. Try again. |
| 409 | `TRACKER_NOT_CONNECTED` | This workspace hasn't connected that tracker, or it no longer lets Notert in. An owner or admin can connect it on the Integrations page. |
| 409 | `TRACKER_PAUSED` | That tracker is paused, since the workspace has more integrations than its plan includes. |
| 409 | `TRACKER_REFUSED` | The tracker refused that: the issue, repository or team may not exist, or the app may not see it. |
| 409 | `TRACKER_UNAVAILABLE` | The tracker didn't answer. Try again in a moment. |
| 429 | `TOO_MANY_REQUESTS` | Too Many Requests. Its data holds `retryAfter`. |

## Example request

```sh
curl "https://app.notert.io/api/v1/issues?tracker=github&query=dark+mode" \
  -H "Authorization: Bearer $NOTERT_API_TOKEN"
```

## Example response 200

```json
{
  "items": [
    {
      "tracker": "github",
      "name": "acme/web#168",
      "title": "Dark mode",
      "state": "open",
      "url": "https://github.com/acme/web/issues/168"
    }
  ]
}
```
