---
title: "获取匹配歌曲的 ID 列表"
method: GET
path: "/songs/ids"
tags: ["歌曲管理"]
---

# 获取匹配歌曲的 ID 列表

`GET /songs/ids`

与 /songs 共享过滤条件，仅返回 ID。用于「全选当前筛选范围」场景。

## Query parameters

- `type` string
- `keyword` string
- `path_prefix` string
- `genre` string
- `artist` string
- `album` string
- `language` string
- `style` string
- `year` integer
- `decade` integer
- `exclude_playlist_labels` string
- `sort` 'id' | 'title' | 'artist' | 'album' | 'duration' | 'added_at' | 'updated_at' | 'file_modified_at' | 'year' | 'genre' | 'file_size'
- `order` 'asc' | 'desc'

## Response `200`

成功返回 ID 列表

- object

## Other responses

- `500` — 服务器错误

## Changes

- **2026-07-13** `9f0f00626325` — 7 info
  - added the new optional `query` request parameter `album`
  - added the new optional `query` request parameter `artist`
  - added the new optional `query` request parameter `decade`
  - added the new optional `query` request parameter `genre`
  - …3 more
- **2026-07-06** `ace6861ad4ac` — 1 info
  - added the new optional `query` request parameter `exclude_playlist_labels`
- **2026-07-02** `f3f029d9bc4a` — 2 info
  - added the new optional `query` request parameter `order`
  - added the new optional `query` request parameter `sort`
- **2026-06-26** `be19914b7eed` — 10 warning
  - deleted the `query` request parameter `album`
  - deleted the `query` request parameter `artist`
  - deleted the `query` request parameter `decade`
  - deleted the `query` request parameter `exclude_playlist_labels`
  - …6 more

[Change history](https://skmtc.dev/songloft-org/apis/songloft-api/changes/songs/ids/get.md)

---

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