Trending Alerts API: trending tweets over WebSocket
Programmatic access to Trending Alerts — the real-time trending feed. For bot commands & pricing, see the Trending Alerts Telegram guide.
Auth: Bearer token with trend_ prefix.
Authorization: Bearer trend_your_api_key_here| Method | Path | Description |
|---|---|---|
| GET | /v1/trending/categories | List all 24 categories with subscription status |
| GET | /v1/trending/subscriptions | Your subscribed categories |
| PUT | /v1/trending/subscriptions | Update subscriptions. Body: {"categories": ["crypto", "technology"]}. Use slugs from GET /v1/trending/categories; unknown slugs are ignored |
| GET | /v1/trending/webhook | Get saved webhook URL |
| PUT | /v1/trending/webhook | Save a webhook URL. Delivery: WebSocket today; webhook delivery coming soon |
| GET | /v1/trending/status | Subscription status |
WebSocket
wss://api.xanguard.tech/v1/trending/ws?api_key=trend_your_keyStreams new trending tweets from all 24 categories; filter on data.category (your subscriptions control Telegram alerts). This WebSocket (and the Telegram bot) is the delivery channel; webhook delivery for Trending is coming soon.
{
"type": "trending_tweet",
"data": {
"category": "crypto",
"tweet": {
"tweet_id": "1234567890123456789",
"author_screen_name": "example_dev",
"author_display_name": "Example Dev",
"full_text": "…",
"created_at": "…",
"retweet_count": 120, "like_count": 950, "reply_count": 40, "quote_count": 12, "view_count": 51000,
"media_count": 1,
"tweet_url": "https://x.com/example_dev/status/1234567890123456789"
}
}
}