npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@radiolise/api

v1.0.1

Published

Express API server that powers Radiolise and its metadata retrieval

Downloads

12

Readme

@radiolise/api

version license

Express API server that powers Radiolise and its metadata retrieval.
Provides clients with title information from ICY radio streams.

Setup

Before setting up your own instance, check out https://gitlab.com/radiolise/radiolise.gitlab.io/-/blob/master/setup.md. The preferred method is to use Docker with Compose.

Usage

Official client library

It's recommended to use the official JavaScript wrapper if your code has access to browser APIs. See @radiolise/metadata-client.

Manual WebSocket interaction

If your code doesn't belong to a web app, you may want to establish a WebSocket connection manually. The steps described below are language-agnostic.

In your app, connect to the official backend or provide your own instance URL:

wss://backend.radiolise.com/api/data-service

Send a JSON payload with the URL of the station you want to subscribe to:

{
  "action": "subscribe",
  "data": {
    "url": "https://liveradio.swr.de/sw282p3/swr3/play.mp3"
  }
}

You should get a message like this on each title update:

{
  "action": "setTitle",
  "data": {
    "title": "Always look on the bright side of life / Monty Python"
  }
}

Parse the message as JSON and the title can be extracted (e.g. .data.title).

To unsubscribe, just send:

{
  "action": "unsubscribe"
}

Whenever the server encounters an error, it's reported like this:

{
  "action": "reportError",
  "data": {
    "type": "malformedPayload",
    "detail": "<optional detail message, omitted for most errors>"
  }
}

See the source code for details on error types: https://gitlab.com/radiolise/radiolise.gitlab.io/-/blob/master/packages/common/index.ts

HTTP interaction

Mainly implemented for backward compatibility with the deprecated PHP service (https://gitlab.com/radiolise/deprecated-service). Prefer WebSockets where possible as they allow quick, bidirectional and – in this case – more private communication.

Official URL of the HTTPS endpoint:

https://backend.radiolise.com/api/v1/metadata

Getting metadata using JSON requests:

POST /api/v1/metadata HTTP/1.1
Host: backend.radiolise.com
Content-Type: application/json

{"url":"https://liveradio.swr.de/sw282p3/swr3/play.mp3"}

Using query parameters:

Warning: Query parameters are often persisted in server logs, and with the client periodically sending a stream URL, the server owner could find out about when users are listening to which stations without using any further tools.

GET /api/v1/metadata?url=https://liveradio.swr.de/sw282p3/swr3/play.mp3 HTTP/1.1
Host: backend.radiolise.com

A typical response:

{
  "content-type": "audio/mpeg",
  "description": "SWR3",
  "genre": "Pop Music",
  "name": "SWR3 MP3 128",
  "title": "Always look on the bright side of life / Monty Python",
  "url": "https://www.swr3.de/"
}

License

MIT

Copyright (c) 2023-present Marco Bauer