# Search

Quick search across tasks, pages, projects, spaces and people, cut to what the token's person and its scopes may open.

## Quick search

`GET /orgs/{org}/search`

Scope: `filters:read`

Searches the organisation as quick search does, cut to what the token's person may open (a restricted page, a task they can't see and someone else's draft are never found) and to the token's scopes: tasks need tasks:read, pages and spaces docs:read, projects projects:read, people people:read. q holds the words; kind picks task, page, project and space (several with commas; all the token can read by default) or person on its own (the People directory's search); project or space keeps to one (a project or space the person can't open finds nothing). Results come best match first, then the most recently updated. For Advanced search over tasks, use GET /tasks with q in the query language.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]

### Query parameters

- `q` (string, required): The words to find. [at most 500 characters]
- `kind` (string): task, page, project, space (several with commas), or person on its own. [at most 100 characters]
- `project` (string): A project's key or id. [at most 60 characters]
- `space` (string): A space's key or id. [at most 60 characters]
- `limit` (integer): How many results a page holds, 1 to 50 (25 by default, as the app's pages). [from 1 to 50; default 25]
- `cursor` (string) [at most 1000 characters]
- `count` (string) [one of: true, false]
- `fields` (string): Only these fields, comma-separated: kind, id, title, snippet, key, content_kind, project, space, labels, draft, updated_at. id always comes; the fields not asked for are left out, required or not.

### Request

```sh
curl -X GET "https://projqo.example/api/v1/orgs/{org}/search?q=string" \
  -H "Authorization: Bearer $PROJQO_TOKEN"
```

### Answer: 200

```json
{
  "items": [
    {
      "kind": "task",
      "id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
      "title": "Fix the sign-in page",
      "snippet": "The sign-in page loses the address after…",
      "key": "WEB-12",
      "content_kind": null,
      "project": {
        "id": "0a1b2c3d-4e5f-4a6b-8c7d-8e9f0a1b2c3d",
        "key": "WEB",
        "name": "Website"
      },
      "space": null,
      "labels": [
        "frontend"
      ],
      "draft": false,
      "updated_at": "2026-12-01T10:15:00.000Z"
    }
  ],
  "next_cursor": null
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation. refused: The token's person can see the thing but may not do this; the message says why.
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).
