Our goal with Mile Zero will forever to be accessible, to everyone. That's why, we want to give you access to all of our major API networks and Stream URLs!
From implementing us into your video game, all the way through to integrating us through a million(-and-one) features! Save the link, and come back here any time, it's not going anywhere!
Streams
Well. This bit is simple. We have three streams, "and if you manage to get them confused, i'll be the one calling you a miracle maker" - Richie. Take your pick, use what you can handle.
Super Quality (AAC Streaming):
https://radio.milezero.live/radio
High Quality (320-mp3 Streaming):
https://radio.milezero.live/radio-320.mp3
Low Quality (128-mp3 Streaming):
https://radio.milezero.live/radio-128.mp3
API Stuff
I'm gonna be honest, I'm not a developer, so I can't explain these. However my developer has told me that these could be very important to you, and helpful for you to use. So 'ave a gander!
Now-Playing Song API:
https://hub.milezero.live/api/public/nowplaying
Recently-Played Song API:
https://hub.milezero.live/api/public/history?limit=6
Timetable API:
https://hub.milezero.live/api/public/timetable
Request API:
https://hub.milezero.live/api/submit-request
How to Use the Request API
The Mile Zero Request API allows applications and websites to submit song requests, shoutouts, and general messages directly to the station.
Endpoint
POST https://hub.milezero.live/api/submit-request
Request Headers
Send your request with the following headers:
Content-Type: application/jsonAccept: application/json
Request Body
The API expects a JSON object containing three fields:
| Field | Type | Description |
|---|---|---|
username |
String | The name of the person submitting the request. Use "Anonymous" if no name is provided. |
message |
String | The song request, shoutout, or message to send to the station. |
type |
String | The request category: song, shoutout, or other. |
Request Types
song- Submit a song request. Include the artist and track title in themessagefield, optionally followed by a dedication.shoutout- Send a shoutout to someone special.other- Send a general message to the station.
Example Requests
1. Song Request
POST /api/submit-request HTTP/1.1
Host: hub.milezero.live
Content-Type: application/json
Accept: application/json
{
"username": "Joe",
"message": "nimino - Eat Me Better | Playing this one for everyone listening!",
"type": "song"
}
2. Shoutout
{
"username": "Joe",
"message": "Shoutout to everyone in the Mile Zero community!",
"type": "shoutout"
}
3. General Message
{
"username": "Joe",
"message": "Loving the station! Keep up the great work.",
"type": "other"
}
Submitting Requests with cURL
You can test the API from a terminal using cURL:
curl -X POST \
https://hub.milezero.live/api/submit-request \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"username": "Joe",
"message": "nimino - Eat Me Better",
"type": "song"
}'
Responses and Errors
- Successful response: The API returns a successful HTTP status when the request is accepted.
- HTTP error: A non-successful response includes an HTTP status code and may include an error message in the response body.
- 403 Forbidden: The request may have been blocked or denied.
Always check the HTTP status code to determine whether a submission was successful.
Important Notes
- For song requests, format the
messageasArtist - Track Title. You can optionally append a dedication using|followed by your message. - The API implementation defaults a blank username to
Anonymous. - The API's exact response schema, rate limits, and additional validation rules are not defined in the client implementation. Consult the API backend for those details.
Hope This Helps!
Hey! I mean it! I hope all of this helps you with whatever project you have your eyes set on doing, and whatever it is, i hope your inclusion of us makes it EVEN better! <33