Widgets

API early access

Get a key

🤖 For agents

Connect MCP

# Claude Code
claude mcp add --transport http widgets https://api.widgets.tg/mcp
// Cursor: .cursor/mcp.json
{ "mcpServers": { "widgets": { "url": "https://api.widgets.tg/mcp" } } }

For models

Make a business-card widget and send it to my chat
Done: the card is in your chat, 3.1 KB, passes on iOS, Android and Desktop.
AnnaProduct designer
TelegramBehanceBook a call

⚙️ For services

1Create a widget

curl https://api.widgets.tg/v1/widgets -H "Authorization: Bearer $KEY" \
  -d '{"template":"card","data":{"name":"Anna","title":"Card"}}'
# → {"id":"wgt_8Kq2","bytes":3104}
import { Widgets } from "@widgets/sdk"
const w = new Widgets(process.env.WIDGETS_KEY)
const card = await w.widgets.create({ template: "card", data: { name: "Anna" } })
from widgets import Widgets
w = Widgets(os.environ["WIDGETS_KEY"])
card = w.widgets.create(template="card", data={"name": "Anna"})

2Send by key

curl https://api.widgets.tg/v1/messages -H "Authorization: Bearer $KEY" \
  -d '{"chat_id":12345,"widget_id":"wgt_8Kq2","feed":"price"}'
await w.messages.send({ chat_id: 12345, widget_id: card.id, feed: "price" })
w.messages.send(chat_id=12345, widget_id=card.id, feed="price")

3Update the data

curl -X PUT https://api.widgets.tg/v1/feeds/price -H "Authorization: Bearer $KEY" \
  -d '{"ton":5.42}'   # every bubble with feed=price
await w.feeds.put("price", { ton: 5.42 })
w.feeds.put("price", {"ton": 5.42})

Free. Daily limits

10,000sends20,000data edits2,000packs20AI generations50,000worker calls100searches and pages10,000TON API requests

Need higher limits or a custom setup? Message Vitaly

How a widget works
📄
One HTML ≤ 4 KB after zlib
/pack squeezes it to 3,950 B and checks iOS, Android and Desktop
🖼
Images as data: only
the engine cuts image links; $asset in data puts the picture inside
🔒
No network
requests go only to the bot through TelegramWidget.request
💾
Data: 1,024 B per message
chat_data and public_data change without resending
🕐
A corner for the time
the client draws the time over the bottom-right corner