Comprehensive reference for working with Telegram gifts
- Telegram Gifts on Dune
- GiftStat.com
- Gift Charts Bot (giftcharts.com)
- Peek.tg Bot
- Gift Chart Stickers
- Floor Price Stickers
- NFT GIFT Calculator Bot
- Gift Changes API
- Gift Changes CDN
- Gift Name — Human-readable name used in descriptions
- GiftName — PascalCase, often used in telegram links
- giftname — Lowercase format used in URLs and paths
| Type | Format | URL Pattern |
|---|---|---|
| Gift Page | HTML | https://t.me/nft/[GiftName]-[id] |
| Minted Gift Detail | JSON | https://nft.fragment.com/gift/[giftname]-[id].json |
| Image (JPG - Large) | JPG | https://nft.fragment.com/gift/[giftname]-[id].large.jpg |
| Image (JPG - Medium) | JPG | https://nft.fragment.com/gift/[giftname]-[id].medium.jpg |
| Image (JPG - Small) | JPG | https://nft.fragment.com/gift/[giftname]-[id].small.jpg |
| Image (WebP) | WebP | https://nft.fragment.com/gift/[giftname]-[id].webp |
| Lottie Animation | JSON | https://nft.fragment.com/gift/[giftname]-[id].lottie.json |
| Telegram Sticker | TGS | https://nft.fragment.com/gift/[giftname]-[id].tgs |
| Collection Thumbnail | WebP | https://fragment.com/file/gifts/[giftname]/thumb.webp |
Using Telegram NFT URL we can get different details for each gift If you only need the model, backdrop and symbol you can use this:
const gift = "PlushPepe-1";
const match = (await(await fetch("https://t.me/nft/"+gift)).text()).match(/<meta\s+name=["']twitter:description["']\s+content=["']([^"']*)["']/i);
return match?"Name: "+gift+"\n"+match[1]:"null";Example Output:
Name: PlushPepe-1
Model: Pumpkin
Backdrop: Onyx Black
Symbol: Illuminati
Comment: (Optional)
With owner and quantity:
const gift = "PlushPepe-1";
const rows = (await(await fetch("https://t.me/nft/"+gift)).text()).match(/<tr>.*?<\/tr>/gs);
if (!rows || rows.length == 0) {
return "null";
}
let output = "Name: "+gift+"\n";
rows.forEach(row => {
const th = row.match(/<th>(.*?)<\/th>/s);
const td = row.match(/<td>(.*?)<\/td>/s);
if (th && td) {
const key = th[1].trim();
const value = td[1]
.replace(/<[^>]*>/g,"")
.replace(/\s+/g," ")
.trim();
output += `${key}: ${value}\n`;
}
});
return output;Example Output:
Name: PlushPepe-1
Owner: Paul Du Rove
Model: Pumpkin 3%
Backdrop: Onyx Black 2%
Symbol: Illuminati 0.5%
Quantity: 2 815/2 861 issued
UQBEsTMky8JjYU2lF0uyWPrg_XtyPNUzix888KF424wHv-Nx