A chart image API you can call with one GET request

Put the series in a query string, get a finished image back. PlotLark draws the chart on the server, so the result works in email, PDFs, bots, and plain image tags where a JavaScript charting library never runs.

  • No client library
  • SVG or PNG from the same URL
  • Anonymous calls need no key
Tickets closed per week806040200344138556174W1W2W3W4W5W6PLOTLARK
Support tickets closed each week, rendered by the request below.
URL
https://www.plotlark.com/api/chart?type=bar&title=Tickets+closed+per+week&labels=W1%2CW2%2CW3%2CW4%2CW5%2CW6&values=34%2C41%2C38%2C55%2C61%2C74&width=900&height=520&color=%23ff7b5c&background=%23fffdf8&grid=true&valuesOn=true
cURL
curl "https://www.plotlark.com/api/chart?type=bar&title=Tickets+closed+per+week&labels=W1%2CW2%2CW3%2CW4%2CW5%2CW6&values=34%2C41%2C38%2C55%2C61%2C74&width=900&height=520&color=%23ff7b5c&background=%23fffdf8&grid=true&valuesOn=true" --output chart.svg
HTML
<img src="https://www.plotlark.com/api/chart?type=bar&title=Tickets+closed+per+week&labels=W1%2CW2%2CW3%2CW4%2CW5%2CW6&values=34%2C41%2C38%2C55%2C61%2C74&width=900&height=520&color=%23ff7b5c&background=%23fffdf8&grid=true&valuesOn=true" alt="Tickets closed per week" width="900" height="520" />

No account and no key needed for these requests. Swap /api/chart for / to reopen the same configuration in the studio.

Every parameter the endpoint accepts

The whole chart lives in the query string. Anything you leave out falls back to the default in the last column.

ParameterAcceptsDefault
typebar, line, area, or donutbar
titleChart heading, up to 100 charactersMonthly progress
labelsComma-separated labels, up to 36 characters eachJan,Feb,Mar
valuesComma-separated non-negative numbers24,38,52
width320–1600 pixels800
height240–1200 pixels480
colorSix-digit hex accent colour#ff7b5c
backgroundSix-digit hex background colour#ffffff
gridDraw horizontal guide linestrue
valuesOnPrint the value beside each pointtrue
formatsvg or pngsvg

Two endpoints, one grammar

Both endpoints read exactly the same parameters. They differ in who may call them and how the answer is cached.

GET /api/chart
Open to anyone, no key required, limited to 60 origin requests a minute per address. Responses are cached for five minutes and may be served stale for up to a day while they revalidate, so a popular embed mostly serves from the CDN.
GET /api/v1/chart
Authenticated with an Authorization: Bearer plk_… key from your account. 500 renders per UTC day and 120 a minute per key, answered with private, no-store and X-RateLimit-Limit / X-RateLimit-Remaining headers.

What comes back

Content-Type
image/svg+xml for the default response, image/png when you add format=png. PNG is rasterised on the server at exactly the width and height you asked for.
Caching
Public responses carry an ETag and Cache-Control: public, max-age=300, s-maxage=300, stale-while-revalidate=86400. A conditional request with If-None-Match gets a 304 instead of a redraw.
Errors
Invalid parameters return 400 with a JSON list of what to fix. Exceeding a limit returns 429. Nothing is drawn from a configuration the validator rejected.

What PlotLark does not do

These limits apply before you start, so nothing on this page promises more than the renderer delivers.

  • One non-negative numeric series per chart, from 1 to 12 points.
  • Bar, line, area, and donut. No stacked, dual-axis, or time-series grammar.
  • 320–1600 px wide and 240–1200 px tall, on a solid six-digit hex background.
  • Anonymous rendering is capped at 60 origin requests a minute per address.

Common questions

Do I need an API key to render a chart?

No. GET /api/chart is open and rate limited by address at 60 origin requests a minute. A key is only needed for /api/v1/chart, which is private, uncached, and metered per key at 500 renders a UTC day.

How much data can one chart hold?

One numeric series of 1 to 12 non-negative points, with labels up to 36 characters. Labels cannot contain commas, because commas separate the points in the query string.

Can I recover a key I did not copy?

No. Keys are shown once and stored only as a SHA-256 hash, so a lost key has to be revoked and replaced from the account library.