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
| Feature | WebSocket | Public SSE | Private SSE |
|---|---|---|---|
| Data Completeness | Full | Truncated | Full |
| Authentication | API Key | None | Token Required |
| Bidirectional | Yes | No | No |
| Auto Reconnect | Manual | Built-in | Built-in |
| Use Case | Interactive apps | Public feeds | Private feeds |
Quick Start
- For WebSocket: See WebSocket Connections
- For Public SSE: See Public SSE
- 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