ページを取得
GET
/v1/pages/{page_id}指定された ID を使用してPage オブジェクトを取得します。
📘
応答には、ページコンテンツではなく、ページ プロパティが含まれます。ページ コンテンツを取得するには、retrieve block childrenエンドポイントを使用します。
📘
ページ オブジェクトの親オブジェクトがデータベースの場合、プロパティ値はデータベース プロパティ スキーマに準拠します。ページ オブジェクトがデータベースの一部でない場合、そのページで使用できる唯一のプロパティ値はそのタイトルです。
制限
エンドポイントは、ページ プロパティごとに最大 25 のページまたは人物の参照を返します。ページ プロパティに 25 を超える参照が含まれている場合、26 番目以降の参照は Untitled
Anonymous
として返されるか、まったく返されない可能性があります。
この制限は、次のプロパティに影響します。
people
: 応答オブジェクトが 25 人を超える人を返すことは保証できません。relation
:応答オブジェクトのrelation
のhas_more
値は、relation
に25 を超える関連ページが含まれている場合true
です。それ以外の場合はhas_more
の値false です。rich_text
: 応答オブジェクトには、最大 25 個の入力されたインライン ページまたは人物のメンションが含まれます。title
: 応答オブジェクトには、最大 25 個のインライン ページまたは人物へのメンションが含まれます。
👍参照が 25 を超えるプロパティの回避策
ページ プロパティに 25 を超える参照が含まれている場合は、特定のプロパティのページ プロパティの取得エンドポイントを使用して、参照の完全なリストを取得できます。
📘統合機能
このエンドポイントでは、コンテンツの読み取り機能を備えた統合が必要です。コンテンツの読み取り機能なしでこの API を呼び出そうとすると、403 ステータス コードを含む HTTP 応答が返されます。統合機能の詳細については、機能ガイドを参照してください。
エラー
ページが存在しない場合、または統合がページにアクセスできない場合は、404 HTTP 応答を返します。
リクエストがリクエスト制限を超えた場合、400 または 429 HTTP レスポンスを返します。
Requestパラメータ
Notionページの識別子
ページに関連付けられたページプロパティ値IDのリスト。このパラメータを使用して、応答を特定のページプロパティ値または値に制限します。複数のプロパティを取得するには、各ページのプロパティIDを指定します。例えば: ?filter_properties=iAk8&filter_properties=b7dh。
サンプルコード
Response
{
"object": "page",
"id": "59833787-2cf9-4fdf-8782-e53db20768a5",
"created_time": "2022-03-01T19:05:00.000Z",
"last_edited_time": "2022-07-06T20:25:00.000Z",
"created_by": {
"object": "user",
"id": "ee5f0f84-409a-440f-983a-a5315961c6e4"
},
"last_edited_by": {
"object": "user",
"id": "0c3e9826-b8f7-4f73-927d-2caaf86f1103"
},
"cover": {
"type": "external",
"external": {
"url": "https://upload.wikimedia.org/wikipedia/commons/6/62/Tuscankale.jpg"
}
},
"icon": {
"type": "emoji",
"emoji": "🥬"
},
"parent": {
"type": "database_id",
"database_id": "d9824bdc-8445-4327-be8b-5b47500af6ce"
},
"archived": false,
"properties": {
"Store availability": {
"id": "%3AUPp",
"type": "multi_select",
"multi_select": [
{
"id": "t|O@",
"name": "Gus's Community Market",
"color": "yellow"
},
{
"id": "{Ml\\",
"name": "Rainbow Grocery",
"color": "gray"
}
]
},
"Food group": {
"id": "A%40Hk",
"type": "select",
"select": {
"id": "5e8e7e8f-432e-4d8a-8166-1821e10225fc",
"name": "🥬 Vegetable",
"color": "pink"
}
},
"Price": {
"id": "BJXS",
"type": "number",
"number": 2.5
},
"Responsible Person": {
"id": "Iowm",
"type": "people",
"people": [
{
"object": "user",
"id": "cbfe3c6e-71cf-4cd3-b6e7-02f38f371bcc",
"name": "Cristina Cordova",
"avatar_url": "https://lh6.googleusercontent.com/-rapvfCoTq5A/AAAAAAAAAAI/AAAAAAAAAAA/AKF05nDKmmUpkpFvWNBzvu9rnZEy7cbl8Q/photo.jpg",
"type": "person",
"person": {
"email": "cristina@makenotion.com"
}
}
]
},
"Last ordered": {
"id": "Jsfb",
"type": "date",
"date": {
"start": "2022-02-22",
"end": null,
"time_zone": null
}
},
"Cost of next trip": {
"id": "WOd%3B",
"type": "formula",
"formula": {
"type": "number",
"number": 0
}
},
"Recipes": {
"id": "YfIu",
"type": "relation",
"relation": [
{
"id": "90eeeed8-2cdd-4af4-9cc1-3d24aff5f63c"
},
{
"id": "a2da43ee-d43c-4285-8ae2-6d811f12629a"
}
],
"has_more": false
},
"Description": {
"id": "_Tc_",
"type": "rich_text",
"rich_text": [
{
"type": "text",
"text": {
"content": "A dark ",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "A dark ",
"href": null
},
{
"type": "text",
"text": {
"content": "green",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "green"
},
"plain_text": "green",
"href": null
},
{
"type": "text",
"text": {
"content": " leafy vegetable",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": " leafy vegetable",
"href": null
}
]
},
"In stock": {
"id": "%60%5Bq%3F",
"type": "checkbox",
"checkbox": true
},
"Number of meals": {
"id": "zag~",
"type": "rollup",
"rollup": {
"type": "number",
"number": 2,
"function": "count"
}
},
"Photo": {
"id": "%7DF_L",
"type": "url",
"url": "https://i.insider.com/612fb23c9ef1e50018f93198?width=1136&format=jpeg"
},
"Name": {
"id": "title",
"type": "title",
"title": [
{
"type": "text",
"text": {
"content": "Tuscan kale",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Tuscan kale",
"href": null
}
]
}
},
"url": "https://www.notion.so/Tuscan-kale-598337872cf94fdf8782e53db20768a5"
}