#
Search Artist
easily search for artists and obtain comprehensive data.
#
Usage
- Import the Function
import YoutubeMusic from "youtube-music.js";
- Invoke the Function
YoutubeMusic.searchArtists("Adam Lambert")
.then((response) => {
// Handle the response data here
console.log(response);
})
.catch((error) => {
// Handle errors here
console.error(error);
});
[
{
id: "UCE0e75AsD74BLP07SfM6OzQ",
name: "Adam Lambert",
imageURL:
"https://lh3.googleusercontent.com/fz8AtaBkwO6hhnnDbVpdW1goeb7cqsVZH84OE2H9MM0judCJzF2D7N060yLKH-ARnh0YMh2BTNDUUPA=w800-h800-p-l90-rj",
subscribers: "1.69M subscribers",
},
{
id: "UCEPMVbUzImPl4p8k4LkGevA",
name: "Queen",
imageURL:
"https://lh3.googleusercontent.com/_Qx50zW4-diO8SuAKhaccaNLyTvObgE-TQv1jYS4M9Kma6llb3s-IHpBBvuZAkPh88lHvXTQGaWS7aE=w800-h800-p-l90-rj",
subscribers: "17.2M subscribers",
},
{
id: "UCGKXb1syicud01CJOOFRykg",
name: "Lady Gaga",
imageURL:
"https://lh3.googleusercontent.com/bbLc-H4LZsGO8-WjNtPE6GTO5YJoMucSPlzC3oHPANS948X9wRgSDfB65ufpk1l0rTyXUPPM0shS7cU=w800-h800-p-l90-rj",
subscribers: "23.5M subscribers",
},
{
id: "UCJLsuSyse0TrU37idrhUfOg",
name: "Little Big Town",
imageURL:
"https://lh3.googleusercontent.com/Nz3c-Z7tS8aJ3SEOt5f95BN5w1MsJPpIlhdC8uhs0cfDjEoVLSQPN1ykx-rUWrFe5xBRQyNdpPl9Ig8=w800-h800-p-l90-rj",
subscribers: "872K subscribers",
},
{
id: "UCr3FznlH-3jNyU3fi-GMo2w",
name: "Sigala",
imageURL:
"https://lh3.googleusercontent.com/2d6VohF8TmYJvqCJF5IV4zvY2ShIEZycEMwH0nHe3W2QCUlTa0w-A8ei0Rddr96luaftXKwVRdojBbM=w800-h800-p-l90-rj",
subscribers: "1.25M subscribers",
},
{
id: "UCuACQmW04T3v9Mz_1_suFYw",
name: "Avicii",
imageURL:
"https://lh3.googleusercontent.com/TH3IXs5FL0GWk4BWPylXomZ_tUFV3sQQz8IaK1Hhw4sTTbFkCQlUXwAErsMvnoqjRxR5L1nXrsinYg=w800-h800-p-l90-rj",
subscribers: "20.8M subscribers",
},
{
id: "UCKRIF0xYNAa6sekEGB021tQ",
name: "Karaoke/Tribute - Adam Lambert",
imageURL:
"https://lh3.googleusercontent.com/uC_J2fci7rpzMwJiukB2e5d_gBptZyW0Gw8EyPyaxnwOglzc_N7gsbGqWq5FTXYHeqQOxWgYIqg8jooR=w800-h800-l90-rj",
subscribers: "6 subscribers",
},
{
id: "UC0VMQKNDWhfuCVMgUcmhw-A",
name: "Adam Lambert Films",
imageURL:
"https://lh3.googleusercontent.com/UfJnPBu1nMmXTfv2vDuRwFspHBaWbGY8AwWYBGY6Xivtv6fGHaup7uoboUaEV7D0T_HaxDf3fk8rZVQ=w800-h800-l90-rj",
subscribers: "1 subscriber",
},
{
id: "UCi-kAl0YSpCJOt7Irwylx6A",
name: "Adam Levine",
imageURL:
"https://lh3.googleusercontent.com/dJXle5j1u5f2jW7xxJRhDRzcdr4qrF-LjQYm0S2WMCmJqe0-YSHZ9dFG4NTmUdiSyUTJur_LhS6pBc8=w800-h800-p-l90-rj",
subscribers: "99.7K subscribers",
},
{
id: "UCVk7Jk5_9Ywza3JCg5pC7vQ",
name: "Kris Allen",
imageURL:
"https://lh3.googleusercontent.com/a-/ALV-UjX-jSGZavFAbeJ6CU4Rl_NXebILj4VWaa4r1-09fHFIgXA=w800-h800-l90-rj",
subscribers: "52.1K subscribers",
},
{
id: "UCOhzmJT0wzDTVqBs1BFcMsA",
name: "Adam Nowak",
imageURL:
"https://lh3.googleusercontent.com/GBhAzYyznParhHihlQtehsD1_cc7oa14TMb3cjVIu0En5uyZd_2bjvdFJ4F8pTaKc7biEKo6fQfX7GxlDw=w800-h800-l90-rj",
subscribers: "89 subscribers",
},
{
id: "UCo5bkOUhQ98RiwmmCt42gZA",
name: "Gary Jules",
imageURL:
"https://lh3.googleusercontent.com/XxxJ4bpnMT0AIuhGoLuaG1RdIjyyekoO_T8hKYG2WI2NXGUsbrhfXeDn1FV95CJ2lRCmM2kOqa3k01E=w800-h800-p-l90-rj",
subscribers: "9.14K subscribers",
},
];
#
Function Parameters
#
Important Notes
- Provide a precise and complete artist name for accurate search results.
- Handle the API response and errors appropriately in your application logic.