I make a small radio app, Signal Live Radio, and its station directory comes from Radio Browser (radio-browser.info), a free, community-run database of internet radio streams. If you've ever wanted to build something that plays "the stations near here", it's a great place to start. Here's how to query it.
1. Pick a server
Radio Browser runs several mirrors. Their docs ask clients to look up the server list instead of hard-coding one, and to send a descriptive User-Agent.
curl -s https://all.api.radio-browser.info/json/servers
For the examples below I use de1.api.radio-browser.info.
2. Search by state
curl -s -A "my-radio-app/1.0" "https://de1.api.radio-browser.info/json/stations/search?countrycode=US&state=Texas&hidebroken=true&order=clickcount&reverse=true&limit=10"
-
hidebroken=truedrops streams that failed the last check. -
order=clickcount&reverse=trueputs the most-played stations first. - Each result has
url_resolved, which is the stream URL you hand to your audio player.
3. Search near a point
Stations that have coordinates can be searched by distance (in meters):
curl -s -A "my-radio-app/1.0" "https://de1.api.radio-browser.info/json/stations/search?geo_lat=40.71&geo_long=-74.00&geo_distance=20000&hidebroken=true&limit=20"
To go from a ZIP code to a point, you need a ZIP-to-coordinates table. The US Census Bureau publishes a free ZCTA "gazetteer" file with a center latitude and longitude for each ZIP Code Tabulation Area. Load it once, look up the ZIP, then run the geo search.
4. Don't trust geo alone
Not every station has coordinates, so a geo-only search misses some. A practical approach is to merge two queries, one by distance and one by state, then dedupe on stationuuid.
5. Be a good citizen
- Send a real User-Agent.
- When a user actually plays a station, call
/json/url/{stationuuid}. That counts the click, which helps keep the popularity ranking useful for everyone. - Cache results, because station lists don't change minute to minute.
The app
If you just want to listen instead of build, Signal Live Radio is free with ads. Type a ZIP code to see live stations for that area, browse by genre, and save Presets. No account. It streams over the internet and is not an AM/FM tuner.
- iPhone / Mac (Apple M1 or later): https://apps.apple.com/us/app/signal-live-radio/id6826375725
- Android: https://play.google.com/store/apps/details?id=com.appfactory.staticking&referrer=utm_source%3Ddev_to%26utm_medium%3Dlisting%26utm_campaign%3Dfree_ads
Search "Signal Live Radio" on the App Store or Google Play.
Top comments (0)