Here’s an example of what I’ve been able to grab using List Page Content. I wonder if we just need to parse out each “bundle” and “type”.
So when type = paragraph, then you format normal
when type = heading 1, format differently
etc
It’d be cool if we could download the page as HTML.
[
{
"object": "block",
"id": "4aaed730-3642-4122-9009-86b1112c5601",
"parent": {
"type": "page_id",
"page_id": "d64f4006-0c67-4504-aa00-2a64bbe9463e"
},
"created_time": "2023-01-03T19:08:00.000Z",
"last_edited_time": "2023-01-03T19:09:00.000Z",
"created_by": {
"object": "user",
"id": "b336b5d7-c5de-4453-a31f-4573a431c821"
},
"last_edited_by": {
"object": "user",
"id": "b336b5d7-c5de-4453-a31f-4573a431c821"
},
"has_children": false,
"archived": false,
"type": "paragraph",
"paragraph": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Page Content 1",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Page Content 1",
"href": null
}
],
"color": "default"
},
"__IMTLENGTH__": 2,
"__IMTINDEX__": 1
},
{
"object": "block",
"id": "6314ad65-8585-4d10-bac2-98b2d47639b5",
"parent": {
"type": "page_id",
"page_id": "d64f4006-0c67-4504-aa00-2a64bbe9463e"
},
"created_time": "2023-01-03T19:09:00.000Z",
"last_edited_time": "2023-01-03T19:09:00.000Z",
"created_by": {
"object": "user",
"id": "b336b5d7-c5de-4453-a31f-4573a431c821"
},
"last_edited_by": {
"object": "user",
"id": "b336b5d7-c5de-4453-a31f-4573a431c821"
},
"has_children": false,
"archived": false,
"type": "paragraph",
"paragraph": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Page Content 2 ",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Page Content 2 ",
"href": null
}
],
"color": "default"
},
"__IMTLENGTH__": 2,
"__IMTINDEX__": 2
}
]