Join us for our Developer Platform Hackathon, May 16-17. Apply now →
import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.views.queries.create({
view_id: "a3f1b2c4-5678-4def-abcd-1234567890ab"
}){
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"view_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z",
"total_count": 123,
"results": [
{
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"next_cursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"has_more": true,
"request_status": {
"incomplete_reason": "<string>"
}
}Execute a view’s query and return the first page of results.
import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.views.queries.create({
view_id: "a3f1b2c4-5678-4def-abcd-1234567890ab"
}){
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"view_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z",
"total_count": 123,
"results": [
{
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"next_cursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"has_more": true,
"request_status": {
"incomplete_reason": "<string>"
}
}Executes the view’s filter and sort configuration against its data source, caches the full result set, and returns the first page of page references along with aDocumentation Index
Fetch the complete documentation index at: https://developers.notion.com/llms.txt
Use this file to discover all available pages before exploring further.
query_id for paginating through results.
Cached results expire after 15 minutes. Use the expires_at field to check when the cache will be invalidated.
{
"request_status": {
"type": "incomplete",
"incomplete_reason": "query_result_limit_reached"
}
}
request_status.type is "incomplete", the total_count reflects only the truncated cache size (not the full matching row count), and subsequent paginated requests will stop once the cache is exhausted.
To work around this limit:
last_edited_time to only include recently changed rows).Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The API version to use for this request. The latest version is 2026-03-11.
2026-03-11 The ID of the view.
The number of results to return per page. Maximum: 100
1 <= x <= 100The object type.
"view_query"The query ID.
The view this query was executed against.
When the cached query results expire.
Total number of results in the query.
The page results for this page.
100Show child attributes
Cursor for the next page of results.
Whether there are more results.
Set to { type: 'incomplete', incomplete_reason: 'query_result_limit_reached' } when the view's underlying data source has more rows matching this query than the server-side pagination depth limit allows.
Show child attributes