A JSON API for latest messages of public Telegram channels.
Try it now:
- Check what Durov is up to: https://t-me.vercel.app/durov
- Check the second-latest Durov's post: https://t-me.vercel.app/durov/2
You can use this Web API to get the latest messages, or any one of recent 20 messages, from any public Telegram channel, anonymously.
The official demo is at t-me.vercel.app
.
Request: GET /:channel_username/:message_id?
Parameters of request:
channel_username
(string) : the substring of the channel link after "t.me", e.g.durov
is thechannel_username
oft.me/durov
message_id
(integer, within [1, 20] for now, optional) : the ordinal number of the message, e.g.1
for the latest message,2
for the second-latest message, etc. Default is1
.
For response format, check https://t-me.vercel.app/durov
.
It's running on Vercel and uses its Go runtime to serve the API.
To deploy your own instance, simplely fork this repository and connect your copy to Vercel.
- Add support for optional fields
- photos
.tgme_widget_message_photo_wrap
- sender's name
.tgme_widget_message_from_author
- etc.
- photos
Contributions are welcome!
Try these ideas:
- make progress to the to-do list above
- deploy to a new platform
- propose/add a new feature
- find/fix a bug
- improve the performance