Skip to main content
In the fast-paced world of social media, being late is the same as being invisible. Whether you are building automated breaking news alerts, crypto price signal trackers, or real-time brand protection tools, Sorsa API provides the low-latency infrastructure needed to stay ahead. While Sorsa API does not provide native “push” webhooks, our high rate limits (20 req/sec) and ultra-low latency (under 400ms) allow you to build your own robust polling system that performs just like a real-time stream.

💡 Why Build Real-time Monitoring?

  • Breaking News Detection: Monitor journalists or official sources for instant notifications.
  • Competitive Intelligence: Get alerted the second a competitor launches a new feature or makes an announcement.
  • Influencer Tracking: Track specific high-value accounts to engage with their content immediately.
  • Social Listening Automation: Feed live data into your internal Slack, Discord, or database.

🛠 The Logic: DIY Webhooks

Since you can poll our endpoints multiple times per second, you can create a script that “listens” for changes. The most efficient ways to do this are:
  1. Individual Tracking: Polling /user-tweets for a specific VIP account.
  2. Network Tracking: Polling /list-tweets to monitor up to 5,000 accounts with a single request.
  3. Growth Tracking: Polling /user-followers to detect new influencer follows.

📂 Case Study: Monitoring a Group of Accounts via X Lists

Instead of wasting your credits polling 50 different users individually, you can group them into an X List. One request to a List returns the most recent activity from every member in that group.

Step 1: Create a Public List

  1. Go to X Lists.
  2. Add the accounts you want to track (up to 5,000).
  3. Important: Ensure the list is Public. Private lists cannot be accessed via the API.
  4. Copy the List ID from the URL.
    • Example URL: https://x.com/i/lists/20273xxxxxxxxxxxxxx
    • Your List ID: 20273xxxxxxxxxxxxxx

Step 2: Python Implementation

This script polls a list and identifies new tweets that haven’t been processed yet. Python
import requests
import time

API_KEY = "YOUR_API_KEY"
LIST_ID = "YOUR_LIST_ID"
URL = f"https://api.sorsa.io/v2/list-tweets?list_id={LIST_ID}"

headers = {
    "Accept": "application/json",
    "ApiKey": API_KEY
}

last_seen_id = None

print(f"Monitoring List {LIST_ID} in real-time...")

while True:
    try:
        response = requests.get(URL, headers=headers)
        if response.status_code == 200:
            data = response.json()
            tweets = data.get('tweets', [])
            
            if tweets:
                # If it's our first run, just grab the latest ID
                if last_seen_id is None:
                    last_seen_id = tweets[0]['id']
                    print(f"Sync complete. Last Tweet ID: {last_seen_id}")
                else:
                    # Filter for only NEW tweets
                    new_tweets = [t for t in tweets if t['id'] > last_seen_id]
                    
                    for tweet in reversed(new_tweets):
                        print(f"NEW TWEET from @{tweet['user']['username']}: {tweet['full_text']}")
                        # Trigger your internal webhook/action here
                        
                    if new_tweets:
                        last_seen_id = new_tweets[0]['id']
        
        # Wait before next poll (e.g., 5 seconds)
        time.sleep(5)
        
    except Exception as e:
        print(f"Error: {e}")
        time.sleep(10)

⚠️ The Cost of Speed (Calculating Credits)

High-frequency polling consumes a significant amount of requests. Before setting your interval to 1 second, consider the math: Scenario A: High Frequency (1 request per second) 1 req/sec * 60 sec * 60 min * 24 hours * 30 days = 2,592,000 requests/month Scenario B: Moderate Frequency (1 request per minute) 1 req/min * 60 min * 24 hours * 30 days = 43,200 requests/month If you require high-frequency updates (every 1–5 seconds) across multiple lists or accounts, our standard website plans may not be sufficient.
📧 Custom Enterprise Plans: > For high-volume real-time needs, contact us at [email protected]. We can provide custom rate limits, specialized quotas, and significant discounts for enterprise-scale monitoring.

⏭ Next Steps