Notion Page to TypeScript

Paste a Notion API page object (GET /v1/pages/{id} or any element of a database query response) and get a TypeScript interface for properties, parent, icon, cover, and the rest.

JSON input valid
TypeScript output

      
    

About this conversion

Notion's page object is famously verbose: every property is a tagged union keyed by type (title, rich_text, number, status, multi_select, select, date, people, relation, formula, rollup, ...), every rich_text array element carries its own annotations bag (bold, italic, strikethrough, underline, code, color), and the parent block discriminates on type (database_id / page_id / workspace / block_id). Hand-typing this is the canonical reason developers reach for @notionhq/client.

Generating a TypeScript interface from a real page response captures the property shape your specific database uses — a tighter, easier-to-reason-about type than the union of every possible property type Notion supports. Use the result in a custom Notion sync, a webhook consumer, or a static-site generator that reads from a Notion database.

Same shape, other validators

Other JSON shapes