If you do this for a radio station, then they can provide this data through the XSLT Icecast function. Some random old XSLT examples for providing stream metadata that I did at some point.
Another option is to run Icecast 2.4.1 or add two files (xml2json.xsl status-json.xsl) to the old version.
Please note that only Icecast 2.4.1 or later supports the addition of CORS / ACAO headers, which may be required to access data from a website / website.
If you do not directly cooperate with the radio station and cannot ask them to do this, do not pay attention to this answer. Someone might find this helpful though.
source share