Skip to main content
Monitor X accounts in real-time with sub-second latency. Track users, search posts by keyword or cashtag, fetch user profiles, and backfill historical data.

What You Can Do

CapabilityEndpointDescription
Track UsersPOST /track/xMonitor an X account for new posts
User ProfileGET /x/userFetch user profile by username
Get PostGET /x/tweetFetch a specific post by ID
Search PostsGET /x/searchFull-text search with pagination
Quick SearchGET /x/quick-searchTypeahead search for users, cashtags, topics
BackfillPUT /backfill/xTrigger historical data backfill
HistoryGET /account/historyRetrieve backfilled historical posts

Track an X User

Start receiving real-time posts from any public X account.
curl -X POST https://scrape.st/track/x \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sid": "elonmusk"}'
Response:
{
  "data": {
    "id": "src_123",
    "source": "X",
    "externalId": "elonmusk",
    "username": "elonmusk",
    "name": "Elon Musk"
  },
  "message": "Now tracking elonmusk on x"
}

Search Posts

Search for posts matching a keyword, cashtag, or phrase. Useful for monitoring token mentions like $BTC, $ETH, or any trending topic.
# Search for Bitcoin-related posts
curl -X GET "https://scrape.st/x/search?q=%24BTC&count=20" \
  -H "x-api-key: YOUR_API_KEY"

# Quick search (typeahead) for users and cashtags
curl -X GET "https://scrape.st/x/quick-search?q=solana&resultTypes=users,cashtags" \
  -H "x-api-key: YOUR_API_KEY"

Backfill History

Trigger a historical backfill to retrieve past posts from tracked accounts.
In the examples below, src_123 is the external ID (e.g. the X user ID) of the account whose historical data you want to pull. This is the same externalId returned when you created the tracking via POST /track/x.
# Trigger backfill
curl -X PUT https://scrape.st/backfill/x \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sid": "src_123"}'

# Check backfill status
curl -X GET "https://scrape.st/backfill/status?sid=src_123" \
  -H "x-api-key: YOUR_API_KEY"

# Retrieve historical data
curl -X GET "https://scrape.st/account/history/x/src_123?page=1&limit=50" \
  -H "x-api-key: YOUR_API_KEY"

Webhook Payload

When a tracked X user posts, your webhook receives a SourceEvent object. This is the exact shape sent via JSON.stringify to your webhook URL:
{
  "mid": "1886493083207827456",
  "sid": "44196397",
  "source": "x",
  "timestamp": 1712072400000,
  "payload": {
    "id": "1886493083207827456",
    "text": "Bitcoin hits new all-time high! πŸš€ $BTC",
    "created_at": "2024-04-02T15:30:00.000Z",
    "lang": "en",
    "favorite_count": 15000,
    "retweet_count": 3000,
    "reply_count": 800,
    "quote_count": 400,
    "bookmark_count": 1200,
    "author": {
      "id": "44196397",
      "name": "Elon Musk",
      "screen_name": "elonmusk",
      "profile_image_url": "https://pbs.twimg.com/profile_images/xxx/photo.jpg",
      "verified": true,
      "is_blue_verified": true
    },
    "entities": {
      "symbols": [{ "text": "BTC" }],
      "hashtags": [],
      "urls": [],
      "user_mentions": []
    },
    "media": [],
    "retweeted_tweet": false,
    "link": "https://x.com/elonmusk/status/1886493083207827456"
  }
}
FieldTypeDescription
midstringMessage ID β€” the post ID
sidstringSource ID β€” the author’s X user ID
sourcestring"x" or "fast-x" (fast push before GraphQL enrichment)
timestampnumberUnix timestamp (ms) when the event was received
payloadobjectFull ResolvedXPost object (see fields above)

API Reference

All tracking endpoints use /track/:source where :source is x, telegram, or discord.