Skip to main content
POST
/
api
/
v1
/
search
Search
curl --request POST \
  --url https://api.cognee.ai/api/v1/search \
  --header 'Content-Type: application/json' \
  --data '
{
  "search_type": "GRAPH_COMPLETION",
  "query": "What is Cognee?",
  "top_k": 10
}
'
[
  {
    "search_result": "<unknown>",
    "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "dataset_name": "<string>"
  }
]

Body

application/json
searchType
enum<string>
default:GRAPH_COMPLETION
Available options:
SUMMARIES,
CHUNKS,
RAG_COMPLETION,
TRIPLET_COMPLETION,
GRAPH_COMPLETION,
GRAPH_SUMMARY_COMPLETION,
CYPHER,
NATURAL_LANGUAGE,
GRAPH_COMPLETION_COT,
GRAPH_COMPLETION_CONTEXT_EXTENSION,
FEELING_LUCKY,
TEMPORAL,
CODING_RULES,
CHUNKS_LEXICAL
datasets
string[] | null
datasetIds
string<uuid>[] | null
Example:
[]
query
string
default:What is in the document?
systemPrompt
string | null
default:Answer the question using the provided context. Be as brief as possible.
nodeName
string[] | null
Example:
[]
topK
integer | null
default:10
onlyContext
boolean
default:false
verbose
boolean
default:false

Response

Successful Response

search_result
any
required
dataset_id
string<uuid> | null
required
dataset_name
string | null
required