Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.productbrain.com/llms.txt

Use this file to discover all available pages before exploring further.

GET /api/search?projectId={projectId}&q={query}
Finds nodes by meaning, not exact text match. Every node has a vector embedding — search matches by semantic similarity and returns ranked results with ancestor paths.

Parameters

ParameterRequiredDescription
projectIdYesThe project to search
qYesNatural language search query
typeNoFilter results by node type
limitNoMax results (default 5, max 20)

Example

curl -s "https://productbrain.com/api/search?projectId=my-project&q=reduce+churn+through+onboarding&limit=5" \
  -H "Authorization: Bearer pb_..."

Response

{
  "results": [
    {
      "node": {
        "id": "approach-42",
        "type": "approach",
        "parentId": "need-8",
        "data": {
          "label": "Guided onboarding wizard",
          "measure": "80% of new users complete the wizard"
        }
      },
      "similarity": 0.847,
      "ancestors": [
        {
          "id": "need-8",
          "type": "need",
          "label": "New users reach first value quickly"
        },
        {
          "id": "goal-3",
          "type": "goal",
          "label": "Reduce churn in first 7 days"
        }
      ]
    }
  ]
}
Results are ranked by similarity score (0–1). The ancestors array shows the full lineage from the node to the root goal, ordered from immediate parent to root.
I need to…Use
Find a node by concept or descriptionSearch
Check if work already exists before creatingSearch
Find the right parent for a new nodeSearch
List all jobs in an iterationNodes with type and iteration filters
Export the full treeNodes
Search is the default operation. Use it before creating nodes to avoid duplicates and to find the right placement.