Public API
Read a station's live data from your own apps, widgets and bots.
Every Auvyra station has a public, read-only API: what's playing, the stream addresses, the schedule, news and lyrics. The Auvyra app is built on it, and you can use it the same way for a widget, a bot, a smart speaker skill or your own app.
It needs no key and no account. It only gives out what the station's public website already shows.
The basics
- Address. Every path is on the station's own website address, such as
https://radio.example.com/api/app/v1/now-playing. - Version. The app API is version 1, under
/api/app/v1, and every response carries anX-Auvyra-Api: 1header. Within version 1, fields are only ever added, never removed or changed in meaning. Read fields you know and ignore the rest. - From a browser. Responses under
/api/app/v1carryAccess-Control-Allow-Origin: *, so a web page on any site can call them. No cookies are sent or needed. - Times. Instants in JSON are ISO 8601 strings in UTC, apart from song times, which are Unix seconds as AzuraCast gives them.
- Caching. Responses say how long they can be kept, in
Cache-Control. Please respect it: there's no need to ask for now-playing more than every five seconds.
Errors
Errors have a short code and a message you can show to people as it is:
{ "error": "maintenance", "message": "We're upgrading the studio. Back at 6pm." }| Status | error | Meaning |
|---|---|---|
403 | app-off | The station has turned off listening in the Auvyra app, and with it this API. |
404 | unavailable | That feature is off, such as song requests. |
503 | maintenance | The website is closed for maintenance. See now-playing for whether the stream keeps going. |
503 | not-ready | The station hasn't finished its setup. |
Sending requests and shoutouts answer with { "ok": false, "message": "..." } instead. See below.
GET /api/app/v1/station
Who the station is. It's also how to check that an address is an Auvyra station: look for the auvyra object. Kept for up to 60 seconds.
{
"auvyra": { "api": 1, "version": "1.0.0" },
"id": "8d0f3c1e-…",
"name": "Night Harbor FM",
"tagline": "Radio for the small hours",
"description": "",
"url": "https://radio.example.com",
"logoUrl": "https://radio.example.com/media/logo.png",
"colors": { "primary": "#8B5CF6", "accent": "#A78BFA" },
"timezone": "Europe/London",
"features": { "requests": true, "shoutouts": true },
"app": {
"accent": "",
"welcome": "",
"startIn": "ask",
"tabs": { "schedule": true, "news": true },
"listen": { "recentlyPlayed": true, "listenerCount": false, "visualiser": true },
"links": [{ "label": "Shop", "url": "https://shop.example.com", "icon": "cart" }]
},
"maintenance": null
}appholds the station's Listener App settings. Empty strings mean "use the default": the station's colour, or its tagline.maintenanceisnull, or{ "message": "...", "keepsPlaying": true }while the website is closed.
GET /api/app/v1/now-playing
What's on, what's next, recent songs and the stream addresses. Kept for 5 seconds.
{
"state": "ok",
"hasTrackInfo": true,
"isOnline": true,
"listeners": null,
"live": {
"isLive": true,
"streamerName": "djana",
"host": { "name": "Ana Reyes", "imageUrl": "https://radio.example.com/media/4f2c…", "slug": "ana-reyes" }
},
"song": {
"title": "Paper Satellites",
"artist": "Halcyon Wire",
"album": "Low Orbit",
"art": "https://stream.example.com/api/station/1/art/abc.jpg",
"lyrics": "",
"playedAt": 1795539486,
"duration": 209
},
"next": { "title": "Next In Line", "artist": "Queue Band", "art": null },
"recent": [{ "id": 81, "title": "Harbor Lights", "artist": "The Tides", "art": null }],
"streams": [{ "url": "https://stream.example.com/listen/night_harbor/radio.mp3", "format": "mp3" }]
}- When nothing can be reported it is
{ "state": "unavailable" }, and never says why. streamsis best first. Play the first, and fall back to the next if it fails.listenersisnullunless the station shows its listener count on its website.hasTrackInfoisfalsewhen the stream works but AzuraCast has nothing to say about the song.songis thennull.live.isLiveistruewhile a presenter is broadcasting.streamerNameis the DJ account's name in AzuraCast.hostis who that is, when the station has linked it to a presenter, with their name, photo and theslugof their page at/presenters/{slug}. Without a presenter,hostcan still carry the DJ account's artwork from AzuraCast, with anullslug. It'snullwhen nobody is live, or nobody is known: showstreamerNamethen. See their picture while they're live.playedAtis when AzuraCast says the song started, in Unix seconds, anddurationis in seconds. Aspotifylink appears on the song when the station looks songs up on Spotify.
GET /api/app/v1/schedule
The show on now and the week ahead. Kept for 60 seconds.
{
"timezone": "Europe/London",
"current": null,
"upcoming": [
{
"name": "The Long Wave",
"startsAt": "2026-11-25T13:00:00.000Z",
"endsAt": "2026-11-25T17:00:00.000Z",
"presenters": ["Mei Lin"],
"artworkUrl": "https://radio.example.com/media/long-wave.webp",
"description": "Ambient music, all afternoon, with no talking."
}
]
}Times are in UTC. Show them in timezone, the station's own, or in the listener's.
GET /api/app/v1/news
The 30 latest published news stories, newest first. Kept for 60 seconds.
{
"items": [
{
"id": "3b1e…",
"title": "New transmitter on the north pier",
"summary": "Our new transmitter went live on Tuesday night…",
"imageUrl": "https://radio.example.com/media/pier.webp",
"category": "Station news",
"url": "https://radio.example.com/news/new-transmitter",
"publishedAt": "2026-11-23T18:00:00.000Z",
"blocks": [
{ "type": "paragraph", "text": "Our new transmitter went live on Tuesday night." },
{ "type": "image", "url": "https://radio.example.com/media/mast.webp", "alt": "The new mast" }
]
}
]
}summary is plain text, 200 characters at most. blocks is the story itself, ready to show without parsing HTML. Each has a type:
type | Fields |
|---|---|
heading, paragraph, quote, code | text |
list | ordered, and items, a list of strings |
image | url, alt |
rule | none |
Show a block type you don't know as nothing, or link to url instead.
GET /api/app/v1/requests
Songs that can be requested. Search with ?q=: every word must match the title, artist or album. At most 50 are returned, with total saying how many matched. Kept for 30 seconds. Answers 404 while requests are off.
{
"total": 69,
"songs": [{ "requestId": "a1b2c3", "title": "Harbor Lights", "artist": "The Tides", "album": "Coast", "art": null }]
}POST /api/app/v1/requests
Requests a song. Send JSON:
{ "requestId": "a1b2c3" }| Status | Body |
|---|---|
200 | { "ok": true, "message": "Requested. Listen out for it." } |
400 | { "ok": false, "message": "That song can't be requested." } |
409 | { "ok": false, "message": "This song or artist played recently. Try again a bit later." }. AzuraCast said no, and the message says why. |
429 | Too many requests. See limits. |
POST /api/app/v1/shoutouts
Sends a shoutout to the station. It waits for the station's approval, like one sent from the website. Send JSON:
{ "name": "Sam", "message": "Hello from the night shift at the bakery!" }name is up to 60 characters, and message 3 to 280. The answer is 200 with { "ok": true, "message": "..." }, or 400 with { "ok": false, "message": "...", "fields": { "message": "Write a little more" } }, where fields names what to fix.
Limits
Requests and shoutouts have the same limits as the website's forms, over 15 minutes:
| Per listener | Whole station | |
|---|---|---|
| Song requests | 3 | 60 |
| Shoutouts and other forms | 8 | 120 |
The per-listener limit applies when the station sets TRUST_PROXY, so it can tell listeners apart. Otherwise the whole-station limit applies. Reading is not limited, but keep to the cache times above.
Lyrics
GET /api/public/lyrics returns the words to the song on air, and only that song. It's used by the station's own website, so it doesn't carry the CORS header: call it from a server, or from a page on the station's own address.
{
"title": "Paper Satellites",
"artist": "Halcyon Wire",
"playedAt": 1795539486,
"duration": 209,
"offset": -2.5,
"text": "Paper satellites falling\nOver the harbor lights",
"lines": [
{ "at": 0, "text": "Paper satellites falling" },
{ "at": 12.4, "text": "Over the harbor lights" }
],
"instrumental": false,
"source": "lrclib",
"serverTime": 1795539531234
}linesisnullwhen the words aren't timed. Each line'satis in seconds from the start of the song, and an emptytextis a gap in the singing.- To find the line being sung now:
seconds = now / 1000 - playedAt - offset, then take the last line whoseatis at or beforeseconds.offsetis the station's lyrics timing.serverTimeis the station's clock in milliseconds, so you can correct for a device whose clock is wrong. sourceisstationfor lyrics from the station's own music files,lrclibfor LRCLIB, ornullwhen there are none. Credit LRCLIB when you show its lyrics.- When there are no words,
textandlinesarenull.instrumentalistruefor a track known to have none.
Lyrics are protected by copyright. Show them only where the station is allowed to.
Feeds
| Address | What it is |
|---|---|
/feed.xml | RSS: the 20 newest news stories and articles. |
/schedule.ics | The next four weeks of shows, as a calendar file to subscribe to. |
/embed | A small player for an iframe on another website. Copy the code from the Site Builder. |
/api/health | {"status":"ok"} with 200 while the station is up, for monitoring. |
Example
The song on air, from a terminal:
curl -s https://demo.auvyra.org/api/app/v1/now-playing | jq '.song | "\(.artist) - \(.title)"'And from a web page on any site:
const station = "https://demo.auvyra.org";
const response = await fetch(`${station}/api/app/v1/now-playing`);
const { state, song, streams } = await response.json();
if (state === "ok" && song) console.log(`${song.artist} - ${song.title}`, streams[0]?.url);The API Reference lists Auvyra's other endpoints, which are for its own pages and dashboard.