Music

Search and filter music

Search the Magnific Music catalog. Filter by genre, mood, artist, premium status, and creation date range. Returns paginated results sorted by popularity by default.

get/v1/music

Request

  • Base URL: https://api.magnific.com
  • URL: https://api.magnific.com/v1/music
  • Auth: API key in header x-magnific-api-key

Query parameters

qstring

Full-text search query for music titles, artists, and tags

genrestring[]

Filter by genre. Comma-separated for multiple values

moodstring[]

Filter by mood. Comma-separated for multiple values

include-premiumboolean

Include premium music in search results. When false, only free music is returned

time_range'7d' | '30d' | '90d'

Filter by creation date, relative to current date

order_by'relevance' | 'popularity' | '-popularity' | 'created_at' | '-created_at' | 'title' | '-title' | 'seconds' | '-seconds' | 'bpm' | '-bpm'

Sort order for results. Prefix with "-" for descending. Defaults to "relevance" when a search query (q) is provided, otherwise defaults to "-popularity".

limitinteger

Number of results to return per page

offsetinteger

Number of results to skip for pagination

Response

OK

countinteger required

Total number of results matching the query

Example response

{
  "count": 150,
  "results": [
    {
      "favorites": 350,
      "file_url": "file_url",
      "cover_url": "cover_url",
      "is_active": true,
      "artist": {
        "name": "John Doe"
      },
      "moods": [
        {
          "name": "Happy"
        },
        {
          "name": "Energetic"
        }
      ],
      "created_at": "2000-01-23T04:56:07.000+00:00",
      "in_playlists": 15,
      "title": "Summer Vibes",
      "seconds": 225,
      "is_premium": true,
      "downloads": 1200,
      "genres": [
        {
          "name": "Electronic"
        },
        {
          "name": "Ambient"
        }
      ],
      "preview_url": "preview_url",
      "popularity": 85,
      "download_url": "download_url",
      "id": 1,
      "time": "3:45"
    },
    {
      "favorites": 350,
      "file_url": "file_url",
      "cover_url": "cover_url",
      "is_active": true,
      "artist": {
        "name": "John Doe"
      },
      "moods": [
        {
          "name": "Happy"
        },
        {
          "name": "Energetic"
        }
      ],
      "created_at": "2000-01-23T04:56:07.000+00:00",
      "in_playlists": 15,
      "title": "Summer Vibes",
      "seconds": 225,
      "is_premium": true,
      "downloads": 1200,
      "genres": [
        {
          "name": "Electronic"
        },
        {
          "name": "Ambient"
        }
      ],
      "preview_url": "preview_url",
      "popularity": 85,
      "download_url": "download_url",
      "id": 1,
      "time": "3:45"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.