Real-time tweet monitoring using WebSocket
Connect with your API key to start monitoring
const connection = new signalR.HubConnectionBuilder() .withUrl('https://api.twtmonitor.com/hub/monitoring') .withAutomaticReconnect() .build(); connection.on('NewTweet', (notification) => { console.log('New tweet:', notification); // Handle tweet notification }); await connection.start(); await connection.invoke('SubscribeToMonitoring', 'YOUR_API_KEY');
using Microsoft.AspNetCore.SignalR.Client; var connection = new HubConnectionBuilder() .WithUrl("https://api.twtmonitor.com/hub/monitoring") .WithAutomaticReconnect() .Build(); connection.On<TweetNotification>("NewTweet", notification => { Console.WriteLine( $"New tweet from @{notification.Profile.Handle}"); }); await connection.StartAsync(); await connection.InvokeAsync( "SubscribeToMonitoring", "YOUR_API_KEY");
from signalrcore.hub_connection_builder import HubConnectionBuilder connection = HubConnectionBuilder()\ .with_url("https://api.twtmonitor.com/hub/monitoring")\ .with_automatic_reconnect()\ .build() def on_new_tweet(notification): print(f"New tweet: {notification}") connection.on("NewTweet", on_new_tweet) connection.start() connection.invoke( "SubscribeToMonitoring", "YOUR_API_KEY")
{
"eventType": "NEW_TWEET",
"tweet": {
"tweetId": "1234567890",
"content": "Tweet content here",
"publishedAt": "2025-11-11T04:25:00Z",
"tweetUrl": "https://x.com/user/status/...",
"tweetType": "Tweet"
},
"profile": {
"profileId": 1,
"handle": "username",
"twitterUserId": "987654321"
},
"metadata": {
"detectionLatencyMs": 18,
"winningThreadId": 4,
"isNewDetection": true
}
}