Spotify-like on-demand music startup Rdio is today launching an API that allows developers to take advantage of music playback and user account features, as well as gain income via an affiliate program.

Developers will able to build apps that can search, access and play all of the artists, songs, albums, playlists and top charts in Rdio’s 8 million song library. Apps can also be monetized via the company’s affiliate program, which pays commission fees for referring new subscribers and song purchases.

In addition to access to music, developers who use the API will have access to Rdio’s community features such as the ability to view popular songs across a user’s network, follow other users and view their music collections, and to modify personal collections and playlists.

The launch today features an oEmbed API, REST API, and Web Playback API. A playback API for iOS and Android apps will be added in the future.

Rdio’s offering a powerful array of features, although it’s worth noting that the service is currently only available in the US and Canada, meaning that any apps you build with its API will only be of use in those countries. Spotify offers a similar API for the European countries it operates in.

Full information, including the ability to sign up as a developer, will be published at developer.rdio.com at 10am PT today. Earlier this week, Rdio launched an OSX app, following on from its recent expansion onto Roku’s streaming media set-top boxes.