---
title: "Search Company Brain"
method: POST
path: "/brain/search"
tags: ["Brain"]
---

# Search Company Brain

`POST /brain/search`

Run a hybrid (semantic + keyword) search across the knowledge sources indexed in your [Company Brain](/core-concepts/brain) and return the most relevant, ranked snippets with citations.

Results are scoped to what the authenticated user can see: personal sources, plus any team and organization sources shared with them. Requires the Brain feature, which is available on the Pro and Enterprise plans. Each search consumes Gumloop credits.

## Request body

- object
  - `query` string, required — The natural-language search query.
  - `limit` integer — Maximum number of results to return.
  - `source_type` string[], nullable — Restrict results to specific source types. Omit to search every source you can access. Valid values: `notion`, `google_drive`, `slack`, `github`, `confluence`, `direct_file_uploads`, `gumloop_artifacts`.

## Response `200`

Ranked search results.

- object
  - `results` object[], required — Ranked matches, most relevant first.
    - `document_id` string, nullable — Identifier of the matched document.
    - `source` string, nullable — The source type the result came from, for example `notion` or `slack`.
    - `title` string, nullable — Title of the matched document.
    - `content` string, nullable — The matching snippet of text.
    - `url` string, nullable — Link to the document in its original source, when available.
    - `score` number, nullable — Relevance score, normalized to a 0–1 range.
    - `updated_at` string, date-time, nullable — When the document was last updated in its source.
    - `owner_name` string, nullable — Display name of the document owner, when known.
    - `owner_email` string, nullable — Email of the document owner, when known.
    - `parent_title` string, nullable — Title of the parent item (for example, a channel or folder), when applicable.
    - `metadata` object — Additional source-specific metadata.

## Other responses

- `400` — Invalid request, for example a missing `query` or an unrecognized `source_type`.
- `401` — Unauthorized — missing or invalid Gumloop API credentials.
- `402` — Credit limit exceeded.
- `403` — Forbidden — the caller lacks access to Brain (Pro or Enterprise plan required) or to this endpoint.
- `500` — Internal server error.

---

[API](https://skmtc.dev/gumloop/apis/public-api.md) · [All operations](https://skmtc.dev/gumloop/apis/public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gumloop/public-api/revisions/115f2d6ce387/schema)
