Lyrics Search
Search lyrics via the LrcApi public API (api.lrc.cx).
API
CODEBLOCK0
- - Returns LRC format (with timestamps) as INLINECODE1
- INLINECODE2 is optional but improves accuracy
- URL-encode Chinese/special characters
Usage
- 1. Fetch lyrics via
web_fetch on the API URL - The response is LRC format with
[mm:ss.xxx] timestamps and metadata lines at the top - Strip timestamps and metadata lines (credits, producer info at
[00:00]–[00:24]) for clean display - For printing: format as plain text with song title, artist, and credits header
Example
CODEBLOCK1
Notes
- - Public API may be slow; set a reasonable timeout
- If no results, try with only
title (omit artist) - If still no results, try alternate song name spellings
歌词搜索
通过LrcApi公共API(api.lrc.cx)搜索歌词。
API接口
GET https://api.lrc.cx/lyrics?title={标题}&artist={艺术家}
- - 返回LRC格式(含时间戳),内容类型为text/plain
- artist参数为可选,但可提高搜索准确度
- 中文/特殊字符需进行URL编码
使用方法
- 1. 通过web_fetch工具调用API接口获取歌词
- 返回结果为LRC格式,包含[mm:ss.xxx]时间戳,顶部为元数据行
- 去除时间戳及元数据行(位于[00:00]–[00:24]的致谢、制作人信息)以获得纯净显示
- 打印时:以纯文本格式呈现,包含歌曲标题、艺术家及致谢信息头部
示例
web_fetch(https://api.lrc.cx/lyrics?title=世界赠予我的&artist=王菲)
注意事项
- - 公共API响应可能较慢,请设置合理的超时时间
- 若无搜索结果,可尝试仅使用title参数(省略artist)
- 若仍无结果,请尝试歌曲名称的其他拼写方式