When does the Notion API yield pagination exclusively for pages?

Notion API docs list various pagination forms. Which endpoint returns a pagination solely for pages? Example:

def retrieve_pages():
    return query_notion("pages_only")

i think its the /pages route itself. the api defaults to pages only when no nested blocks are queried, although the docs arent always clear so its good to double-check if you run into issues.

From my experience with the Notion API, the endpoint that returns pagination solely for pages is indeed the one that directly accesses pages, typically through the /pages endpoint. This endpoint is built to handle just the flat list of pages without pulling in additional details like child blocks unless explicitly requested. I encountered scenarios where relying on nested queries led to confusion over pagination since the returned objects would then include block data. Therefore, if your interest is strictly in paginated pages, invoking /pages or a corresponding query that filters out nested structures is the most straightforward approach.

In my use of the Notion API, I encountered a similar question and noticed that the most reliable way to retrieve paginated pages was to purposely target the /pages endpoint. Experimentation proved that sticking with this endpoint ensures that only page objects are returned. Using any broader endpoint tends to intermix block data, which complicates pagination and makes data handling more cumbersome. As a result, maintaining focus on endpoints dedicated to pages simplifies both your queries and your overall API management strategy.

i’ve found that using the /pages endpoint gives you only pages. even though the docs can be a bit confusing, sticking to that route removes extra block data and simplifies pagnation. keep in mind that any nested query may mix added details.