---
title: "Summarise Notion Pages in Claude Code — EnConvert API"
description: "Summarise Notion pages inside a Claude Code agent pipeline using EnConvert Distill. Get a clean summary in one API call without chunking or prompt engineering"
canonical: "https://www.enconvert.com/solutions/summarise-notion-pages-in-claude-code-enconvert-api"
locale: "en"
---

# How to Summarise Notion Pages with Claude Code

If you are building a Claude Code agent that reads Notion pages, you need condensed, usable content — not raw exports. Notion pages carry navigation chrome, breadcrumb trails, inline comments, and sidebar metadata that inflate token usage and dilute the signal your agent actually needs. A custom summarisation prompt works until you need it to generalise across pages with different structures and lengths, at which point it becomes another layer to maintain. EnConvert’s Distill endpoint takes a Notion URL and returns a clean, concise summary ready to pass into a Claude Code agent as context or store in a memory layer.

## Example

```python
import os

import anthropic
import httpx

NOTION_URL = os.environ["NOTION_URL"]  # a publicly shared Notion page URL

# Step 1: Extract the Notion page content via Distill
distill_response = httpx.post(
    "https://api.enconvert.com/v2/distill",
    headers={
        "X-API-Key": os.environ["ENCONVERT_API_KEY"],
        "Content-Type": "application/json",
    },
    json={
        "urls": [NOTION_URL],
        "schema": {
            "summary": (
                "a thorough summary of the page, including every decision "
                "recorded on it"
            ),
        },
    },
    timeout=60,
)
distill_response.raise_for_status()

item = distill_response.json()["results"][0]
if item.get("error") or not item.get("data"):
    raise RuntimeError(f"Distill failed for {NOTION_URL}: {item.get('error')}")
summary = item["data"]["summary"]

# Step 2: Pass the summary into Claude as context
client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])

message = client.messages.create(
    model="claude-opus-4-6",
    max_tokens=1024,
    system="You are a technical assistant. Use the provided page summary as context when answering questions.",
    messages=[
        {
            "role": "user",
            "content": (
                "Here is a summary of the relevant Notion page:\n\n"
                f"{summary}\n\n"
                "Based on this, what are the key decisions recorded?"
            ),
        }
    ],
)

print(message.content[0].text)
```

## Output

Distill returns the core content condensed into clean paragraphs or structured points, with navigation elements, breadcrumb trails, inline comments, and sidebar blocks stripped before the response is returned. Passing a raw Notion export into an agent context instead produces bloated token usage, irrelevant formatting markup, inconsistent structure across pages, and a higher probability of the agent reasoning over navigation text rather than actual content.

## Get started

[Get free API key — 500 ops per month, no card required.](https://www.enconvert.com/auth?mode=signup)

## Related solutions

- [How to Summarise Medium Articles with AutoGen](https://www.enconvert.com/solutions/summarise-medium-articles-with-autogen-enconvert-api.md)
- [How to Summarise Substack Newsletters with LangChain](https://www.enconvert.com/solutions/summarise-substack-newsletters-with-langchain-enconvert.md)
- [How to Summarise Wikipedia Articles with LlamaIndex](https://www.enconvert.com/solutions/summarise-wikipedia-articles-with-llamaindex-enconvert-api.md)
- [Best Firecrawl Alternative for RAG Pipeline Ingestion](https://www.enconvert.com/solutions/best-firecrawl-alternative-enconvert-api.md)
- [How to Scrape Jira with AutoGen](https://www.enconvert.com/solutions/scrape-jira-with-autogen-enconvert-api.md)
- [How to Scrape Stripe Docs with OpenAI Agents SDK](https://www.enconvert.com/solutions/scrape-stripe-docs-with-openai-agents-sdk-enconvert-api.md)
