{
  "openapi": "3.0.1",
  "info": {
    "title": "Chart Image Generator: Chart.js & ECharts to PNG, SVG, PDF",
    "description": "Turn data or a Chart.js or ECharts config into chart images: PNG, SVG, PDF, WebP or JPEG. Bar, line, pie, scatter, candlestick, sankey and more, from labels and values, CSV, JSON or an Apify dataset. A QuickChart alternative for AI agents.",
    "version": "0.1",
    "x-build-id": "EOIHKta2BvemAY9R4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~chart-image-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-chart-image-generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/jumblemog~chart-image-generator/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-chart-image-generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/jumblemog~chart-image-generator/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-chart-image-generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "chart": {
            "title": "Chart config (Chart.js or ECharts)",
            "type": "object",
            "description": "A Chart.js config with type, data and options (the format QuickChart uses; Chart.js 2 configs are converted automatically) or an Apache ECharts option with series. Leave empty to chart the data in the next section instead."
          },
          "chartCode": {
            "title": "Chart config as JavaScript",
            "type": "string",
            "description": "The same kind of config written as JavaScript, which may contain functions such as a ticks callback, like QuickChart's c= parameter. Markdown code fences are removed. Used when Chart config is empty."
          },
          "engine": {
            "title": "Chart library",
            "enum": [
              "auto",
              "chartjs",
              "echarts"
            ],
            "type": "string",
            "description": "Which library draws the config. Detected automatically: Chart.js configs have type and data, ECharts options have series.",
            "default": "auto"
          },
          "charts": {
            "title": "More charts (batch)",
            "type": "array",
            "description": "More charts in one run. Each entry is a Chart.js config, an ECharts option, a config written as JavaScript text, or an object with chart (or data fields such as labels and series, csv or datasetId) and settings of its own, such as {\"chart\": {...}, \"name\": \"sales\", \"width\": 1200}. An entry that sets only chartType, xField or yFields charts the data given above, so one dataset can be drawn several ways. Look settings left out come from this form."
          },
          "chartType": {
            "title": "Chart type",
            "enum": [
              "bar",
              "horizontalBar",
              "stackedBar",
              "horizontalStackedBar",
              "line",
              "area",
              "stackedArea",
              "pie",
              "doughnut",
              "polarArea",
              "radar",
              "scatter"
            ],
            "type": "string",
            "description": "The kind of chart to draw from the data.",
            "default": "bar"
          },
          "labels": {
            "title": "Labels",
            "type": "array",
            "description": "The categories along the axis (or the slices of a pie), such as months or product names.",
            "items": {
              "type": "string"
            }
          },
          "series": {
            "title": "Series",
            "type": "array",
            "description": "One or more named lists of numbers, one number per label: [{\"name\": \"Sales\", \"values\": [3, 5, 8]}]. A series can also have \"type\": \"line\" (a line over bars), \"axis\": \"right\" (a second value axis) and \"color\"."
          },
          "values": {
            "title": "Values (one series)",
            "type": "array",
            "description": "A single list of numbers, one per label, instead of Series: [3, 5, 8]."
          },
          "csv": {
            "title": "CSV data",
            "type": "string",
            "description": "CSV or TSV text with a header row, such as month,sales,costs. The first text column gives the labels and the number columns the series, unless X field and Y fields say otherwise. Numbers like $1,200 and 45% are understood."
          },
          "data": {
            "title": "JSON rows",
            "type": "array",
            "description": "Rows as JSON objects, like a dataset's items: [{\"month\": \"Jan\", \"sales\": 12}, ...]. Nested fields can be picked with dots, such as stats.views."
          },
          "datasetId": {
            "title": "Apify dataset",
            "type": "string",
            "description": "A dataset in your Apify account, such as the results of a scraper run, to chart its items (its ID or name). Up to 100,000 items are read. The tool gets read access to this dataset only, so charts in the charts list can use it too but no other dataset."
          },
          "dataUrl": {
            "title": "Data file link",
            "type": "string",
            "description": "A link to a public CSV, TSV or JSON file (up to 10 MB), a GitHub file, or a Google Sheet shared as \"Anyone with the link\". The site's robots.txt is respected."
          },
          "xField": {
            "title": "X field (labels)",
            "type": "string",
            "description": "The column or field that gives the labels (or the x values of a scatter chart). Default: the first text column."
          },
          "yFields": {
            "title": "Y fields (values)",
            "type": "array",
            "description": "The columns or fields to chart as series. Default: every number column. With none, rows are counted per label.",
            "items": {
              "type": "string"
            }
          },
          "aggregate": {
            "title": "Rows with the same label",
            "enum": [
              "auto",
              "none",
              "sum",
              "count",
              "average",
              "min",
              "max"
            ],
            "type": "string",
            "description": "How to combine rows that share a label, such as many orders per region.",
            "default": "auto"
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "none",
              "valueDesc",
              "valueAsc",
              "label"
            ],
            "type": "string",
            "description": "The order of the labels. Dates on line charts are always put in order.",
            "default": "none"
          },
          "limit": {
            "title": "Top N labels",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Keep only this many labels after sorting, such as the top 10."
          },
          "title": {
            "title": "Title",
            "type": "string",
            "description": "The chart's title, shown at the top left."
          },
          "subtitle": {
            "title": "Subtitle",
            "type": "string",
            "description": "A smaller line under the title, such as the unit or the source."
          },
          "xAxisTitle": {
            "title": "X axis title",
            "type": "string",
            "description": "Text along the horizontal axis."
          },
          "yAxisTitle": {
            "title": "Y axis title",
            "type": "string",
            "description": "Text along the vertical axis."
          },
          "showValues": {
            "title": "Show values on the chart",
            "type": "boolean",
            "description": "Write each value on its bar, point or slice.",
            "default": false
          },
          "valuePrefix": {
            "title": "Value prefix",
            "type": "string",
            "description": "Put before every number on the value axis and labels, such as $."
          },
          "valueSuffix": {
            "title": "Value suffix",
            "type": "string",
            "description": "Put after every number, such as %, k or \" kg\" (with its space)."
          },
          "decimals": {
            "title": "Decimals",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Show numbers with exactly this many decimals. Default: up to 2, as needed."
          },
          "legend": {
            "title": "Legend",
            "enum": [
              "auto",
              "top",
              "bottom",
              "left",
              "right",
              "none"
            ],
            "type": "string",
            "description": "Where the legend goes.",
            "default": "auto"
          },
          "beginAtZero": {
            "title": "Start the value axis at zero",
            "type": "boolean",
            "description": "Off lets the axis start near the smallest value, which shows small changes in large numbers.",
            "default": true
          },
          "smooth": {
            "title": "Smooth lines",
            "type": "boolean",
            "description": "Curved lines for line and area charts.",
            "default": false
          },
          "width": {
            "title": "Width (px)",
            "minimum": 100,
            "maximum": 4000,
            "type": "integer",
            "description": "Chart width in CSS pixels. PNG files are this times the pixel scale (1600 px wide by default).",
            "default": 800
          },
          "height": {
            "title": "Height (px)",
            "minimum": 100,
            "maximum": 4000,
            "type": "integer",
            "description": "Chart height in CSS pixels.",
            "default": 450
          },
          "theme": {
            "title": "Theme",
            "enum": [
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Light or dark background, text and grid lines.",
            "default": "light"
          },
          "background": {
            "title": "Background color",
            "type": "string",
            "description": "Any CSS color (#ffffff, white, rgb(0, 0, 0)) or transparent. Default: white, or dark gray with the dark theme."
          },
          "palette": {
            "title": "Color palette",
            "enum": [
              "tableau10",
              "colorblind",
              "vivid",
              "pastel",
              "chartjs",
              "echarts"
            ],
            "type": "string",
            "description": "Colors for series and slices that don't set their own. ECharts options keep ECharts' colors unless you choose a palette here.",
            "default": "tableau10"
          },
          "colors": {
            "title": "Custom colors",
            "type": "array",
            "description": "Your own colors in order, such as #2563eb, #f97316, #16a34a. Used instead of the palette.",
            "items": {
              "type": "string"
            }
          },
          "fontFamily": {
            "title": "Font",
            "enum": [
              "Inter",
              "Roboto",
              "Open Sans",
              "Lato",
              "Montserrat",
              "Poppins",
              "Source Sans 3",
              "Noto Sans",
              "IBM Plex Sans",
              "Nunito",
              "Arial",
              "Noto Serif",
              "JetBrains Mono"
            ],
            "type": "string",
            "description": "The font for all text. Emoji, Chinese, Japanese and Korean always work.",
            "default": "Inter"
          },
          "fontSize": {
            "title": "Font size (px)",
            "minimum": 6,
            "maximum": 64,
            "type": "integer",
            "description": "The base font size. Titles of charts made from data are 1.5 times bigger.",
            "default": 12
          },
          "locale": {
            "title": "Number and date format",
            "type": "string",
            "description": "A locale such as en-US, de-DE or fr-FR for thousands separators, decimals and month names.",
            "default": "en-US"
          },
          "formats": {
            "title": "File formats",
            "type": "array",
            "description": "PNG for chats, emails, docs and slides; SVG and PDF are vector files that stay sharp at any size; WebP is small and lossless; JPEG fits anywhere. One charge per chart, whatever the number of formats.",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "svg",
                "pdf",
                "webp",
                "jpg"
              ],
              "enumTitles": [
                "PNG",
                "SVG",
                "PDF",
                "WebP",
                "JPEG"
              ]
            },
            "default": [
              "png"
            ]
          },
          "scale": {
            "title": "Pixel scale",
            "minimum": 1,
            "maximum": 4,
            "type": "number",
            "description": "Pixel density of PNG, WebP and JPEG files: 2 (default) is sharp on high-resolution screens, 1 gives smaller files, 3 or 4 for print.",
            "default": 2
          },
          "name": {
            "title": "File name",
            "type": "string",
            "description": "A name for the chart's files and dataset row. Default: the title or the chart type."
          },
          "inlineImage": {
            "title": "Include the image in the results",
            "type": "boolean",
            "description": "Also put each image in its dataset row as a base64 data URI, for emails and HTML that can't load links. Images up to 2 MB.",
            "default": false
          },
          "maxCharts": {
            "title": "Maximum charts",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many charts, so the cost of a run stays predictable.",
            "default": 100
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}