> ## Documentation Index
> Fetch the complete documentation index at: https://kremis.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Query: Intersect

> Find nodes connected to all specified input nodes.

<ParamField path="method" type="POST">
  `/query`
</ParamField>

**Authentication:** Required (if enabled)

Find nodes that are neighbors of **all** input nodes (set intersection of neighbor sets).

## Request

```json theme={null}
{
  "type": "intersect",
  "nodes": [0, 1, 2]
}
```

| Field   | Type         | Required | Constraints   | Description            |
| ------- | ------------ | -------- | ------------- | ---------------------- |
| `type`  | string       | Yes      | `"intersect"` | —                      |
| `nodes` | array of u64 | Yes      | Max 100 items | Node IDs to intersect. |

## Response

<CodeGroup>
  ```json 200 OK (found) theme={null}
  {
    "success": true,
    "found": true,
    "path": [5, 8],
    "edges": [],
    "grounding": "inference",
    "error": null
  }
  ```

  ```json Not Found theme={null}
  {
    "success": true,
    "found": false,
    "path": [],
    "edges": [],
    "grounding": "unknown",
    "error": null,
    "diagnostic": "no_common_neighbors"
  }
  ```
</CodeGroup>

The `path` array contains the node IDs that are connected to all input nodes. When `found` is `false`, `diagnostic` is `no_common_neighbors`.

## Example

```bash theme={null}
curl -X POST http://localhost:8080/query \
     -H "Content-Type: application/json" \
     -d '{"type": "intersect", "nodes": [0, 1, 2]}'
```
