API & MCP

Everything a person can do on Embeddable Chart Builder, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Embeddable Chart Builder

Paste a small table and get a chart you can host yourself: inline SVG markup, a <figure> snippet with an accessible data-table fallback, a standalone .svg file and a standalone .html file with no external scripts (optionally with a tiny inline script for tooltips and keyboard focus).

Inputs of Embeddable Chart Builder
FieldTypeDefaultDescription
datatextarea—Data. First row = headers. First column = labels (or dates/numbers for line and scatter charts); every further numeric column becomes a series.
filefile—Or upload CSV/XLSX. Max 5 MB; the first sheet is used.
chartTypeselect (line, area, bar, stacked, scatter, pie, donut)"bar"Chart type
title (required)text"My chart"Title
descriptiontextarea—Text alternative (description). What the chart shows, for screen readers and as the image alt text. Empty: generated from the data.
xLabeltext—X axis label
yLabeltext—Y axis label
sourceNotetext—Source / credit line. Shown under the chart, e.g. "Source: Eurostat, 2026".
widthinteger640Width. The SVG scales to its container; this sets the aspect ratio and text size.
heightinteger360Height
interactivebooleanfalseAdd hover/keyboard tooltips to the standalone HTML file
pngbooleanfalseAlso create a PNG image

Example request

Grouped bars with a source line

curl -X POST https://embeddablechartbuilder.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"data":"Fruit,2025,2026\nApples,12,15\nPears,9,11\nPlums,4,7","chartType":"bar","title":"Fruit sold (tonnes)","yLabel":"tonnes","sourceNote":"Source: example data"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "embeddable-chart-builder": { "type": "http", "url": "https://embeddablechartbuilder.usefulweb.site/mcp" }
  }
}