notion_query_database
Query Notion databases with filters, sorting, pagination, and property selection to retrieve matching rows and their properties.
Instructions
Query a Notion database with optional filter, sort, and pagination.
Returns matching rows with their properties. Use notion_describe_database first to see the schema and property names.
database_id: the database to query.
filter_json: Notion API filter object as JSON. Example:
{"property": "Status", "select": {"equals": "Done"}}
Compound example:
{"and": [
{"property": "Status", "select": {"equals": "Active"}},
{"property": "Priority", "number": {"greater_than": 3}}
]}
sorts_json: JSON array of sort objects. Example:
[{"property": "Due", "direction": "ascending"}]
Use "ascending" or "descending".
limit: page size (default 50, max 100 — Notion's hard cap).
start_cursor: opaque cursor returned by a previous call. Pass it
to fetch the next page. When the output shows
next_cursor: <token> the result set has more rows; when it
shows next_cursor: (end) you have reached the end.
properties: optional comma-separated list of property names to
include (e.g. "Gmail Message ID, Invoice, Status"). Slims
the output dramatically when you only need a few columns. The
title column is always shown. Unknown names are ignored silently
so a caller can ask for a union across a few databases.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| properties | No | ||
| sorts_json | No | ||
| database_id | Yes | ||
| filter_json | No | ||
| start_cursor | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |