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

# Recall

> Recall information from the knowledge graph.

This is a memory-oriented alias for the search endpoint. All search
types and options from v1 are supported.

## Request Parameters
- **search_type** (SearchType): Type of search to perform
- **datasets** (Optional[List[str]]): Dataset names to search within
- **dataset_ids** (Optional[List[UUID]]): Dataset UUIDs to search within
- **query** (str): The search query string
- **system_prompt** (Optional[str]): System prompt for completion searches
- **node_name** (Optional[List[str]]): Filter to specific node sets
- **top_k** (Optional[int]): Maximum results (default: 10)
- **only_context** (bool): Return only the LLM context
- **verbose** (bool): Verbose output

## Error Codes
- **409 Conflict**: Error during recall
- **403 Forbidden**: Permission denied (returns empty list)



## OpenAPI

````yaml /cognee_openapi_spec.json post /api/v1/recall
openapi: 3.1.0
info:
  title: Cognee API
  description: Cognee API with Bearer token and Cookie auth
  version: 1.0.0
servers:
  - url: https://api.cognee.ai
    description: Production server (full functionality)
  - url: http://localhost:8000
    description: Local development server (requires local setup)
security:
  - BearerAuth: []
  - ApiKeyAuth: []
tags:
  - name: activity
    description: ''
  - name: add
    description: Data ingestion endpoints for adding text, files, and structured data.
  - name: auth
    description: >-
      Authentication endpoints for user registration, login, and token
      management.
  - name: checks
    description: ''
  - name: cognify
    description: >-
      Knowledge processing endpoints to transform raw data into knowledge
      graphs.
  - name: configuration
    description: ''
  - name: datasets
    description: Dataset management endpoints for listing, creating, and deleting datasets.
  - name: delete
    description: Data deletion endpoints (deprecated — use datasets endpoints instead).
  - name: forget
    description: ''
  - name: health
    description: ''
  - name: improve
    description: ''
  - name: llm
    description: ''
  - name: memify
    description: ''
  - name: notebooks
    description: ''
  - name: ontologies
    description: ''
  - name: permissions
    description: Permission management for multi-user access control.
  - name: recall
    description: ''
  - name: remember
    description: ''
  - name: responses
    description: Response generation endpoints using the knowledge graph.
  - name: search
    description: Search endpoints for querying the knowledge graph.
  - name: sessions
    description: ''
  - name: settings
    description: Configuration endpoints for managing Cognee settings.
  - name: sync
    description: ''
  - name: update
    description: ''
  - name: users
    description: User management endpoints.
  - name: visualize
    description: Graph visualization endpoints.
paths:
  /api/v1/recall:
    post:
      tags:
        - recall
      summary: Recall
      description: >-
        Recall information from the knowledge graph.


        This is a memory-oriented alias for the search endpoint. All search

        types and options from v1 are supported.


        ## Request Parameters

        - **search_type** (SearchType): Type of search to perform

        - **datasets** (Optional[List[str]]): Dataset names to search within

        - **dataset_ids** (Optional[List[UUID]]): Dataset UUIDs to search within

        - **query** (str): The search query string

        - **system_prompt** (Optional[str]): System prompt for completion
        searches

        - **node_name** (Optional[List[str]]): Filter to specific node sets

        - **top_k** (Optional[int]): Maximum results (default: 10)

        - **only_context** (bool): Return only the LLM context

        - **verbose** (bool): Verbose output


        ## Error Codes

        - **409 Conflict**: Error during recall

        - **403 Forbidden**: Permission denied (returns empty list)
      operationId: recall_api_v1_recall_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecallPayloadDTO'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  oneOf:
                    - $ref: '#/components/schemas/ResponseQAEntry'
                    - $ref: '#/components/schemas/ResponseAgentTraceEntry'
                    - $ref: '#/components/schemas/ResponseGraphContextEntry'
                    - $ref: '#/components/schemas/ResponseGraphEntry'
                  discriminator:
                    propertyName: source
                    mapping:
                      session:
                        $ref: '#/components/schemas/ResponseQAEntry'
                      trace:
                        $ref: '#/components/schemas/ResponseAgentTraceEntry'
                      graph_context:
                        $ref: '#/components/schemas/ResponseGraphContextEntry'
                      graph:
                        $ref: '#/components/schemas/ResponseGraphEntry'
                type: array
                title: Response Recall Api V1 Recall Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    RecallPayloadDTO:
      properties:
        searchType:
          anyOf:
            - $ref: '#/components/schemas/SearchType'
            - type: 'null'
          default: GRAPH_COMPLETION
        datasets:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Datasets
        datasetIds:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Datasetids
          examples:
            - []
        query:
          type: string
          title: Query
          default: What is in the document?
        systemPrompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Systemprompt
          default: >-
            Answer the question using the provided context. Be as brief as
            possible.
        nodeName:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Nodename
          example: []
        topK:
          anyOf:
            - type: integer
            - type: 'null'
          title: Topk
          default: 10
        onlyContext:
          type: boolean
          title: Onlycontext
          default: false
        verbose:
          type: boolean
          title: Verbose
          default: false
        sessionId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sessionid
        scope:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Scope
          description: >-
            Which memory sources to include: 'graph', 'session', 'trace',
            'graph_context', 'all', or a list. Defaults to 'auto' (session first
            when session_id is set, else graph).
      type: object
      title: RecallPayloadDTO
    ResponseQAEntry:
      properties:
        time:
          type: string
          title: Time
        question:
          type: string
          title: Question
        context:
          type: string
          title: Context
        answer:
          type: string
          title: Answer
        qa_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Qa Id
        feedback_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedback Text
        feedback_score:
          anyOf:
            - type: integer
            - type: 'null'
          title: Feedback Score
        used_graph_element_ids:
          anyOf:
            - additionalProperties:
                items:
                  type: string
                type: array
              type: object
            - type: 'null'
          title: Used Graph Element Ids
        memify_metadata:
          anyOf:
            - additionalProperties:
                type: boolean
              type: object
            - type: 'null'
          title: Memify Metadata
        source:
          type: string
          const: session
          title: Source
      type: object
      required:
        - time
        - question
        - context
        - answer
        - source
      title: ResponseQAEntry
    ResponseAgentTraceEntry:
      properties:
        trace_id:
          type: string
          title: Trace Id
        origin_function:
          type: string
          title: Origin Function
        status:
          type: string
          title: Status
        memory_query:
          type: string
          title: Memory Query
          default: ''
        memory_context:
          type: string
          title: Memory Context
          default: ''
        method_params:
          additionalProperties: true
          type: object
          title: Method Params
        method_return_value:
          title: Method Return Value
        error_message:
          type: string
          title: Error Message
          default: ''
        session_feedback:
          type: string
          title: Session Feedback
          default: ''
        source:
          type: string
          const: trace
          title: Source
      type: object
      required:
        - trace_id
        - origin_function
        - status
        - source
      title: ResponseAgentTraceEntry
    ResponseGraphContextEntry:
      properties:
        source:
          type: string
          const: graph_context
          title: Source
        content:
          type: string
          title: Content
      type: object
      required:
        - source
        - content
      title: ResponseGraphContextEntry
    ResponseGraphEntry:
      properties:
        kind:
          $ref: '#/components/schemas/SearchResultKind'
        search_type:
          $ref: '#/components/schemas/SearchType'
        text:
          type: string
          title: Text
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
        dataset_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Id
        dataset_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Name
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          default: {}
        raw:
          additionalProperties: true
          type: object
          title: Raw
          default: {}
        structured:
          anyOf:
            - {}
            - type: 'null'
          title: Structured
        source:
          type: string
          const: graph
          title: Source
      type: object
      required:
        - kind
        - search_type
        - text
        - source
      title: ResponseGraphEntry
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SearchType:
      type: string
      enum:
        - SUMMARIES
        - CHUNKS
        - RAG_COMPLETION
        - TRIPLET_COMPLETION
        - GRAPH_COMPLETION
        - GRAPH_COMPLETION_DECOMPOSITION
        - GRAPH_SUMMARY_COMPLETION
        - CYPHER
        - NATURAL_LANGUAGE
        - GRAPH_COMPLETION_COT
        - GRAPH_COMPLETION_CONTEXT_EXTENSION
        - FEELING_LUCKY
        - TEMPORAL
        - CODING_RULES
        - CHUNKS_LEXICAL
      title: SearchType
    SearchResultKind:
      type: string
      enum:
        - graph_completion
        - rag_completion
        - triplet_completion
        - cypher
        - chunk
        - summary
        - coding_rule
        - natural_language
        - temporal
        - structured
        - unknown
      title: SearchResultKind
      description: |-
        Semantic kind of a search result item.

        More precise than ``search_type`` alone — tells the caller which
        normalization shape was applied. LLM completion types all collapse
        to ``*_COMPLETION`` kinds; non-LLM retrievers produce structural
        kinds (``CHUNK``, ``SUMMARY``, ``CYPHER`` row).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````