Back to Blog
Technical

Notion Embed API: Developer Guide for Custom Integrations

Alex Thompson
14 min read
Share:
notion embed apinotion apinotion developernotion integration api
NE

API Overview

Notion's Official API

Notion provides a REST API for:

  • Reading pages and databases

  • Creating/updating content

  • Managing permissions

  • Searching workspace
  • Limitations for Embedding

    The official API doesn't render pages. For embedding:

  • Use public page URLs

  • Or use Notion Embed API
  • Authentication

    Creating an Integration

  • Go to notion.so/my-integrations

  • Click "New integration"

  • Configure permissions

  • Copy the secret token
  • API Token

    Authorization: Bearer {your-notion-api-token}

    Share with Integration

    Each page must be shared with your integration to access it.

    Key Endpoints

    Retrieve a Page

    GET https://api.notion.com/v1/pages/{page_id}

    Query a Database

    POST https://api.notion.com/v1/databases/{database_id}/query

    Get Page Content

    GET https://api.notion.com/v1/blocks/{block_id}/children

    Code Examples

    Node.js

    const { Client } = require('@notionhq/client');

    const notion = new Client({ auth: process.env.NOTION_API_KEY });

    async function getPage(pageId) {
    const response = await notion.pages.retrieve({ page_id: pageId });
    return response;
    }

    async function getPageContent(pageId) {
    const response = await notion.blocks.children.list({ block_id: pageId });
    return response.results;
    }

    Python

    import requests

    headers = {
    "Authorization": f"Bearer {NOTION_API_KEY}",
    "Notion-Version": "2022-06-28"
    }

    def get_page(page_id):
    url = f"https://api.notion.com/v1/pages/{page_id}"
    response = requests.get(url, headers=headers)
    return response.json()

    Building Custom Embeds

    The Challenge

    Official API returns JSON, not rendered HTML. You must:

  • Parse blocks

  • Convert to HTML

  • Style the output

  • Handle all block types
  • Easier Option: Notion Embed API

    Notion Embed API provides:

  • Pre-rendered pages

  • Custom styling

  • Easy integration

  • No parsing needed
  • Notion Embed API Example

    // Generate embed URL
    const embedUrl = https://notionembed.com/embed/{your-embed-id};

    // Use in your application
    <iframe src={embedUrl} />

    Notion Embed API Features

    Notion Embed Enterprise ($27.90/mo) includes:

  • REST API access

  • Programmatic embed generation

  • Custom styling via API

  • Analytics endpoints

  • Webhook integrations
  • Example API Call

    // Create embed programmatically
    const response = await fetch('https://api.notionembed.com/v1/embeds', {
    method: 'POST',
    headers: {
    'Authorization': 'Bearer {api-key}',
    'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    notionUrl: 'https://notion.site/Page-abc123',
    settings: {
    removeBranding: true,
    customDomain: 'docs.yoursite.com'
    }
    })
    });

    FAQ

    Can I render Notion pages from the API?

    The official API returns structured data, not HTML. You'd need to build a renderer or use Notion Embed.

    Is there an official embed API?

    No, Notion doesn't provide an embed API. Notion Embed fills this gap.

    What are API rate limits?

    Notion: 3 requests/second per integration. Check current limits in their docs.

    Conclusion

    Notion API is powerful but requires work for embedding:

  • Official API for data access

  • Build custom rendering (complex)

  • Use Notion Embed API for easy embedding
  • Access Notion Embed API →

    ---

    Related: GitHub Embed | Developer Documentation

    AT

    Alex Thompson

    Content Creator at Notion Embed. Passionate about helping people share their knowledge with the world.

    View all posts →

    Frequently Asked Questions

    Can I render Notion pages from the API?

    The official API returns structured data, not HTML. You'd need to build a renderer.

    Is there an official embed API?

    No, Notion doesn't provide an embed API. Notion Embed fills this gap.

    What are API rate limits?

    Notion: 3 requests/second per integration.

    Ready to Transform Your Notion Content?

    Join thousands of creators, startups, and businesses using Notion Embed to power their websites. Get started in minutes.

    No credit card requiredSetup in 5 minutesCancel anytime