PHPackages                             metowolf/meting - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. metowolf/meting

ActiveLibrary[API Development](/categories/api)

metowolf/meting
===============

A powerful music API framework to accelerate development.

v1.5.11(4y ago)2.1k18.2k↑49.3%536[3 issues](https://github.com/metowolf/Meting/issues)[3 PRs](https://github.com/metowolf/Meting/pulls)3MITJavaScriptPHP &gt;=5.4.0CI failing

Since Jan 21Pushed 3mo ago38 watchersCompare

[ Source](https://github.com/metowolf/Meting)[ Packagist](https://packagist.org/packages/metowolf/meting)[ Docs](https://github.com/metowolf/Meting)[ RSS](/packages/metowolf-meting/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (33)Used By (3)

[![Meting](https://user-images.githubusercontent.com/2666735/30165599-36623bea-93a6-11e7-8956-1ddf99ce0e6f.png)](https://user-images.githubusercontent.com/2666735/30165599-36623bea-93a6-11e7-8956-1ddf99ce0e6f.png)

> 🍰 A powerful music API framework for Node.js

Introduction
------------

[](#introduction)

Meting is a powerful music API framework designed to accelerate music-related development. This is the **Node.js** version of the original PHP Meting project, providing unified APIs for multiple music platforms.

### Features

[](#features)

- **🎵 Multi-Platform Support** - Supports NetEase Cloud Music, Tencent Music, KuGou, Baidu Music, and Kuwo
- **🚀 Lightweight &amp; Fast** - Zero external dependencies, built with Node.js native modules only
- **📱 Modern Async/Await** - Promise-based APIs with full async/await support
- **🔄 Unified Interface** - Standardized data format across all music platforms
- **🔐 Built-in Encryption** - Platform-specific encryption and signing built-in
- **⚡ Chain-able API** - Fluent interface design for elegant code

Requirements
------------

[](#requirements)

- Node.js &gt;= 12.0.0
- No external dependencies required

Installation
------------

[](#installation)

Install via npm:

```
npm install @meting/core
```

Or via yarn:

```
yarn add @meting/core
```

Quick Start
-----------

[](#quick-start)

### Basic Usage

[](#basic-usage)

```
import Meting from '@meting/core';

// Initialize with a music platform
const meting = new Meting('netease'); // 'netease', 'tencent', 'kugou', 'baidu', 'kuwo'

// Enable data formatting for consistent output
meting.format(true);

// Search for songs
try {
  const searchResult = await meting.search('Hello Adele', { page: 1, limit: 10 });
  const songs = JSON.parse(searchResult);
  console.log(songs);
} catch (error) {
  console.error('Search failed:', error);
}
```

### Comprehensive Example

[](#comprehensive-example)

```
import Meting from '@meting/core';

async function musicExample() {
  const meting = new Meting('netease');
  meting.format(true);

  try {
    // 1. Search for songs
    const searchResult = await meting.search('Hello Adele');
    const songs = JSON.parse(searchResult);

    if (songs.length > 0) {
      const song = songs[0];
      console.log(`Found: ${song.name} by ${song.artist.join(', ')}`);

      // 2. Get song details
      const details = await meting.song(song.id);
      console.log('Song details:', JSON.parse(details));

      // 3. Get streaming URL
      const urlInfo = await meting.url(song.url_id, 320); // 320kbps
      console.log('Streaming URL:', JSON.parse(urlInfo));

      // 4. Get lyrics
      const lyrics = await meting.lyric(song.lyric_id);
      console.log('Lyrics:', JSON.parse(lyrics));

      // 5. Get album cover
      const cover = await meting.pic(song.pic_id, 300); // 300x300
      console.log('Album cover:', JSON.parse(cover));
    }

    // Switch platform and search again
    meting.site('tencent');
    const tencentResult = await meting.search('周杰伦');
    console.log('Tencent results:', JSON.parse(tencentResult));

  } catch (error) {
    console.error('Error:', error);
  }
}

musicExample();
```

API Documentation
-----------------

[](#api-documentation)

### Constructor

[](#constructor)

```
const meting = new Meting(server);
```

- `server` (string): Music platform ('netease', 'tencent', 'kugou', 'baidu', 'kuwo')

### Core Methods

[](#core-methods)

#### Platform Management

[](#platform-management)

```
meting.site(server)    // Switch music platform
meting.cookie(cookie)  // Set platform-specific cookies
meting.format(enable)  // Enable/disable data formatting
```

#### Search &amp; Discovery

[](#search--discovery)

```
// Search for songs, albums, or artists
await meting.search(keyword, {
  type: 1,
  page: 1,
  limit: 30,
});
```

#### Search Options

[](#search-options)

- `type` (number, optional) - Search category for providers that support it. NetEase uses `1` for songs (default), `10` for albums, `100` for artists, etc.
- `page` (number, optional) - Page number starting from 1. Defaults to `1`.
- `limit` (number, optional) - Number of results per page. Defaults to `30`.

#### Music Information

[](#music-information)

```
await meting.song(id)           // Get song details
await meting.album(id)          // Get album information
await meting.artist(id, limit)  // Get artist's songs
await meting.playlist(id)       // Get playlist content
```

#### Media Resources

[](#media-resources)

```
await meting.url(id, bitrate)   // Get streaming URL
await meting.lyric(id)          // Get song lyrics
await meting.pic(id, size)      // Get album artwork
```

### Supported Platforms

[](#supported-platforms)

PlatformCodeSearchSongAlbumArtistPlaylistURLLyricPictureNetEase Cloud Music`netease`✅✅✅✅✅✅✅✅Tencent Music`tencent`✅✅✅✅✅✅✅✅KuGou Music`kugou`✅✅✅✅✅✅✅✅Baidu Music`baidu`✅✅✅✅✅✅✅✅Kuwo Music`kuwo`✅✅✅✅✅✅✅✅### Data Format

[](#data-format)

When `format(true)` is enabled, all platforms return standardized JSON:

```
{
  "id": "35847388",
  "name": "Hello",
  "artist": ["Adele"],
  "album": "Hello",
  "pic_id": "1407374890649284",
  "url_id": "35847388",
  "lyric_id": "35847388",
  "source": "netease"
}
```

Development
-----------

[](#development)

### Running Examples

[](#running-examples)

```
# Install dependencies
npm install

# Run the example
npm start
# or
npm run example
```

### Running Tests

[](#running-tests)

```
# Run tests for all platforms
npm test
```

### Build from Source

[](#build-from-source)

```
# Build the library
npm run build

# Development mode with file watching
npm run dev
```

Error Handling
--------------

[](#error-handling)

The library uses Promise-based error handling. Always wrap API calls in try-catch blocks:

```
try {
  const result = await meting.search('keyword');
  // Handle success
} catch (error) {
  console.error('API Error:', error);

  // Try fallback platform
  meting.site('tencent');
  const fallback = await meting.search('keyword');
}
```

Rate Limiting
-------------

[](#rate-limiting)

To avoid being rate-limited by music platforms:

- Add delays between consecutive requests
- Don't make too many requests in a short time
- Consider implementing request queuing for heavy usage

```
// Example: Add delay between requests
await new Promise(resolve => setTimeout(resolve, 2000));
```

Important Notes
---------------

[](#important-notes)

- **Copyright Compliance**: Respect music platform terms of service and copyright laws
- **Platform Changes**: Music platform APIs may change without notice
- **Availability**: Some features may be restricted based on geographical location
- **Rate Limits**: Each platform has different rate limiting policies

Related Projects
----------------

[](#related-projects)

- [Original PHP Meting](https://github.com/metowolf/Meting) - The original PHP version
- [MoePlayer/Hermit-X](https://github.com/MoePlayer/Hermit-X) - WordPress music player
- [mengkunsoft/MKOnlineMusicPlayer](https://github.com/mengkunsoft/MKOnlineMusicPlayer) - Online music player
- [injahow/meting-api](https://github.com/injahow/meting-api) - RESTful API wrapper
- [yiyungent/Meting4Net](https://github.com/yiyungent/Meting4Net) - .NET version

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Author
------

[](#author)

**Meting Node.js** © [metowolf](https://github.com/metowolf), Released under the [MIT](./LICENSE) License.

> Blog [@meto](https://i-meto.com) · GitHub [@metowolf](https://github.com/metowolf) · Twitter [@metowolf](https://twitter.com/metowolf)

---

Made with ❤️ for the music community

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance55

Moderate activity, may be stable

Popularity56

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~54 days

Recently: every ~191 days

Total

31

Last Release

1810d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3

v1.3.3PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f02eb346ed2f45805784579a3397910a52ecb70996e0d30eed31e54d4ae2ebd?d=identicon)[metowolf](/maintainers/metowolf)

---

Top Contributors

[![metowolf](https://avatars.githubusercontent.com/u/2666735?v=4)](https://github.com/metowolf "metowolf (90 commits)")[![and0rw](https://avatars.githubusercontent.com/u/20942922?v=4)](https://github.com/and0rw "and0rw (7 commits)")[![hans362](https://avatars.githubusercontent.com/u/32535810?v=4)](https://github.com/hans362 "hans362 (3 commits)")[![lwl12](https://avatars.githubusercontent.com/u/10279535?v=4)](https://github.com/lwl12 "lwl12 (1 commits)")[![unknown-o](https://avatars.githubusercontent.com/u/51825113?v=4)](https://github.com/unknown-o "unknown-o (1 commits)")[![yiyungent](https://avatars.githubusercontent.com/u/16939388?v=4)](https://github.com/yiyungent "yiyungent (1 commits)")[![dodododooo](https://avatars.githubusercontent.com/u/17663910?v=4)](https://github.com/dodododooo "dodododooo (1 commits)")[![HenryQW](https://avatars.githubusercontent.com/u/5896343?v=4)](https://github.com/HenryQW "HenryQW (1 commits)")

---

Tags

apimusicphplightweightmusic apilightyphp music

### Embed Badge

![Health badge](/badges/metowolf-meting/health.svg)

```
[![Health](https://phpackages.com/badges/metowolf-meting/health.svg)](https://phpackages.com/packages/metowolf-meting)
```

###  Alternatives

[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)[nizarii/arma-rcon-class

ARC is a lightweight PHP class, that allows you connecting and sending commands easily to your BattlEye server, including Arma 3, Arma 2 and Arma 2: OA game servers.

444.0k](/packages/nizarii-arma-rcon-class)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
