Notion: Search by title
Notion search.postSearch: arguments, response, policy and SDK examples.
← Search operations · Get started
Operation notion.post_search
Provider route: POST /v1/search. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/notion with npm, or alter-sdk-notion with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { NotionIntegration } from "@alter-ai/notion";
async function execute(input: Parameters<NotionIntegration["search"]["postSearch"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new NotionIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.search.postSearch(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_notion import NotionIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = NotionIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.search.post_search(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.filter_properties | array | Optional | Property names or IDs to include in each page’s `properties` object. Other properties are left out. Repeat the parameter to pass more than one value, for example `filter_properties=title&filter_properties=Status`. Pages that aren’t in a data source always return only `title`. Search skips names or IDs that don’t exist on a page. |
query.filter_properties[] | string | Each item | |
body | object | Required within parent | Additional keys: not allowed |
body.filter | JSON | Optional | |
body.filter (anyOf 1) | object | Alternative | Additional keys: not allowed |
body.filter (anyOf 1).in_trash | boolean | Optional | |
body.filter (anyOf 1).property | string | Required within parent | One of: object |
body.filter (anyOf 1).value | string | Required within parent | One of: page, data_source |
body.filter (anyOf 2) | object | Alternative | Additional keys: not allowed |
body.filter (anyOf 2).in_trash | boolean | Required within parent | |
body.page_size | number | Optional | |
body.query | string | Optional | |
body.sort | JSON | Optional | |
body.sort (anyOf 1) | object | Alternative | Additional keys: not allowed |
body.sort (anyOf 1).direction | string | Required within parent | One of: ascending, descending |
body.sort (anyOf 1).timestamp | string | Required within parent | One of: last_edited_time |
body.sort (anyOf 2) | object | Alternative | Additional keys: not allowed |
body.sort (anyOf 2).property | string | Required within parent | One of: relevance |
body.start_cursor | string | Optional | Format: uuid |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Search by title — response body |
Referenced models: Search by title — response body
Schemas
Section titled “Schemas”126 more schemas are linked from the tables above, on the schema pages.
Search by title — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
has_more | boolean | Required within parent | |
next_cursor | JSON | Required within parent | |
next_cursor (anyOf 1) | string | Alternative | |
next_cursor (anyOf 2) | null | Alternative | |
object | string | Required within parent | Must equal: list |
page_or_data_source | Model | Required within parent | Expand List views — response body — view |
request_status | object | Optional | |
request_status.incomplete_reason | string | Optional | Known values: query_result_limit_reached |
request_status.type | string | Required within parent | Known values: complete, incomplete |
results | array | Required within parent | |
results[] | JSON | Each item | |
results[] (anyOf 1) | JSON | Alternative | |
results[] (anyOf 1) (anyOf 1) | Model | Alternative | Expand Update page — response body — object page — page Object Response |
results[] (anyOf 1) (anyOf 2) | Model | Alternative | Expand Update page — response body — object page — partial Page Object Response |
results[] (anyOf 2) | JSON | Alternative | |
results[] (anyOf 2) (anyOf 1) | Model | Alternative | Expand Create a data source — response body — object data source — partial Data Source Object Response |
results[] (anyOf 2) (anyOf 2) | Model | Alternative | Expand Create a data source — response body — object data source — data Source Object Response |
type | string | Required within parent | Must equal: page_or_data_source |
Referenced models: List views — response body — view, Create a data source — response body — object data source — data Source Object Response, Update page — response body — object page — page Object Response, Create a data source — response body — object data source — partial Data Source Object Response, Update page — response body — object page — partial Page Object Response
List views — response body — view
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
Create a data source — response body — object data source — data Source Object Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
cover | JSON | Required within parent | The cover of the data source. |
cover (anyOf 1) | Model | Alternative | Expand Update page — response body — object page cover value |
cover (anyOf 2) | null | Alternative | |
created_by | Model | Required within parent | Expand Update page — response body — object page created by The user who created the data source. |
created_time | string | Required within parent | The time when the data source was created. Format: date-time |
database_parent | Model | Required within parent | Expand Create a database — response body — object database parent The parent of the data source's containing database. This is typically a page, block, or workspace, but can be another database in the case of wikis. |
database_type | JSON | Required within parent | The type of typed database this data source belongs to, or `null` for a regular data source. |
database_type (anyOf 1) | string | Alternative | One of: `tasks`, `projects`, `sprints`, `docs`, `wiki`, `meetings`, `meeting_notes`, `skills`, `github_prs` Known values: tasks, projects, sprints, docs, wiki, meetings, meeting_notes, skills, github_prs |
database_type (anyOf 2) | null | Alternative | |
description | array | Required within parent | The description of the data source. Maximum items: 100 |
description[] | Model | Each item | Expand Retrieve a page property item — response body — value Title title |
icon | JSON | Required within parent | The icon of the data source. |
icon (anyOf 1) | Model | Alternative | Expand Get agent — response body — icon value |
icon (anyOf 2) | null | Alternative | |
id | string | Required within parent | The ID of the data source. Format: uuid |
in_trash | boolean | Required within parent | Whether the data source is in the trash. |
is_inline | boolean | Required within parent | Whether the data source is inline. |
last_edited_by | Model | Required within parent | Expand Update page — response body — object page created by The user who last edited the data source. |
last_edited_time | string | Required within parent | The time when the data source was last edited. Format: date-time |
object | string | Required within parent | The data source object type name. Must equal: data_source |
parent | Model | Required within parent | Expand Create a data source — response body — object data source parent The parent of the data source. |
properties | object | Required within parent | The properties schema of the data source. Additional keys: see wildcard field |
properties.* | Model | Additional keys | Expand Create a data source — response body — object data source properties value |
public_url | JSON | Required within parent | The public URL of the data source if it is publicly accessible. |
public_url (anyOf 1) | string | Alternative | |
public_url (anyOf 2) | null | Alternative | |
sync_metadata | object | Optional | Sync identity and available health, included when listing or retrieving data sources. Additional keys: allowed |
sync_metadata.external_collection_type | string | Optional | The provider of a legacy synced data source: Jira or Salesforce. Values are case-sensitive. Known values: Jira, Salesforce |
sync_metadata.external_database_sync | object | Optional | Stored identity of an external database sync. Additional keys: allowed |
sync_metadata.external_database_sync.provider | string | Required within parent | The sync provider: github (GitHub), jira (Jira), or salesforce (Salesforce). Known values: github, jira, salesforce |
sync_metadata.external_database_sync.sync_id | string | Required within parent | The stored sync ID. This is not a credential. Format: uuid |
sync_metadata.health | JSON | Optional | Live collection sync health. Null means unavailable, not unhealthy. Missing timestamps are unknown. |
sync_metadata.health (anyOf 1) | null | Alternative | |
sync_metadata.health (anyOf 2) | Model | Alternative | Expand Create a data source — response body — object data_source / sync_metadata / health / ok False, stage: backfilling, initializing, steady |
sync_metadata.health (anyOf 3) | Model | Alternative | Expand Create a data source — response body — object data_source / sync_metadata / health / ok True, stage: backfilling, initializing, steady |
sync_metadata.health (anyOf 4) | object | Alternative | Additional keys: allowed |
sync_metadata.health (anyOf 4).paused | boolean | Required within parent | Must equal: true |
sync_metadata.owner_user_id | string | Optional | Notion user who owns the sync credential, included when health is available. Format: uuid |
sync_metadata.resource | string | Optional | Provider resource synced to this data source, when available. |
sync_metadata.sync_id | string | Optional | The stored sync ID when provider details are unavailable. This is not a credential. Format: uuid |
sync_metadata.sync_state | Model | Optional | Expand Create a data source — response body — object data source sync metadata sync state |
sync_metadata.synced_collection_key | string | Optional | Opaque, developer-defined collection key for a worker sync. It is not a globally unique ID or a credential. Worker status is not included. |
title | array | Required within parent | The title of the data source. Maximum items: 100 |
title[] | Model | Each item | Expand Retrieve a page property item — response body — value Title title |
url | string | Required within parent | The URL of the data source. |
Referenced models: Create a data source — response body — object data source properties value, Update page — response body — object page cover value, Get agent — response body — icon value, Create a data source — response body — object data source parent, Create a database — response body — object database parent, Update page — response body — object page created by, Retrieve a page property item — response body — value Title title, Create a data source — response body — object data_source / sync_metadata / health / ok False, stage: backfilling, initializing, steady, Create a data source — response body — object data_source / sync_metadata / health / ok True, stage: backfilling, initializing, steady, Create a data source — response body — object data source sync metadata sync state
Update page — response body — object page properties value id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: notion.post_search. Catalog operation: post_search. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"Notion-Version": "2026-03-11"}