Documentation

Wolfx WebSocket API

Subscribe to earthquake and tsunami feeds, filter the all_eew stream, and request cached JSON using text commands.

Last updated

How updates work

The server sends updated JSON whenever a feed you subscribe to changes. It sends a heartbeat when you connect and every minute thereafter. We recommend replying with ping, though the reply is optional.

Reusing connections

Reuse existing connections and avoid reconnecting in rapid succession. To receive updates from several sources over one connection, use the all_eew channel.

Aggregate subscriptions and filters

wss://ws-api.wolfx.jp/all_eew

The optional exclude query parameter takes a comma-separated list of feeds to omit. Use the feed names from the individual subscription URL paths.

wss://ws-api.wolfx.jp/all_eew?exclude=cenc_eew
wss://ws-api.wolfx.jp/all_eew?exclude=sc_eew,fj_eew,cq_eew

Set exclude when connecting. It applies only to automatic updates on that all_eew connection. Reconnect to change the list. If a source name is unknown, the server returns HTTP 400 during the WebSocket handshake.

You can still request cached JSON for an excluded public source by sending its query command over the same connection.

Individual subscriptions and query commands

Connect to an individual feed below to receive its updates. To retrieve its cached JSON, send the corresponding command over that connection or over all_eew.

SourceSubscription endpointQuery command
Sichuan earthquake early warningswss://ws-api.wolfx.jp/sc_eewquery_sceew
Japan Meteorological Agency (JMA) Earthquake Early Warningswss://ws-api.wolfx.jp/jma_eewquery_jmaeew
Fujian earthquake early warningswss://ws-api.wolfx.jp/fj_eewquery_fjeew
Chongqing earthquake early warningswss://ws-api.wolfx.jp/cq_eewquery_cqeew
China Earthquake Networks Center (CENC) earthquake early warningswss://ws-api.wolfx.jp/cenc_eewquery_cenceew
CENC earthquake informationwss://ws-api.wolfx.jp/cenc_eqlistquery_cenceqlist
JMA earthquake informationwss://ws-api.wolfx.jp/jma_eqlistquery_jmaeqlist
JMA tsunami informationwss://ws-api.wolfx.jp/jma_tsunamiquery_jmatsunami
JMA Nankai Trough and Hokkaido/Sanriku informationwss://ws-api.wolfx.jp/jma_special_eqquery_jmaspecialeq

For the JSON fields in each feed, see the Open API reference and the API homepage.

Connection check

ping

WebSocket message format

Common field

FieldDescription
typeMessage type or data source (string)

Heartbeat (heartbeat)

FieldDescription
typeheartbeat (string)
verServer version (number)
idUUID for this connection (string)
timestampTime the message was sent, in milliseconds (string)

Reply to ping (pong)

FieldDescription
typepong (string)
timestampTime the message was sent, in milliseconds (string)