---
title: "枚举歌曲音频轨道"
method: GET
path: "/songs/{id}/tracks"
tags: ["歌曲管理"]
---

# 枚举歌曲音频轨道

`GET /songs/{id}/tracks`

用 ffprobe 探测该歌曲文件的所有音频流，返回每条流的 index、codec、language、title。如果 ffprobe 不可用或执行失败，返回空数组而不报错。

## Path parameters

- `id` integer, required

## Response `200`

音频轨道列表

- HandlersTrackItem[]
  - `codec` string
  - `index` integer
  - `language` string
  - `title` string

## Other responses

- `400` — 无效的歌曲 ID
- `404` — 歌曲不存在

---

[API](https://skmtc.net/songloft-org/apis/songloft-api.md) · [All operations](https://skmtc.net/songloft-org/apis/songloft-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/songloft-org/songloft-api/revisions/d5abb8b643e9/schema)
