npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zingmp3-api-next

v1.0.4

Published

Downloads

13

Readme

ZingMp3 API

Based On ZingMp3API by Whoant. 💖Thanks a lot 💖

Installation

  npm i zingmp3-api-next

Features

Usage/Examples

  const { zing } = require("zingmp3-api-next");

Get Home

Get data on the homepage.

<!-- Promise -->
zing.get_home()
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_home();
  console.log(data);
})();

Get Song

Parameters:

  • id: string (required)

Example: https://zingmp3.vn/bai-hat/All-Falls-Down-Alan-Walker-Noah-Cyrus-Digital-Farm-Animals/ZW8WOI6U.html

=> The ID is: ZW8WOI6U

<!-- Promise -->
zing.get_song("ZW8WOI6U")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_song("ZW8WOI6U");
  console.log(data);
})();

Get Song Info

Parameters:

  • id: string (required)

Example: https://zingmp3.vn/bai-hat/All-Falls-Down-Alan-Walker-Noah-Cyrus-Digital-Farm-Animals/ZW8WOI6U.html

=> The ID is: ZW8WOI6U

<!-- Promise -->
zing.get_song_info("ZW8WOI6U")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_song_info("ZW8WOI6U");
  console.log(data);
})();

Get Song Lyrics

Parameters:

  • id: string (required)

Example: https://zingmp3.vn/bai-hat/All-Falls-Down-Alan-Walker-Noah-Cyrus-Digital-Farm-Animals/ZW8WOI6U.html

=> The ID is: ZW8WOI6U

<!-- Promise -->
zing.get_song_lyric("ZW8WOI6U")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_song_lyric("ZW8WOI6U");
  console.log(data);
})();

Get Chart

  • Home Chart
<!-- Promise -->
zing.get_home_chart()
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_home_chart();
  console.log(data);
})();
  • New Release Chart
<!-- Promise -->
zing.get_new_release_chart()
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_new_release_chart();
  console.log(data);
})();
  • Week Chart

Parameters:

  • id: string (required)
  • week: number (optional)(default: 0)
  • year: number (optional)(default: 0)

Example: https://zingmp3.vn/zing-chart-tuan/Bai-hat-Viet-Nam/IWZ9Z08I.html

=> The ID is: IWZ9Z08I

<!-- Promise -->
zing.get_week_chart("IWZ9Z08I")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_week_chart("IWZ9Z08I");
  console.log(data);
})();

Get Radio

<!-- Promise -->
zing.get_radio()
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_radio();
  console.log(data);
})();

Get New Feeds

Parameters:

  • id: string (required)
  • page: number (optional)(default: 1)

Example: https://zingmp3.vn/the-loai-nghe-si/Viet-Nam/IWZ9Z08I.html

=> The ID is: IWZ9Z08I

<!-- Promise -->
zing.get_list_by_genre("IWZ9Z08I")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_list_by_genre("IWZ9Z08I");
  console.log(data);
})();

Get Artist

Parameters:

  • name: string (required)

Example: "Alan-Walker"

<!-- Promise -->
zing.get_artist("Alan-Walker")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_artist("Alan-Walker");
  console.log(data);
})();

Get Hub

  • Hub Home
<!-- Promise -->
zing.get_hub_home()
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_hub_home();
  console.log(data);
})();
  • Hub Detail

Parameters:

  • id: string (required)

Example: https://zingmp3.vn/hub/Khuc-Nhac-Vui/IWZ9Z09A.html

=> The ID is: IWZ9Z09A

<!-- Promise -->
zing.get_hub_detail("IWZ9Z09A")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_hub_detail("IWZ9Z09A");
  console.log(data);
})();

Get TOP 100

<!-- Promise -->
zing.get_top_100()
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_top_100();
  console.log(data);
})();

Get List MV

Parameters:

  • id: string (required)
  • page: number (optional)(default: 1)
  • count: number (optional)(default: 15)
  • sort: string (optional)(default: "listen")

Example: https://zingmp3.vn/the-loai-video/Viet-Nam/IWZ9Z08I.html

=> The ID is: IWZ9Z08I

<!-- Promise -->
zing.get_list_mv("IWZ9Z08I")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_list_mv("IWZ9Z08I");
  console.log(data);
})();

Get Category MV

Parameters:

  • id: string (required)

Example: https://zingmp3.vn/the-loai-video/EDM-Viet/IWZ97FCE.html

=> The ID is: IWZ97FCE

<!-- Promise -->
zing.get_category_mv("IWZ97FCE")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_category_mv("IWZ97FCE");
  console.log(data);
})();

Get MV

Parameters:

  • id: string (required)

Example: https://zingmp3.vn/video-clip/Tup-Leu-Vang-Nguyen-Dinh-Vu-ACV/ZUZBBOFF.html

=> The ID is: ZUZBBOFF

<!-- Promise -->
zing.get_mv("ZUZBBOFF")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_mv("ZUZBBOFF");
  console.log(data);
})();

Get Playlist

Parameters:

  • id: string (required)

Example: https://zingmp3.vn/album/Today-s-EDM-Hits-The-Chainsmokers-Alan-Walker-Alesso-Topic/ZODAB8EF.html

=> The ID is: ZODAB8EF

<!-- Promise -->
zing.get_playlist("ZODAB8EF")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_playlist("ZODAB8EF");
  console.log(data);
})();

Get Suggested Playlists

Get Suggested Playlists at the bottom of playlist page.

Parameters:

  • id: string (required)

Example: https://zingmp3.vn/album/Today-s-EDM-Hits-The-Chainsmokers-Alan-Walker-Alesso-Topic/ZODAB8EF.html

=> The ID is: ZODAB8EF

<!-- Promise -->
zing.get_suggested_playlists("ZODAB8EF")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_suggested_playlists("ZODAB8EF");
  console.log(data);
})();

Get Events

Get Incoming Events

<!-- Promise -->
zing.get_events()
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_events();
  console.log(data);
})();

Get Event Info

Parameters:

  • id: string (required)

Example: https://zingmp3.vn/event/IWZ97FZF.html

=> The ID is: IWZ97FZF

<!-- Promise -->
zing.get_event_info("IWZ97FZF")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_event_info("IWZ97FZF");
  console.log(data);
})();

Search All

Search All (Includes Music, Playlist, Artist, Video)

Parameters:

  • keyword: string (required)

Example: "Alan Walker"

<!-- Promise -->
zing.search_all("Alan Walker")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.search_all("Alan Walker");
  console.log(data);
})();

Search by Type

Search by Type (Music || Playlist || Artist || Video)

Parameters:

  • keyword: string (required)
  • type: string (required)
  • page: number (optional)(default: 1)
  • count: number (optional)(default: 18)

Example: keyword: "Alan Walker", type: "song"

<!-- Promise -->
zing.search_by_type("Alan Walker", "song")
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.search_by_type("Alan Walker", "song");
  console.log(data);
})();

Get Recommend Keyword

Default suggestion keyword on the homepage

<!-- Promise -->
zing.get_recommend_keyword()
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_recommend_keyword();
  console.log(data);
})();

Get Suggestion Keyword

Suggestion keyword when you search

Parameters:

  • keyword: string (optional)
<!-- Promise -->
zing.get_suggestion_keyword()
.then(data => console.log(data))
or
<!-- async / await -->
(async() => {
  const data = await zing.get_suggestion_keyword();
  console.log(data);
})();