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

# Search the Graph

> Performs semantic search over stored graph using cosine similarity.



## OpenAPI

````yaml https://app.recallio.ai/swagger/v1/swagger.json post /api/GraphMemory/searchv2
openapi: 3.0.4
info:
  title: Recallio API
  description: API for Recallio.AI
  contact:
    name: Recallio.AI Team
    email: support@recallio.ai
  version: v1
servers:
  - url: https://app.recallio.ai
security:
  - Bearer: []
tags:
  - name: Knowledge
  - name: Memory
  - name: MemoryGraph (Extra Pack)
paths:
  /api/GraphMemory/searchv2:
    post:
      tags:
        - MemoryGraph (Extra Pack)
      summary: Search the Graph
      description: Performs semantic search over stored graph using cosine similarity.
      operationId: SearchGraphMemoryV2
      requestBody:
        description: Graph search request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GraphSearchRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/GraphSearchRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/GraphSearchRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GraphSearchResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReturnClass'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReturnClass'
components:
  schemas:
    GraphSearchRequest:
      type: object
      properties:
        query:
          type: string
          nullable: true
        user_id:
          type: string
          nullable: true
        project_id:
          type: string
          nullable: true
        limit:
          type: integer
          format: int32
        threshold:
          type: number
          format: double
      additionalProperties: false
    GraphSearchResult:
      type: object
      properties:
        source:
          type: string
          nullable: true
        relationship:
          type: string
          nullable: true
        destination:
          type: string
          nullable: true
        score:
          type: number
          format: double
        source_type:
          type: string
          nullable: true
        destination_type:
          type: string
          nullable: true
      additionalProperties: false
    ErrorReturnClass:
      required:
        - error
      type: object
      properties:
        error:
          minLength: 1
          type: string
          description: Error message indicating the specific validation issue
          example: '"Invalid scope type. Must be ''user'', ''project'', or ''team''."'
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````