Get embed code
get_embed_codeGenerates embed codes and standalone URLs for published Datawrapper charts, with responsive iframe, script, AMP and oEmbed options plus display flags.
Instructions
Datawrapper: embed codes for a published chart — responsive iframe, fixed iframe, script embed (web component, no iframe), Google AMP or oEmbed — optionally with render flags (dark mode, plain without header/footer, static without interactivity, logo on/off, transparent background, fitchart, table search). Also returns the shareable standalone URL. Uses no API quota.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chart_id": "<chart_id>"
},
"name": "get_embed_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flags | No | Render flags, added to the iframe URL or as data attributes of the script embed. | |
| height | No | iframe variant: fixed height in px (e.g. with fitchart). | |
| variant | No | responsive (default): iframe that resizes itself. script: web component. all: every variant. | |
| chart_id | Yes | ||
| max_width | No | oembed only: maximum width in px. | |
| max_height | No | oembed only: maximum height in px. |