Exfm API

We're thrilled to share the Exfm API with our amazing community of music lovers! Our API is intended for 3rd party sites and apps to build upon the Exfm social music platform. We’ve got great data and services and took great care to make it simple and easy to use. We hope you’ll be inspired to build something awesome with it. We can't wait to see what you make!

Please do not use our API to download songs. Exfm is for streaming only.

If you'd like your site to interact with the Exfm Site Player, have a look at our Javascript API.

We’d love to hear about what you’re working on, get your feedback, or answer any questions. Please don’t hesitate to contact us at api@ex.fm.

Enjoy!

Getting Started
Current Version
The current version is 3. All API calls should be directed to ex.fm/api/v3
Authentication
Some calls require authentication. To authenticate, send username and password parameters. Many calls are paginated. To paginate use start and results parameters.
Client ID
You must include a client_id parameter with every call. Email us at api@ex.fm to obtain a client_id for your application.
Response Format
All responses are returned in JSON. For JSONP, add a callback parameter.
User
/user/dan GET
Get a user's profile information.
Get a user's loved songs (paginated).
Get a user's followers (paginated).
Get users a user is following (paginated).
Get the IDs of the users the user is following.
Get sites the user is following (paginated).
Get a feed of songs loved by users the user is following (paginated).
Get a feed of a user's activity, including loved songs, shared songs, and followed users (paginated).
Get a feed of a user's loved songs (paginated).
Get a feed of actions being perfomed on the user, such as loving of songs the user has loved (AKA relove) and following the user (paginated).
Search for users by username or email address (paginated).
Follow a user (authentication required).
Un-Follow a user (authentication required).
/user POST
Create a new user (authentication required).
required parameters:
  • username (Lowercase letters, numbers, and underscores only. Must start with a letter. 2 - 25 characters.)
  • password (4 - 32 characters.)
  • email
/me GET
Shortcut to get the logged in user's profile (authentication required).
/me/feed GET
Shortcut to get the logged in user's feed (authentication required, paginated).
Song
Get information about a song by Exfm song ID.
Get information about a song by the song URL. The URL can be a direct link to an mp3 file or a Soundcloud or Bandcamp track page. If the URL is not already in Exfm a new song record will be created.
Search for songs by title or artist (paginated).
Love a song (authentication required).
optional parameters:
  • source (the source url song was loved from)
  • context (if loved from another user, send username)
Un-Love a song (authentication required).
Get a hierarchical representation of a song's loves.
Site
Get recent songs, followers, and metadata of the website.
Get the website's songs (paginated).
Get users currently listening to songs on the website.
Get users following the website (paginated).
Follow the website (authentication required).
Unfollow the website (authentication required).
Get the profile for the user who owns this website.
Get sites that have been featured (paginated).
Artist
Get an artist's profile information.
Explore
Get the current trending songs (paginated).
Get the trending songs from a specified date (paginated).
Get the current trending songs filtered by a tag (paginated).
Get the trending songs filtered by a tag from a specified date (paginated).
Get the songs that are currently trending among the users being followed by the specified user (paginated).
Get the songs that were trending on the date specified among the users being followed by the specified user (paginated).
Get songs with specified tags. Specify tags in the URL after /explore/ as an asterisk separated list. In this example we're getting all songs that have all the tags "rock", "rap", and "country." (paginated).
/sotd GET
Get a list of Sites of the Day (paginated).
/aotw GET
Get a list of Albums of the Week (paginated).