This service a fan project and neither directly or indirectly affiliated with SomaFM or Last.fm. The source code for this service is available on GitHub for anyone who'd like to improve upon it or run their own copy. If you encounter any problems please report an issue.

Version: ...
Socket.io: ...
Connected clients: ...
Uptime: ... seconds

Stations

The service currently provides data for the following stations. Stations turn red if they haven't received a new track within 20 minutes. A red station my indicate a problem, however some stations have extremely long tracks.

API

REST Endpoints

GET /api/v1/version

Returns the version of the SomaScrobbler API server.

Sample response:


			

GET /api/v1/stations

Returns an object containing a list of SomaFM radio stations.

Sample response:


			

GET /api/v1/stats

Returns an object containing the number of connections, uptime, and last update times for each station in milliseconds in UTC.

Sample response:


			

GET /api/v1/nowplaying/{stationId}

Returns metadata about the currently playing track for a given SomaFM station.

Sample response:


			

Socket.io API

Load the Client Library

Connect to the SocketIO Endpoint

Subscribe to SomaFM Stations

To receive track metadata you need to subscribe to each station using the station ID by emitting a subscribe event.


			

You will stop receiving updates if you emit an unsubscribe event.



			

Receive Track Metadata

Track metadata is provided by the track event.


			

Here's what a track object might look like:



			

Example

Here's a complete example. Want to see this in action? Scroll down to the demo that's running this very bit of code.



			

Demo

Station Time Artist Track