Chart Image API - Data to PNG/SVG Chart for Agents & Reports avatar

Chart Image API - Data to PNG/SVG Chart for Agents & Reports

Pricing

$1.00 / 1,000 chart rendereds

Go to Apify Store
Chart Image API - Data to PNG/SVG Chart for Agents & Reports

Chart Image API - Data to PNG/SVG Chart for Agents & Reports

Need a chart image, not a library? Send JSON rows, a Chart.js or Vega-Lite spec, or any dataset ID and get a PNG and SVG with a public link in the key-value store. Pay per chart, no browser, no monthly plan. Good for Slack, email and PDF reports.

Pricing

$1.00 / 1,000 chart rendereds

Rating

0.0

(0)

Developer

mohamed alaya

mohamed alaya

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a month ago

Last modified

Security

Limited permissions

Share

Turns JSON data, a Chart.js config, a Vega-Lite spec or any Apify dataset into a chart image (PNG, and SVG for Vega-Lite and simple charts) stored in the key-value store with a link you can drop into Slack, email, a PDF or an AI agent reply.

For developers, report builders and AI agents that need a picture of a chart without running a browser or paying a monthly plan. Pay per chart.

Input examples

Simple mode, rows in, grouped bar chart out:

{
"chartType": "bar",
"title": "Sales by month",
"stacked": false,
"data": [
{ "month": "Jan", "online": 120, "store": 80 },
{ "month": "Feb", "online": 150, "store": 95 }
]
}

A Chart.js config (PNG only):

{ "spec": { "type": "line", "data": { "labels": ["Mon", "Tue", "Wed"], "datasets": [{ "label": "Visitors", "data": [320, 410, 380] }] } }, "width": 800, "height": 400 }

Chart any dataset, for example another Actor's output, mapping its columns:

{ "datasetId": "YOUR_DATASET_ID", "chartType": "horizontalBar", "xField": "name", "yFields": ["reviewsCount"], "title": "Top places by reviews", "theme": "dark" }

Leave the input empty to render three demo charts.

Input guide

FieldWhat it does
data, chartType, xField, yFields, seriesField, stacked, titleSimple mode: bar, horizontalBar, line, area, pie, doughnut, scatter from JSON rows. Several value fields draw several series.
specAdvanced: a Chart.js config (PNG) or a Vega-Lite spec (PNG and SVG). Plain JSON, no functions. A Vega-Lite data.url is fetched for you (public http/https only).
datasetId, maxRowsChart the rows of any dataset (first maxRows).
chartsRender many charts in one run: a list of jobs with the fields above. Up to 200 per run.
width, height, scale, theme, formatsSize, PNG pixel density (1-4), light or dark, png and/or svg.

Output

One dataset row per chart. The images are in the run's key-value store; the row holds links.

FieldMeaning
name, engine, chartTypeWhat was rendered (vega-lite or chartjs)
imagePixels, width, height, themeImage size and theme
rowsNumber of data rows used
pngUrl, svgUrlLinks to the image files (svgUrl is empty for Chart.js specs)
pngBytes, svgBytesFile sizes

Sample row:

{ "type": "chart", "name": "sales", "engine": "vega-lite", "chartType": "bar", "imagePixels": "1800x1040",
"rows": 2, "pngUrl": "https://api.apify.com/v2/key-value-stores/.../records/chart-1-sales.png?signature=...",
"svgUrl": "https://api.apify.com/v2/key-value-stores/.../records/chart-1-sales.svg?signature=..." }

The links are signed, so they open without an API token. They live as long as the run's storage (your Apify data retention).

Use it with

  • Google Maps Scraper -> this Actor with datasetId: chart ratings or review counts of the places you scraped.
  • Any scraper's dataset -> a weekly Slack report: schedule this Actor, post pngUrl.
  • An AI agent (MCP or API): the agent sends rows or a spec and gets back an image link to put in its answer.

FAQ

Does it use a browser? No. Charts are drawn with Vega and Chart.js on a native canvas, and converted with resvg.

Why is there no SVG for my Chart.js config? Chart.js only draws to a canvas. Use simple mode or a Vega-Lite spec when you need SVG.

Can I use custom fonts or callbacks in Chart.js options? No. Only JSON options work. Fonts are DejaVu Sans.

Honest limits

  • Chart.js specs cannot contain functions (tooltips and scriptable options are ignored); plugins are not loadable.
  • Simple mode has no log scales, dual axes or annotations; use a Vega-Lite spec for those.
  • Text widths in Vega charts are estimated, so very long labels may overlap. Set width larger or shorten labels.
  • Only Latin-script text is guaranteed to render (DejaVu Sans).

Price

Pay per event: $0.001 per chart rendered (chart-rendered). PNG and SVG of the same chart are one chart. 1,000 charts cost $1.00. Charts that fail are not charged.