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
});
const queryResult = await client.memories.search({ query: 'query' });
console.log(queryResult.query_id);{
"documents": [
{
"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
}
],
"query_id": "<string>",
"errors": [
{}
],
"answer": "<string>",
"score": 123
}Retrieves documents matching the query.
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
});
const queryResult = await client.memories.search({ query: 'query' });
console.log(queryResult.query_id);{
"documents": [
{
"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
}
],
"query_id": "<string>",
"errors": [
{}
],
"answer": "<string>",
"score": 123
}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.
Query to run.
If true, the query will be answered along with matching source documents.
Only query documents from these sources.
collections, vault, web_crawler, notion, slack, google_calendar, reddit, box, google_drive, airtable, algolia, amplitude, asana, ashby, bamboohr, basecamp, bubbles, calendly, confluence, clickup, datadog, deel, discord, dropbox, exa, facebook, front, github, gitlab, google_docs, google_mail, google_sheet, hubspot, jira, linear, microsoft_teams, mixpanel, monday, outlook, perplexity, rippling, salesforce, segment, todoist, twitter, zoom Search options for the query.
Show child attributes
Only query documents created on or after this date.
Only query documents created before this date.
Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}
Search options for vault
Show child attributes
Only query documents created on or after this date.
Only query documents created before this date.
Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}
Weight of results from this source. A weight greater than 1.0 means more results from this source will be returned, a weight less than 1.0 means fewer results will be returned. This will only affect results if multiple sources are queried at the same time.
x >= 0Search options for Google Calendar
Show child attributes
Only query documents created on or after this date.
Only query documents created before this date.
Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}
Weight of results from this source. A weight greater than 1.0 means more results from this source will be returned, a weight less than 1.0 means fewer results will be returned. This will only affect results if multiple sources are queried at the same time.
x >= 0The ID of the calendar to search. If not provided, it will use the ID of the default calendar. You can get the list of calendars with the /integrations/google_calendar/list endpoint.
Search options for Notion
Show child attributes
Only query documents created on or after this date.
Only query documents created before this date.
Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}
Weight of results from this source. A weight greater than 1.0 means more results from this source will be returned, a weight less than 1.0 means fewer results will be returned. This will only affect results if multiple sources are queried at the same time.
x >= 0List of Notion page IDs to search. If not provided, all pages in the workspace will be searched.
Search options for Web Crawler
Show child attributes
Only query documents created on or after this date.
Only query documents created before this date.
Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}
Weight of results from this source. A weight greater than 1.0 means more results from this source will be returned, a weight less than 1.0 means fewer results will be returned. This will only affect results if multiple sources are queried at the same time.
x >= 0The URL to crawl
Maximum depth to crawl from the starting URL
Search options for Reddit
Show child attributes
Only query documents created on or after this date.
Only query documents created before this date.
Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}
Weight of results from this source. A weight greater than 1.0 means more results from this source will be returned, a weight less than 1.0 means fewer results will be returned. This will only affect results if multiple sources are queried at the same time.
x >= 0The subreddit to search. If not provided, the query will be searched for in all subreddits.
The sort order of the posts. Defaults to 'relevance'.
relevance, new, hot, top, comments The time period to search. Defaults to 'month'.
hour, day, week, month, year, all Search options for Slack
Show child attributes
Only query documents created on or after this date.
Only query documents created before this date.
Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}
Weight of results from this source. A weight greater than 1.0 means more results from this source will be returned, a weight less than 1.0 means fewer results will be returned. This will only affect results if multiple sources are queried at the same time.
x >= 0List of Slack channels to include (by id, name, or #name).
Include private channels when constructing Slack 'types'. Defaults to False to preserve existing cassette query params.
Include direct messages (im) when listing conversations.
Include group DMs (mpim) when listing conversations.
If set, pass 'exclude_archived' to Slack. If None, omit the param.
Search options for Box
Show child attributes
Only query documents created on or after this date.
Only query documents created before this date.
Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}
Weight of results from this source. A weight greater than 1.0 means more results from this source will be returned, a weight less than 1.0 means fewer results will be returned. This will only affect results if multiple sources are queried at the same time.
x >= 0Search options for Google Drive
Show child attributes
Only query documents created on or after this date.
Only query documents created before this date.
Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}
Weight of results from this source. A weight greater than 1.0 means more results from this source will be returned, a weight less than 1.0 means fewer results will be returned. This will only affect results if multiple sources are queried at the same time.
x >= 0Search options for Gmail
Show child attributes
Only query documents created on or after this date.
Only query documents created before this date.
Metadata filters using MongoDB-style operators. Example: {'status': 'published', 'priority': {'$gt': 3}}
Weight of results from this source. A weight greater than 1.0 means more results from this source will be returned, a weight less than 1.0 means fewer results will be returned. This will only affect results if multiple sources are queried at the same time.
x >= 0List of label IDs to filter messages (e.g., ['INBOX', 'SENT', 'DRAFT']). Multiple labels are combined with OR logic - messages matching ANY specified label will be returned. If empty, no label filtering is applied (searches all accessible messages).
Maximum number of results to return.
Model to use for answer generation when answer=True
llama-3.1, gemma2, qwen-qwq, mistral-saba, llama-4-scout, deepseek-r1 Maximum number of results to return.
Successful Response
Show child attributes
collections, vault, web_crawler, notion, slack, google_calendar, reddit, box, google_drive, airtable, algolia, amplitude, asana, ashby, bamboohr, basecamp, bubbles, calendly, confluence, clickup, datadog, deel, discord, dropbox, exa, facebook, front, github, gitlab, google_docs, google_mail, google_sheet, hubspot, jira, linear, microsoft_teams, mixpanel, monday, outlook, perplexity, rippling, salesforce, segment, todoist, twitter, zoom Show child attributes
pending, processing, completed, failed The relevance of the resource to the query
The ID of the query. This can be used to retrieve the query later, or add feedback to it. If the query failed, this will be None.
The answer to the query, if the request was set to answer.
The average score of the query feedback, if any.
Was this page helpful?