Skip to main content

Protocol overview

The WebSocket relay at wss://scraping-api.55-tech.com/ws provides a bidirectional proxy. You connect to the gateway, send a JSON connect message, and the gateway relays all frames between you and the target through a geo-distributed agent.

Interactive playground

The /ws/docs endpoint returns the protocol schema:
For interactive WebSocket testing, use wscat:
Then paste:

Connect message (client → gateway)

Must be sent as JSON text within 10 seconds of connecting.

Fields

Response messages (gateway → client)

Connected

Sent once after the agent successfully connects to the target WebSocket.

Error

Sent when connection fails or an error occurs. The WebSocket is closed after this message.

Relayed frames

After the connected message, all subsequent frames are raw relay — no JSON wrapping. Text frames stay text, binary frames stay binary.

Close codes

Error scenarios

Frame flow diagram

Rate limiting

WebSocket connections consume 1 token from your rate limit bucket on connect (when the connect message is validated). Subsequent frames do not consume tokens. If your bucket is empty, the gateway sends an error and closes with 1008.

Testing with wscat

Testing with Python