Appearance
记录
查询记录。
const TOKEN = 'ntn_123456';
const VERSION = '2026-03-11';
const VIEW_ID = 'ab12';
const url = `https://api.notion.com/v1/data_sources/${VIEW_ID}/query`
;
const options = { method: 'POST', headers: { 'Authorization': 'Bearer ' + TOKEN, 'Notion-Version': VERSION } };
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data.results);
} catch (error) {
console.error(error);
}