Skip to main content

Basic Usage

Fetch all items from a database:

Type Safety

NotCMS provides full type inference for list results:

Filter and sort

Property names and operands are inferred from your schema. Conditions are combined with AND and compare the published values, including locked properties. list() without arguments still returns all pages. At most 10 conditions can be combined, including multiple operators on a property. Empty means a missing property, null, an empty string or an empty array. not_equals also matches empty values; use is_empty to match null explicitly. Dates are compared in UTC. A date without a time is midnight UTC (09:00 in Japan), and a timestamp without a timezone is also UTC. A date range uses its start. Invalid dates are rejected. sort accepts exactly one scalar property with "asc" or "desc". Array properties cannot be sorted. Empty values come last in either direction. Ties, and lists without sort, use registration order followed by page ID. Unknown properties, unsupported operators and invalid inputs return HTTP 400 through the usual error tuple. A relation contains Notion page IDs. Retrieve the related pages from a database you select, with at most 100 IDs per call:
If there are more than 100 unique IDs, split them into batches of 100. An empty list returns no pages; more than 100 IDs returns HTTP 400. Unknown, deleted, unsynced, and out-of-scope pages are omitted. IDs are deduplicated and UUID hyphens/case are normalized. Responses use the normal sort order, not the input order; use a Map to restore the relation order as above (canonical IDs returned by Notion and NotCMS match). The returned properties are typed for the selected database. No recursive expansion occurs, so self-references or cycles do not issue extra requests. id: { in: [...] } targets page IDs. A schema property named id still supports its regular conditions such as id: { equals: "custom-value" }. For error tuples, HTTP 429, and retry guidance, see Errors and Rate Limits.

Next Steps

Get Single Item

Learn to fetch individual items

Client API

Explore the complete Client API