Search

Search pages and data sources by title. Returns all shared content if no query provided.

Usage #

// Import the typed helper
import { search } from "@hotglue/sdk/notion";
const result = await client.execute({
...search({
query: string,
filter: object,
sort: object,
// ...
}),
userId: "user_123",
});
// result is typed as SearchOutput
const result = await client.execute({
integration: "notion",
tool: "search",
userId: "user_123",
input: {
query: string,
filter: object,
sort: object,
// ...
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["notion"],
userId: "user_123",
}),
});
await agent.generate("run the Search tool");

Required Permissions #

read_content

Input Schema #

query string

Search query text to match against page and data source titles

filter object

Filter results to only pages or data sources

sort object

Sort order for results

start_cursor string

Pagination cursor from previous response

page_size int

Number of results per page (max 100)

default: 100

This tool calls: #

POST https://api.notion.com/v1/search