Retrieves documents matching the query.
Javascript
import Hyperspell from 'hyperspell'; const client = new Hyperspell({ apiKey: 'My API Key', }); const response = await client.memories.search({ query: 'query' }); console.log(response.documents);
{ "errors": [ {} ], "documents": [ { "source": "collections", "resource_id": "<string>", "metadata": { "indexed_at": "2023-11-07T05:31:56Z", "last_modified": "2023-11-07T05:31:56Z", "status": "pending", "events": [ { "message": "<string>", "time": "2023-11-07T05:31:56Z", "type": "error" } ] }, "score": 123 } ], "answer": "<string>" }
API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.
Successful Response
The response is of type object.
object