Docs / Developer tools
README badges API
Small SVG badges: market open or closed, the next holiday, a dataset's freshness, or your own.
Badges in the familiar two-part style, for READMEs, dashboards and status pages. The text is drawn as outlines, so any script shows the same everywhere.
https://api.dharun.devNo key needed for most600 units a minute, 3000 with a free keyThis page as MarkdownA badge of your own
GET/v1/badge
The answer returns the image itself; errors are JSON as everywhere else.
| Parameter | Description |
|---|---|
labelquery | Left part, up to 60 characters. Optional. |
messagequery, required | Right part, up to 80 characters. |
colorquery | Message colour: green, red, orange, yellow, blue, grey, purple, teal, or hex. Default blue. |
labelColorquery | Label colour, hex. Default 555. |
formatquery | svg (default) or png. One of: svg, png. |
curl
curl -o picture.svg "https://api.dharun.dev/v1/badge?label=made%20in&message=India&color=orange&utm_medium=docs"HTML
<img src="https://api.dharun.dev/v1/badge?label=made%20in&message=India&color=orange&utm_medium=docs" alt="A badge of your own">Try it here
Change the values and send the request from your browser. Needs JavaScript.
Result
Market or holiday badge
GET/v1/badge/{kind}
market: NSE open, closed or in its pre-open or closing session. holiday: the next holiday (bank by default; type and state as in /v1/holidays).
The answer returns the image itself; errors are JSON as everywhere else.
| Parameter | Description |
|---|---|
kindpath, required | Which badge. One of: market, holiday. |
labelquery | Your own label. |
typequery | holiday: bank (default), market, central. |
statequery | State code or name, for example TN or Tamil Nadu. |
formatquery | svg (default) or png. One of: svg, png. |
curl
curl -o picture.svg "https://api.dharun.dev/v1/badge/market?utm_medium=docs"HTML
<img src="https://api.dharun.dev/v1/badge/market?utm_medium=docs" alt="Market or holiday badge">Try it here
Change the values and send the request from your browser. Needs JavaScript.
Result
Dataset freshness badge
GET/v1/badge/dataset/{name}
When one of this API's datasets was last updated; orange when older than 45 days.
The answer returns the image itself; errors are JSON as everywhere else.
| Parameter | Description |
|---|---|
namepath, required | A dataset name, as /healthz lists them. |
formatquery | svg (default) or png. One of: svg, png. |
curl
curl -o picture.svg "https://api.dharun.dev/v1/badge/dataset/ifsc?utm_medium=docs"HTML
<img src="https://api.dharun.dev/v1/badge/dataset/ifsc?utm_medium=docs" alt="Dataset freshness badge">Try it here
Change the values and send the request from your browser. Needs JavaScript.
Result
Using an AI assistant? Connect the MCP server and it can call this API by itself. Want every endpoint on one bench? Open the playground.