# Data Source Query

Notion

Query a Notion data source with filters, sorts and paging.

## Use this tool with your AI agent

1. Copy the prompt
2. Paste it into your agent
3. Tell it what you need

Read https://scrollport.com/start. Use my existing Scrollport connection, or help me connect if needed. Help me use Data Source Query (tool ID: notion.data-source-query). Ask me for the details you need, then show me the result. Help me connect the required app account if needed.

**Already connected:** Your agent can use that connection.

**New user:** Your agent will guide you through setup, sign-in and authorisation.

This tool also needs you to connect your app account.

Connect your first agent to receive $1 trial credit.

**Job:** [Read and write Notion pages](https://scrollport.com/tools/notion-mcp)

**Current price:** $0.0025/request

**Availability:** Requires connected account

## Tool details

**About this tool**

Queries pages from a Notion data source with optional filter and sorts. Billed per upstream request at $0.0025; one page (up to 100 rows) is one request.

**Inputs and outputs**

### Input

`body` object · optional

Bounded request body sent to the connected application.

`max_pages` integer · optional

Maximum number of result pages to request.

minimum: 1 · maximum: 10

`path` object · required

Identifier path for the authorised connected-app record.

### Output

`pages` number

Returned pages value.

`results` array

Returned results value.

**Example request and output**

Inspect returns this reviewed example, its estimated cost and the current input schema. Run calculates the estimate for your actual input.

### Request

```
{
  "tool_id": "notion.data-source-query",
  "input": {
    "body": {
      "filter": {
        "title": {
          "equals": "Launch readiness brief"
        },
        "property": "Name"
      },
      "page_size": 1
    },
    "path": {
      "data_source_id": "YOUR-NOTION-DATA-SOURCE-ID"
    },
    "max_pages": 1
  }
}
```

### Output

```
{
  "pages": 1,
  "results": [
    {
      "id": "1b2c3d4e-0000-4000-8000-000000000002",
      "url": "https://app.notion.com/p/1b2c3d4e000040008000000000000002",
      "object": "page",
      "properties": {
        "Name": {
          "type": "title",
          "title": [
            {
              "type": "text",
              "plain_text": "Launch readiness brief"
            }
          ]
        },
        "Status": {
          "type": "rich_text",
          "rich_text": [
            {
              "type": "text",
              "plain_text": "Draft"
            }
          ]
        }
      },
      "is_archived": false
    }
  ]
}
```

**Errors and limitations**

- `invalid_input`: missing path parameter "data_source_id" for endpoint /v1/data_sources/{data_source_id}/querySearch for a data_source first, then pass its id: {"path":{"data_source_id":"a1b2c3d4"},"body":{"page_size":100},"max_pages":1}

---

Canonical page: https://scrollport.com/tools/providers/notion/data-source-query
