Movatterモバイル変換


[0]ホーム

URL:


Introduction

The reference is your key to a comprehensive understanding of the Notion API.

Integrations use the API to access Notion's pages, databases, and users. Integrations can connect services to Notion and build interactive experiences for users within Notion. Using the navigation on the left, you'll find details for objects and endpoints used in the API.

📘

You need an integration token to interact with the Notion API. You can find an integration token after you create an integration on the integration settings page. If this is your first look at the Notion API, we recommend beginning with theGetting started guide to learn how to create an integration.

If you want to work on a specific integration, but can't access the token, confirm that you are an admin in the associated workspace. You can check inside the Notion UI viaSettings & Members in the left sidebar. If you're not an admin in any of your workspaces, you can create a personal workspace for free.

Conventions

The base URL to send all API requests ishttps://api.notion.com. HTTPS is required for all API requests.

The Notion API follows RESTful conventions when possible, with most operations performed viaGET,POST,PATCH, andDELETE requests on page and database resources. Request and response bodies are encoded as JSON.

JSON conventions

  • Top-level resources have an"object" property. This property can be used to determine the type of the resource (e.g."database","user", etc.)
  • Top-level resources are addressable by a UUIDv4"id" property. You may omit dashes from the ID when making requests to the API, e.g. when copying the ID from a Notion URL.
  • Property names are insnake_case (notcamelCase orkebab-case).
  • Temporal values (dates and datetimes) are encoded inISO 8601 strings. Datetimes will include the time value (2020-08-12T02:12:33.231Z) while dates will include only the date (2020-08-12)
  • The Notion API does not support empty strings. To unset a string value for properties like aurlProperty value object, for example, use an explicitnull instead of"".

Code samples & SDKs

Samples requests and responses are shown for each endpoint. Requests are shown using the NotionJavaScript SDK, andcURL. These samples make it easy to copy, paste, and modify as you build your integration.

Notion SDKs are open source projects that you can install to easily start building. You may also choose any other language or library that allows you to make HTTP requests.

Pagination

Endpoints that return lists of objects support cursor-based pagination requests. By default, Notion returns ten items per API call. If the number of items in a response from a support endpoint exceeds the default, then an integration can use pagination to request a specific set of the results and/or to limit the number of returned items.

Supported endpoints

Responses

If an endpoint supports pagination, then the response object contains the below fields.

FieldTypeDescription
has_morebooleanWhether the response includes the end of the list.false if there are no more results. Otherwise,true.
next_cursorstringA string that can be used to retrieve the next page of results by passing the value as thestart_cursorparameter to the same endpoint.

Only available whenhas_more is true.
object"list"The constant string"list".
resultsarray of objectsThe list, or partial list, of endpoint-specific results. Refer to asupported endpoint's individual documentation for details.
type"block"

"comment"

"database"

"page"

"page_or_database"

"property_item"

"user"
A constant string that represents the type of the objects inresults.
{type}paginated list objectAn object containing type-specific pagination information. For property_items, the value corresponds to the paginated page property type. For all other types, the value is an empty object.

Parameters for paginated requests

🚧

Parameter location varies by endpoint

GET requests accept parameters in the query string.

POST requests receive parameters in the request body.

ParameterTypeDescription
page_sizenumberThe number of items from the full list to include in the response.

Default:100
Maximum:100

The response may contain fewer than the default number of results.
start_cursorstringAnext_cursor value returned in a previousresponse. Treat this as an opaque value.

Defaults toundefined, which returns results from the beginning of the list.

How to send a paginated request

  1. Send an initial request to thesupported endpoint.
  2. Retrieve thenext_cursor value from the response (only available whenhas_more istrue).
  3. Send a follow up request to the endpoint that includes thenext_cursor param in either the query string (forGET requests) or in the body params (POST requests).

Example: request the next set of query results from a database

curl --location --request POST 'https://api.notion.com/v1/databases/<database_id>/query' \--header 'Authorization: Bearer <secret_bot>' \--header 'Content-Type: application/json' \--data '{    "start_cursor": "33e19cb9-751f-4993-b74d-234d67d0d534"}'

[8]ページ先頭

©2009-2025 Movatter.jp