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

# Semantic search (GET)

> Search across entities, triples, and graphs using natural language. Uses vector embeddings for semantic similarity matching.



## OpenAPI

````yaml api-reference/openapi.json get /api/search
openapi: 3.1.0
info:
  title: Neode API
  description: >-
    A knowledge graph API for storing, querying, and generating triples. Use
    Neode as a triples store for your LLM applications - store facts, query
    knowledge, and generate new triples from any context.
  version: 1.0.0
  contact:
    name: Neode
servers:
  - url: https://www.neode.ai
    description: Production server
  - url: http://localhost:5173
    description: Local development
security:
  - BearerAuth: []
tags:
  - name: Search
    description: Semantic search across your knowledge graph
  - name: Triples
    description: Store and query knowledge as subject-predicate-object triples
  - name: Entities
    description: Manage entities (subjects and objects) with automatic disambiguation
  - name: Graphs
    description: Organize triples into graphs
  - name: Generation
    description: AI-powered triple generation from natural language
  - name: Indexes
    description: Organize entities into indexes
paths:
  /api/search:
    get:
      tags:
        - Search
      summary: Semantic search (GET)
      description: >-
        Search across entities, triples, and graphs using natural language. Uses
        vector embeddings for semantic similarity matching.
      operationId: semanticSearchGet
      parameters:
        - name: q
          in: query
          required: true
          description: Natural language search query
          schema:
            type: string
        - name: types
          in: query
          description: Types to search
          style: form
          explode: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/SearchType'
            default:
              - entities
              - triples
        - name: index_id
          in: query
          description: Filter results to a specific index
          schema:
            type: string
            format: uuid
        - name: offset
          in: query
          description: Number of results to skip for pagination
          schema:
            type: integer
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: Maximum results per type (default 20, max 100)
          schema:
            type: integer
            default: 20
        - name: threshold
          in: query
          description: Minimum similarity score 0-1 (default 0.3)
          schema:
            type: number
            default: 0.3
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SemanticSearchResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    SearchType:
      type: string
      enum:
        - entities
        - triples
        - graphs
      description: Type of object to search for
    SemanticSearchResponse:
      type: object
      description: Response from semantic search
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/SemanticSearchData'
        count:
          $ref: '#/components/schemas/SemanticSearchCount'
    SemanticSearchData:
      type: object
      description: Search results data containing entities, triples, and graphs
      properties:
        entities:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Entity'
              - type: object
                properties:
                  similarity:
                    type: number
                    description: Similarity score (0-1)
                  triple_count:
                    type: integer
                    description: Number of related triples
        triples:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Triple'
              - type: object
                properties:
                  similarity:
                    type: number
                    description: Similarity score (0-1)
        graphs:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Graph'
              - type: object
                properties:
                  similarity:
                    type: number
                    description: Similarity score (0-1)
    SemanticSearchCount:
      type: object
      description: Count of search results by type
      properties:
        entities:
          type: integer
        triples:
          type: integer
        graphs:
          type: integer
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        details:
          type: string
    Entity:
      type: object
      description: An entity representing a subject or object in the knowledge graph
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          description: Canonical name of the entity
        description:
          type: string
        avatar_url:
          type: string
          format: uri
        index_id:
          type: string
          format: uuid
        index_name:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Triple:
      type: object
      description: A knowledge triple representing a fact as subject-predicate-object
      required:
        - subject
        - predicate
        - object
        - object_type
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier
        subject:
          type: string
          description: The subject entity (e.g., 'Elon Musk', 'Tesla')
        predicate:
          type: string
          description: The relationship type (e.g., 'founded', 'located_in', 'born_on')
        object:
          type: string
          description: The object value or entity (e.g., 'SpaceX', '2003', 'Austin, Texas')
        object_type:
          type: string
          enum:
            - literal
            - entity
          description: >-
            'literal' for values (dates, numbers, text), 'entity' for references
            to other entities
        confidence:
          type: number
          minimum: 0
          maximum: 1
          description: Confidence score (0-1) indicating reliability
        source:
          type: string
          format: uri
          description: Source URL or reference for this fact
        graph_id:
          type: string
          format: uuid
          description: Graph this triple belongs to
        index_id:
          type: string
          format: uuid
          description: Index for entity disambiguation
        subject_entity_id:
          type: string
          format: uuid
          description: Auto-resolved entity ID for subject
        object_entity_id:
          type: string
          format: uuid
          description: Auto-resolved entity ID for object (when object_type is 'entity')
        created_at:
          type: string
          format: date-time
    Graph:
      type: object
      description: A graph organizing related triples
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        index_id:
          type: string
          format: uuid
        metadata:
          type: object
        triple_count:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key for authentication

````