apyhub
Back
▣ IMAGE PROCESSING · SMART GENERATION

Generate HeatMap Chart API

Hosted on ApyHub

What it does

The Calendar Heatmap API turns dated numeric data into a calendar heatmap chart. Send a title and a data array of { date, value } points, and get back an SVG chart image, either as a file from /download or as a pre-signed URL in the data field from /link.

Each point needs a date in YYYY-MM-DD format and a numeric value. Values map to a color scale you can set in options with color_low, color_med_low, color_med, color_high, and color_empty, each a 6-character hex code without the #. Pre-signed links expire after 15 minutes, so download or store the image if you need it longer.

Use the calendar heatmap API to build a GitHub-style contribution graph, show daily sign-ins, orders, or support tickets in a weekly report, or add an activity heatmap to an email digest or customer dashboard. It works as a server-side heatmap generator for any metric you count per day. It draws date-based calendar heatmaps; matrix and map-style heatmaps sit outside its scope.

Convert the chart with the SVG to PNG API when an email client or document tool needs a raster image, then bundle it into a report with the Image to PDF API. For category totals in the same report, use the Bar Graph API. AI agents can generate these heatmaps through ApyHub MCP.

▣ ENDPOINT 01 / 02
POST
Generate calendar heatmap chart image
https://api.eu.apyhub.com/apyhub/generate-simple-heatmap-chart/download

QUICKSTART

GUIDE

Quickstart

Generate and download a simple heatmap chart image from a small date/value dataset.

curl -X POST "https://api.eu.apyhub.com/apyhub/generate-simple-heatmap-chart/download?output=daily-user-activity-heatmap-chart" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Daily User Activity",
    "data": [
      { "date": "2026-06-01", "value": 3 },
      { "date": "2026-06-02", "value": 7 },
      { "date": "2026-06-03", "value": 12 }
    ]
  }'

What you'll get back

Returns a binary file response which you can save directly to disk.

TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
data*
data-1*
Date in YYYY-MM-DD format.
options
6-character hex color without the leading # symbol.
6-character hex color without the leading # symbol.
6-character hex color without the leading # symbol.

About this endpoint

What it does

Generates a calendar heatmap chart image from the supplied data and title, then returns the generated image as a binary response.

Request Body

ParameterTypeDescription
dataObject ArrayArray of { date, value } objects used to build the chart. Each item must include the date and numeric value.
data[].dateStringDate in YYYY-MM-DD format.
data[].valueNumberValue for the given date.
titleStringChart title. Must be at least 1 character long.
optionsObjectOptional chart color settings. See schema for nested fields.
options.color_lowString6-character hex color without the leading # symbol.
options.color_medString6-character hex color without the leading # symbol.
options.color_highString6-character hex color without the leading # symbol.
options.color_emptyString6-character hex color without the leading # symbol.
options.color_med_lowString6-character hex color without the leading # symbol.

Response

Returns a binary response containing the generated chart image.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.