> ## Documentation Index
> Fetch the complete documentation index at: https://developers.myhero.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Notion query database

> Query a Notion database with optional filter and sort. Returns rows (each is a Notion page) with their property values. Use this when the user asks for…

`notion_query_database`

Query a Notion database with optional filter and sort. Returns rows (each is a Notion page) with their property values. Use this when the user asks for structured data like 'employees with role = engineer' or 'tasks due this week'. Get the `databaseId` from `notion_search` with filter=database. The `filter` and `sorts` arguments follow Notion's database query DSL — pass them as JSON strings. See [https://developers.notion.com/reference/post-database-query](https://developers.notion.com/reference/post-database-query) for the full schema.

## Parameters

<ParamField path="databaseId" type="string" required />

<ParamField path="filter" type="string">
  Notion filter object. Example: '\{"property":"Status","select":\{"equals":"Done"}}'. Omit for no filter.
</ParamField>

<ParamField path="sorts" type="string">
  Notion sorts array. Example: '\[\{"property":"Name","direction":"ascending"}]'.
</ParamField>

<ParamField path="limit" type="integer" default={25}>
  Minimum: 1. Maximum: 100.
</ParamField>
