API Documentation
Everything you need to integrate Notion Embed into your applications. RESTful API with comprehensive documentation.
Quick Start
Get started with the Notion Embed API in minutes. Follow these steps to create your first embed programmatically.
curl -X POST https://api.notionembed.com/v1/embeds \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"notion_page_id": "your-notion-page-id",
"options": {
"remove_branding": true,
"custom_css": ".notion-page { font-family: Inter; }"
}
}'Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYSecurity Note: Never expose your API key in client-side code. Always make API calls from your server.
Base URL
All API requests should be made to:
https://api.notionembed.com/v1Endpoints
/embedsCreate a new embed for a Notion page.
Request Body
{
"notion_page_id": "string (required)",
"options": {
"remove_branding": "boolean",
"custom_css": "string",
"custom_domain": "string"
}
}/embeds/:idRetrieve details about a specific embed.
/embedsList all embeds in your account.
/embeds/:idDelete an embed.
Rate Limits
API rate limits vary by plan:
| Plan | Requests/min | Requests/day |
|---|---|---|
| Pro | 60 | 10,000 |
| Enterprise | 300 | 100,000 |
Webhooks
Receive real-time notifications when events occur in your Notion Embed account.
Available Events
embed.created- New embed createdembed.updated- Embed settings changedembed.deleted- Embed removedpage.synced- Notion page content synced
Security Best Practices
Never expose API keys in client-side code
Always make API calls from your server.
Use environment variables
Store API keys in environment variables, not in code.
Rotate keys regularly
Regenerate your API keys periodically for enhanced security.
Verify webhook signatures
Always validate webhook payloads using the provided signature.
Code Examples
JavaScript / Node.js
const response = await fetch('https://api.notionembed.com/v1/embeds', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
notion_page_id: 'your-notion-page-id',
options: {
remove_branding: true,
},
}),
});
const embed = await response.json();
console.log(embed.embed_url);Python
import requests
response = requests.post(
'https://api.notionembed.com/v1/embeds',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'notion_page_id': 'your-notion-page-id',
'options': {
'remove_branding': True,
},
},
)
embed = response.json()
print(embed['embed_url'])