POST
/
v3
/
search
import Supermemory from 'supermemory';

const client = new Supermemory({
  apiKey: process.env['SUPERMEMORY_API_KEY'], // This is the default and can be omitted
});

const response = await client.search.execute({ q: 'machine learning concepts' });

console.log(response.results);
{
  "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",
        "tag_1": "ai",
        "tag_2": "machine-learning",
        "readingTime": 5,
        "isPublic": true
      },
      "title": "Introduction to Machine Learning",
      "createdAt": "1970-01-01T00:00:00.000Z",
      "updatedAt": "1970-01-01T00:00:00.000Z",
      "summary": "A comprehensive guide to understanding the basics of machine learning and its applications."
    }
  ],
  "total": 123,
  "timing": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

Search results

The response is of type object.