Embeds
Put a live datafloe digest on your page.
Every report projects a compact digest — the open, CC-BY snapshot, glanceable. Drop it anywhere in three formats, all from one URL contract. The “Data by datafloe” attribution links back and is required by the snapshot license.
Three formats
- Interactive iframe —
https://datafloe.dev/embed/{report}. Reader-toggleable, auto-resizing. Best on your own site. - Live image (SVG) —
https://datafloe.dev/embed/{report}.svg. Pastes as an<img>or Markdown where scripts and iframes are stripped (READMEs, newsletters). - Script / web component —
<script src="https://datafloe.dev/embed.js" data-report="…">. Renders into your DOM, style-isolated in a Shadow root.
The URL params (same names everywhere)
Uniform across every report, so they’re documented once and cache predictably:
| param | values | applies to |
|---|---|---|
theme | auto · light · dark | iframe, script |
metric | report-specific (e.g. input_per_mtok) | iframe, script |
rows | integer 3–25 | iframe, script |
scenario and filter are reserved in the contract for reports that opt into them; the current LLM-pricing digest ranks the cheapest models overall and doesn’t expose a facet.
The .svg renders the report’s default view (per-param SVG variants aren’t served statically).
Auto-resize
On load and on any interaction the iframe posts its height to the parent:
window.addEventListener("message", (e) => {
if (e.data?.type !== "datafloe:resize") return;
const f = document.querySelector('iframe[src*="/embed/" + e.data.slug]');
if (f) f.style.height = e.data.height + "px";
}); Without this listener the iframe falls back to a fixed height and scrolls internally — it never breaks the host layout.
Attribution & license
Free embeds render the open snapshot (CC BY), so the backlink is required by the license and is non-removable in the free tier. The commercial computed model and history stay behind the keyed API — a free embed never emits them.
Available embeds
- LLM API pricing & price-history API — grab the snippet from the “Embed this” section, or use
/embed/llm-api-pricing. - Managed Postgres — the decision map (cost by workload) — grab the snippet from the “Embed this” section, or use
/embed/managed-postgres.