Search Music

Use the search command to search for songs across platforms, supporting multi-platform simultaneous search, pagination, and custom search types.

Basic Usage

mg search <search-term> [options]

search-term is the keyword to search for, which can be a song name, artist name, etc.

Examples

# Search on the default platform (NetEase)
mg search "Daylight"

# Specify result count and page number
mg search "Daylight" --limit 10 --page 2

# Specify search type
mg search "Jay Chou" --type 1

Options

OptionDescriptionDefault
-s, --server <source...>Music platform(s) (repeatable)netease
-a, --api <url>Custom API endpoint
-t, --type <type>Search type1
-p, --page <number>Page number1
-l, --limit <number>Results per page30

Search Types

The --type parameter controls the search type:

ValueDescription
1Song
100Artist
1000Album
1004Playlist
1006Lyrics
1009User

You can specify multiple platforms simultaneously, and results will be merged:

mg search "Daylight" --server netease

The output shows which platform each result comes from:

netease|1372188635 	Daylight David Kushner

Search Results

Search results display the following information:

  • Platform and ID: platform|songID, usable with the song or preview command
  • Song Name: Displayed in bold
  • Artist: Displayed in gray
 netease|1372188635 	Daylight  David Kushner
 netease|1387193847 	Blue and White Porcelain  Jay Chou