For industry group 24/7 multiple station monitoring and recording, please contact sales@dar.fm.

go

Stream Record API

Allows you to record an Internet radio stream and pass the file to a third party storage site.


Example Requests (recording stations):

MUSIC Station

Station name: Hot 97
Call letters: WQHT
Style/format: Music
URL: http://provisioning.streamtheworld.com/pls/WQHTFM.pls
Duration: 60 minutes
User account: joeuser@domain.com

API call to record:

Example of how it might look on a page:

Record Record WQHT

HTML Source code:

TALK Station

Show name: The Dennis Miller Show
Call letters: WSYB
Style/format: News, Talk, Sports
URL: http://provisioning.streamtheworld.com/pls/WSYBAM.pls
Duration: 2 hours
Show time: Monday - Friday (3-5 PM EST)
User account: joeuser@domain.com

API call to record:

Example of how it might look on a page:

Record Record The Dennis Miller Show on WSYB AM

HTML Source code:



Parameters:

user_email (required): Uses this email as DAR.fm account, creates it if one doesn't exist. Maximum 100 characters. Must be in standard format: username@domain.tld

stream_url (required): Station to be recorded. Maximum 250 characters. Must be Icecast / Shoutcast format ending in .pls or .m3u.

partner_token (required): A unique partner token is required. You will need to create your own partner token and use that with all queries.

format_id (optional): A numeric value which identifies the type of content being recorded. Valid options are: 101 (talk radio: will break the file into 15 minute chunks) or 103 (music). Default is 103.

source_name (optional): Friendly name of station, spaces are OK (Example: 'Power 103'). Maximum 100 characters.

call_sign (optional): Call letters of the radio station that is being recorded (Examples: KFUN, WABT or Jazz88.3). Default is 'unknown'. Maximum 20 characters.

show_title (optional): The name of the show being recorded. (Example: 'The Glenn Beck Program'). Maximum 100 characters.

start_time (optional): Time when the recording should start. Valid options are: GMT YYYY-MM-DD 24:00:00, or now (all lower case). Default is now.

duration (optional): The number of minutes that you want to record. This should be a natural number (Examples: 60, 120, 180, 240, or 300). Default is 240.

frequency (optional): How often the show should be recorded. Default is 'once'. Valid options are:



stream_type (optional): Another way to categorize and break up content being recorded. Valid options are: solid, chunk, and unknown. You should set to 'solid' for streams which do not contain meta data (ID3 tags). You should set to 'chunk' for streams that do contain meta data (ID3 tags). If you are not sure you can set it to 'unknown' which will cause DAR.fm to look at the format_id value. The system will use 'chunk' for 103 and 'solid' for 101. The default is 'unknown'.




Example Response From Server:

<mp3tunes xml:space="preserve">
<record_job_id>12393</record_job_id>
</mp3tunes>



Sample PHP Code

$url = "";
$url .= "http://ws.dar.fm/api/v1/streamRecord?output=xml";
$url .= "&user_email=" . urlencode ( $this->user_email );
$url .= "&stream_url=" . urlencode ( $this->stream_url );
$url .= "&partner_token=" . urlencode ( $this->partner_token );
$url .= "&start_time=" . urlencode ( $this->start_time );
$url .= "&duration=" . urlencode ( $this->duration );
$url .= "&show_title=" . urlencode ( $this->show_title );
$url .= "&format_id=" . urlencode ( $this->format_id );
$url .= "&call_sign=" . urlencode ( $this->call_sign );
$url .= "&frequency=" . urlencode ( $this->frequency );
$url .= "&stream_type=" . urlencode ( $this->stream_type );



go

See missing stations or shows? Want to make corrections?
Now you can change the guide and make DAR.fm better for everyone.