Try our new Claude Code Skill to automatically integrate Hyperspell into your project
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const memory of client.memories.list()) {
console.log(memory.resource_id);
}{
"items": [
{
"source": "collections",
"resource_id": "<string>",
"title": "<string>",
"metadata": {
"created_at": "2023-11-07T05:31:56Z",
"indexed_at": "2023-11-07T05:31:56Z",
"last_modified": "2023-11-07T05:31:56Z",
"status": "pending",
"events": [
{
"message": "<string>",
"type": "error",
"time": "2023-11-07T05:31:56Z"
}
],
"url": "<string>"
},
"score": 123
}
],
"next_cursor": "<string>"
}This endpoint allows you to paginate through all documents in the index. You can filter the documents by title, date, metadata, etc.
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const memory of client.memories.list()) {
console.log(memory.resource_id);
}{
"items": [
{
"source": "collections",
"resource_id": "<string>",
"title": "<string>",
"metadata": {
"created_at": "2023-11-07T05:31:56Z",
"indexed_at": "2023-11-07T05:31:56Z",
"last_modified": "2023-11-07T05:31:56Z",
"status": "pending",
"events": [
{
"message": "<string>",
"type": "error",
"time": "2023-11-07T05:31:56Z"
}
],
"url": "<string>"
},
"score": 123
}
],
"next_cursor": "<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.
Filter documents by collection.
Filter documents by source.
collections, reddit, notion, slack, google_calendar, google_mail, box, google_drive, vault, web_crawler Filter documents by metadata using MongoDB-style operators. Example: {"department": "engineering", "priority": {"$gt": 3}}
0 <= x <= 100Was this page helpful?