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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sansenjian/qq-music-api

v2.2.10

Published

QQ Music API - QQ 音乐 API koa2 实现

Readme

GitHub watchers GitHub stars GitHub forks node GitHub repo size GitHub package.json version GitHub GitHub open issues GitHub closed issues GitHub last commit GitHub top language Codecov

🍴 本项目 Fork 自 Rain120/qq-music-api,原项目已停止维护,此版本持续更新中
基于 Koa 2 与 TypeScript 的 QQ 音乐 API 服务,包含扫码登录、用户头像、MV 播放地址、批量接口等能力。
当前代码仅供学习与研究使用,不可做商业用途。

项目概览

  • 运行时:Node.js 20+
  • 服务框架:Koa 2
  • 开发语言:TypeScript
  • 路由系统:@koa/router
  • 文档系统:VitePress
  • 测试框架:Jest
  • 默认端口:3200

API 结构图

当前版本已包含扫码登录相关接口,并已完成 TypeScript 迁移。

qq-music

📖 详细 API 文档查看完整 API 文档

环境要求

本项目基于 Koa 2 + TypeScript,需要 Node.js 20.0.0+。

node -v

安装

方式一:克隆仓库

git clone [email protected]:sansenjian/qq-music-api.git
cd qq-music-api
npm install

方式二:NPM 安装

npm install @sansenjian/qq-music-api

在项目中使用:

const { spawn } = require('child_process');
const path = require('path');

const qqMusicPath = path.join(__dirname, 'node_modules', '@sansenjian/qq-music-api', 'app.js');

spawn('node', [qqMusicPath], {
	env: { ...process.env, PORT: '3200' },
	stdio: 'inherit',
});

项目启动

# 开发模式
npm run dev

# 生产构建
npm run build

# 生产运行
npm run start

# 运行测试
npm run test

# 启动文档站点
npm run docs:dev

项目默认监听端口为 3200

依赖版本说明(同步 package.json

生产依赖

| 依赖 | 当前版本 | | ----------------------- | --------- | | @koa/router | ^15.3.1 | | axios | ^1.13.6 | | date-fns | ^4.1.0 | | is-generator-function | 1.0.10 | | koa | ^2.16.1 | | koa-bodyparser | ^4.4.1 | | koa-static | ^5.0.0 | | reflect-metadata | ^0.2.2 |

开发依赖

| 依赖 | 当前版本 | | -------------------------------------------- | --------- | | @babel/core | ^7.23.0 | | @babel/plugin-transform-async-to-generator | ^7.23.0 | | @babel/preset-env | ^7.29.0 | | @babel/preset-typescript | ^7.28.5 | | @babel/register | ^7.23.0 | | @commitlint/cli | ^18.0.0 | | @commitlint/config-conventional | ^18.0.0 | | @types/jest | ^30.0.0 | | @types/koa | ^3.0.1 | | @types/koa__router | ^12.0.5 | | @types/koa-bodyparser | ^4.3.13 | | @types/node | ^25.3.3 | | @types/supertest | ^7.2.0 | | chalk | ^4.1.0 | | conventional-changelog-cli | ^4.0.0 | | eslint | ^8.57.0 | | eslint-config-standard | ^17.0.0 | | eslint-plugin-import | ^2.29.0 | | eslint-plugin-n | ^16.0.0 | | eslint-plugin-promise | ^6.0.0 | | husky | ^9.0.0 | | jest | ^30.2.0 | | lint-staged | ^15.0.0 | | nodemon | ^3.1.14 | | prettier | ^3.8.1 | | rimraf | ^6.1.3 | | sinon | ^21.0.1 | | supertest | ^7.2.2 | | ts-jest | ^29.4.6 | | ts-node | ^10.9.2 | | tsx | ^4.21.0 | | typescript | 5.7.3 | | vitepress | ^1.6.4 | | vue | ^3.5.29 |

当前主要能力

音乐与播放

  • 歌曲播放链接
  • 歌曲与专辑图片
  • 歌词与翻译歌词
  • MV 播放信息

歌手与歌单

  • 歌手热门歌曲、资料、相似歌手、关注数
  • 歌手 MV 与歌手专辑
  • 歌单分类、歌单列表、歌单详情
  • 排行榜列表与详情

用户与登录

  • 用户头像
  • 用户歌单
  • QQ 扫码登录
  • Cookie / 登录态相关接口

其他能力

  • 评论信息
  • 数字专辑
  • 电台列表
  • 首页推荐
  • 下载地址
  • 票务信息

文档入口

关于项目

灵感来源

参考内容

当前限制

  1. 部分用户能力仍依赖有效 Cookie。
  2. 上游 QQ 音乐接口字段可能变更,个别接口需要持续跟踪。
  3. 用户歌单接口仍在持续验证与调整中,详见 docs/TEST_USER_PLAYLISTS.md

贡献

We welcome all contributions. You can submit any ideas as pull requests or as GitHub issues.

维护者

原作者

本项目基于 Rain120 的开源项目,感谢原作者的贡献。

License

MIT

Copyright © 2019-present Rain120.
Fork maintained by sansenjian.