Skip to main content

Introduction to Streams

Scrapest provides multiple streaming options to receive real-time data from Twitter/X. Choose the streaming method that best fits your use case:

Streaming Options

WebSocket Connections

  • Full-duplex communication
  • Real-time bidirectional data flow
  • Complete data payloads
  • Best for applications requiring immediate interaction

Server Sent Events (SSE)

  • Unidirectional server-to-client communication
  • Automatic reconnection handling
  • Two variants available:
    • Public SSE: Truncated data for public access
    • Private SSE: Full data with token-based authentication

Choosing the Right Stream

FeatureWebSocketPublic SSEPrivate SSE
Data CompletenessFullTruncatedFull
AuthenticationAPI KeyNoneToken Required
BidirectionalYesNoNo
Auto ReconnectManualBuilt-inBuilt-in
Use CaseInteractive appsPublic feedsPrivate feeds

Quick Start

  1. For WebSocket: See WebSocket Connections
  2. For Public SSE: See Public SSE
  3. For Private SSE: See Private SSE

Security Considerations

  • Public SSE exposes limited data to maintain privacy
  • Private SSE requires token generation for authentication
  • WebSocket connections use your API key for authentication
  • All streams respect rate limits and usage quotas
Next: WebSocket Connections