Notebooks
A
Alph
05 Embed Notebooks

05 Embed Notebooks

tutorialsAlphgetting-started

Embed Notebooks Anywhere

Open in Alph

Public Alph notebooks can be embedded in any website — docs, blogs, marketing pages, internal tools. Your readers see live, interactive notebook cells without leaving the page.

You can even embed them in a notebook's markdown cells right here in Alph!

Two Ways to Get Embed

Quick: Copy a single cell's embed code

  1. Click the three dots (menu) in the top-right corner of any cell image.png
  2. Select Copy embed code
  3. Paste the iframe snippet into your site

Here's an example of what it looks like:

<iframe
  src="https://runalph.ai/embed/alph/05-embed-notebooks"
  width="100%" height="400" frameborder="0"
  style="border-radius: 8px; border: 1px solid #e5e7eb;">
</iframe>

That's it — one cell, one iframe.

Full control: Use the Embed Builder

  1. Open any notebook and click the Embed button in the top-right
  2. This opens the Embed Builder at https://runalph.ai/embed
  3. Configure which cells to show, theme, visibility options, and execution mode
  4. Copy the generated embed code

The Embed Builder also lets you set up managed execution — where your project powers the embed so visitors can run cells without their own account.

Embed URL Format

Embed URLs follow this pattern:

https://runalph.ai/embed/{orgSlug}/{notebookSlug}

For example, to embed the first two cells of this notebook:

Embed Options

Control what visitors see with URL parameters:

ParameterExampleDescription
cell3Show a single cell by index
cells2-5 or 0,3,7Show a range or list of cells
cellIdabc123Show a cell by its metadata ID
themelight, darkForce a color theme (default: auto/inherit)
showSource0Hide source code (show outputs only)
showOutput0Hide outputs (show source only)
embedConfigconfig-idUse a managed execution configuration

Examples

Show only cell 4 with source hidden (output only):

https://runalph.ai/embed/alph/05-embed-notebooks?cell=4&showSource=0

Show cells 2 through 5 in dark mode:

https://runalph.ai/embed/alph/05-embed-notebooks?cells=2-5&theme=dark

Example: Embed This Notebook

Here's what it looks like to embed the chart cell from this very notebook. The cell below generates a treemap — you could embed just this cell's output on a blog post or documentation page.

[4]

The embed code for just that cell's output:

Use Case: Interactive Documentation

Instead of static code blocks in your docs, embed live notebook cells. Readers see real output — not a screenshot.

Before (static):

import pandas as pd

data = {
    "endpoint": ["/notebooks", "/projects", "/orgs", "/auth"],
    "method": ["GET", "GET", "GET", "POST"],
    "avg_latency_ms": [45, 32, 28, 120],
    "requests_24h": [15420, 8300, 3200, 22100],
}

df = pd.DataFrame(data)
df

After (embedded Alph cell): A live cell where readers see the actual rendered DataFrame and can open it in Alph to explore further.

[6]

Managed Execution

By default, embeds are read-only — visitors see source and outputs but can't run cells. With managed execution, your project powers the embed so visitors can execute cells directly.

How it works:

  1. Open the Embed Builder (runalph.ai/embed)
  2. Under Execution, switch to the Managed tab
  3. Select the organization and project to use
  4. Click Create embed configuration
  5. The generated embed code includes the config ID

Execution is proxied through Alph — your Jupyter token is never exposed to viewers. Only the notebook's existing cell sources can be executed (visitors can't inject arbitrary code).

You can pause, activate, or delete configurations from the Manage tab in the Embed Builder.

Platform Compatibility

Alph embeds work anywhere that supports iframes:

PlatformWorks?Notes
Custom websitesYesDrop in the iframe
NotionYesUse /embed block
ConfluenceYesUse iframe macro
Mintlify / DocusaurusYesHTML in MDX
MediumPartialUse embed.ly link
SubstackNoNo iframe support

Embeds are responsive and work on mobile.


Next: Automations Open in Alph