Search
Search a workspace's pull requests, guides and review discussion from a script.
Search finds pull requests, guide content and review discussion across one workspace, for example every change that touched src/auth.ts. It needs a token with the read scope and returns only what you can access. It reads the existing index: it never generates a guide or indexes missing content.
Search is being turned on one workspace at a time. Where it isn't on yet, requests fail with search_unavailable.
Send a query
Link to this sectionPOST /api/v1/search with a query and a workspace_id (from Your account). The request example shows the full call; Authentication and scopes shows how to get a token.
| Field | Use |
|---|---|
repository_ids | Search only these repositories (rep_…) |
filters.kinds | Any of pull-request, summary, claim, comment, decision-rationale |
filters.paths | Only content linked to these files, up to 20 |
limit | Results per page, 1 to 50; default 20 |
cursor | The previous page's next_cursor |
Read the results
Link to this sectionEach item in data has its kind, a title, a snippet and a url that opens it in the app. A snippet is up to 512 characters: the start of the text, or the passage around the first query word, marked with a leading …. Read the full content through the API with the result's guide and change IDs.
| Kind | What it is |
|---|---|
pull-request | A pull request |
summary | A guide's summary |
claim | A change in a guide |
comment | A review comment and its author |
decision-rationale | A reviewer's note on a review decision |
Links to summaries, changes, comments and decisions open the exact guide they came from. An imported GitHub comment names its GitHub author. A decision result is what the reviewer decided at the time, not the pull request's current approval state.
Two flags say how far to trust a short or empty page:
| Flag | Meaning |
|---|---|
incomplete | Some repositories you can access aren't fully indexed yet, or some matches were dropped while being checked. An empty page doesn't mean no matches |
truncated | The ranking window ran out. Narrow the query or the repositories to see more |
Page through results
Link to this sectionWhile has_more is true, send the same request with cursor set to next_cursor. Keep the query, workspace, filters, limit and token the same. A cursor expires after five minutes; an expired one fails with invalid_request, so start again from the first page.
Errors
Link to this section| Error | What to do |
|---|---|
conflict | Rankings changed under the cursor; search again from the first page |
search_authorization_pending | Your access is being rechecked; retry after Retry-After |
search_unavailable | Search is off or down for this workspace; retry later |
In the app, press Cmd+K (Ctrl+K on Windows and Linux) to search; Keyboard shortcuts covers the launcher.