Learn how to search for and retrieve content from supermemory
Best Practices
/search
curl https://api.supermemory.ai/v3/search?q=machine+learning+concepts&limit=10 \ --request GET \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{ "results": [ { "documentId": "doc_xyz789", "chunks": [ { "content": "Machine learning is a subset of artificial intelligence...", "isRelevant": true, "score": 0.85 } ], "score": 0.95, "metadata": { "source": "web", "category": "technology" }, "title": "Introduction to Machine Learning" } ], "total": 1, "timing": 123.45 }
{ "q": "search query", // Required: Search query string "limit": 10, // Optional: Max results (default: 10) "documentThreshold": 0.5, // Optional: Min document score (0-1) "chunkThreshold": 0.5, // Optional: Min chunk score (0-1) "onlyMatchingChunks": false, // Optional: Skip context chunks "docId": "doc_id", // Optional: Search in specific doc "userId": "user_123", // Optional: Search in user's space "includeSummary": false, // Optional: Include doc summaries "filters": { // Optional: Metadata filters "AND": [ { "key": "category", "value": "technology" } ] }, "categoriesFilter": [ // Optional: Category filters "technology", "science" ] }
{ "results": [{ "documentId": "string", // Document ID "chunks": [{ // Matching chunks "content": "string", // Chunk content "isRelevant": true, // Is directly relevant "score": 0.95 // Similarity score }], "score": 0.95, // Document score "metadata": {}, // Document metadata "title": "string", // Document title "createdAt": "string", // Creation date "updatedAt": "string" // Last update date }], "total": 1, // Total results "timing": 123.45 // Search time (ms) }
Was this page helpful?