Spotify歌词API提供对Spotify上数百万首歌曲的同步歌词的即时访问。该API专为开发人员、音乐爱好者和应用程序创建者设计,您只需传递一个Spotify曲目ID即可实时检索完整的歌曲歌词。无论您是在构建一个卡拉OK应用程序、音乐教育平台还是一个展示歌词的互动工具,该API都提供准确、高质量的歌词,以增强用户参与度和音乐体验
每个API响应都包含干净、结构化的歌词数据,可以与播放同步进行动态显示或分析。API支持流行和冷门音乐类型,确保广泛的歌曲覆盖,从排行榜热门歌曲到独立发行作品。此外,其优化性能和可扩展性使其能够无缝集成到大规模平台和轻量级移动应用中
通过简单输入曲目ID提供同步歌词
获取歌词 - 端点功能
| 对象 | 描述 |
|---|---|
trackId |
[必需] Enter a track id |
{"success":true,"cached":false,"data":{"lrc":"[00:34.30] Look\n[00:37.19] If you had one shot, or one opportunity\n[00:44.19] To seize everything you ever wanted\n[00:47.12] One moment\n[00:49.33] Would you capture it or just let it slip?\n[00:53.08] Yo\n[00:54.15] His palms are sweaty, knees weak, arms are heavy\n[00:56.84] There's vomit on his sweater already, mom's spaghetti\n[00:59.50] He's nervous, but on the surface he looks calm and ready to drop bombs\n[01:03.39] But he keeps on forgetting what he wrote down, the whole crowd goes so loud\n[01:08.12] He opens his mouth, but the words won't come out\n[01:11.08] He's choking how, everybody's joking now\n[01:13.75] The clock's run out, time's up, over, blaow!\n[01:16.62] Snap back to reality\n[01:18.11] Oh, there goes gravity\n[01:19.82] Oh, there goes Rabbit, he choked\n[01:21.79] He's so mad, but he won't give up that easy, no\n[01:24.17] He won't have it, he knows his whole back's to these ropes\n[01:27.35] It don't matter, he's dope\n[01:28.94] He knows that but he's broke\n[01:30.21] He's so stagnant, he knows when he goes back to his mobile home, that's when it's\n[01:33.85] Back to the lab again, yo\n[01:35.50] This whole rhapsody\n[01:36.78] He better go capture this moment and hope it don't pass him\n[01:39.26] You better lose yourself in the music, the moment\n[01:41.48] You own it, you better never let it go\n[01:44.24] You only get one shot, do not miss your chance to blow\n[01:47.28] This opportunity comes once in a lifetime\n[01:49.92] You better lose yourself in the music, the moment\n[01:52.85] You own it, you better never let it go\n[01:55.46] You only get one shot, do not miss your chance to blow\n[01:58.21] This opportunity comes once in a lifetime\n[02:01.05] You better\n[02:01.95] The soul's escaping, through this hole that is gaping\n[02:04.43] This world is mine for the taking\n[02:06.38] Make me king, as we move toward a new world order\n[02:09.84] A normal life is boring, but superstardom's close to post mortem\n[02:14.09] It only grows harder, homie grows hotter\n[02:16.83] He blows, it's all over\n[02:18.44] These hoes is all on him\n[02:19.98] Coast to coast shows, he's known as the globetrotter\n[02:22.65] Lonely roads, God only knows\n[02:24.43] He's knows is grown farther from home, he's no father\n[02:26.83] He goes home and barely knows his own daughter\n[02:29.38] But hold your nose 'cause here goes the cold water\n[02:32.25] His hoes don't want him no more, he's cold product\n[02:35.15] They moved on to the next schmoe who flows\n[02:37.87] He nose dove and sold nada\n[02:39.33] So the soap opera is told and unfolds\n[02:42.11] I suppose it's old partner but the beat goes on\n[02:44.81] Da da dum, da dum da da\n[02:46.44] You better lose yourself in the music, the moment\n[02:49.06] You own it, you better never let it go\n[02:51.72] You only get one shot, do not miss your chance to blow\n[02:54.62] This opportunity comes once in a lifetime\n[02:57.03] You better lose yourself in the music, the moment\n[03:00.11] You own it, you better never let it go\n[03:02.77] You only get one shot, do not miss your chance to blow\n[03:05.72] This opportunity comes once in a lifetime\n[03:08.13] You better\n[03:09.13] No more games, I'ma change what you call rage\n[03:11.38] Tear this motherfucking roof off like two dogs caged\n[03:14.15] I was playing in the beginning, the mood all changed\n[03:17.09] I've been chewed up and spit out and booed off stage\n[03:19.94] But I kept rhyming and stepped right into the next cypher\n[03:22.99] Best believe somebody's paying the pied piper\n[03:25.77] All the pain inside amplified by the fact\n[03:28.58] That I can't get by with my 9-to-5\n[03:31.78] And I can't provide the right type of life for my family\n[03:35.70] 'Cause man, these goddamn food stamps don't buy diapers\n[03:38.33] And it's no movie, there's no Mekhi Phifer, this is my life\n[03:42.37] And these times are so hard, and it's getting even harder\n[03:45.16] Trying to feed and water my seed, plus\n[03:47.26] Teeter totter caught up between being a father and a prima donna\n[03:50.91] Baby mama drama's screaming on and\n[03:53.14] Too much for me to wanna stay in one spot, another day of monotony\n[03:56.32] Has gotten me to the point, I'm like a snail I've got to formulate a plot or I end up in jail or shot\n[04:01.97] Success is my only motherfucking option, failure's not\n[04:05.31] Mom, I love you, but this trailer's got to go\n[04:07.95] I cannot grow old in Salem's lot\n[04:10.28] So here I go it's my shot\n[04:12.03] Feet, fail me not, this may be the only opportunity that I got\n[04:15.79] You better\n[04:16.45] Lose yourself in the music, the moment\n[04:18.76] You own it, you better never let it go\n[04:21.31] You only get one shot, do not miss your chance to blow\n[04:24.39] This opportunity comes once in a lifetime\n[04:27.07] You better lose yourself in the music, the moment\n[04:29.89] You own it, you better never let it go\n[04:32.31] You only get one shot, do not miss your chance to blow\n[04:35.50] This opportunity comes once in a lifetime\n[04:38.12] You better\n[04:40.09] You can do anything you set your mind to, man\n[04:41.12] ","source":"v2"}}
curl --location --request GET 'https://zylalabs.com/api/7566/spotify+line+lyrics+api/22042/get+track+lyrics?trackId=7MJQ9Nfxzh8LPZ9e9u68Fq' --header 'Authorization: Bearer YOUR_API_KEY'
| 标头 | 描述 |
|---|---|
授权
|
[必需] 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。 |
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
获取歌词端点返回指定Spotify曲目的同步歌词。响应包括完整的歌词文本、同步的时间信息以及关于歌曲的元数据,如曲目ID和艺术家名称
响应数据中的关键字段包括“歌词”(完整歌词文本)“track_id”(Spotify 音轨 ID)“artist”(艺术家名称)和“timestamp”(歌词同步的时间数据)
响应数据采用JSON格式结构,具有清晰的键值对。歌词通常以单个字符串呈现,而元数据字段则被组织为便于访问,使开发者可以高效地解析和显示信息
获取歌词接口提供实时歌曲歌词,包括完整歌词文本、同步时间以及相关元数据,如曲目ID和艺术家名称,涵盖广泛的流派和艺术家
通过与音乐版权组织的合作以及从经过验证的来源进行持续更新,维护数据的准确性 定期质量检查确保提供的歌词是正确和最新的
典型的使用案例包括卡拉OK应用程序音乐教育平台和互动歌词显示工具开发者可以使用API通过将歌词与音乐播放同步来增强用户参与度
用户可以通过在端点参数中指定Spotify曲目ID来自定义他们的请求。这允许针对特定歌曲的歌词进行定向检索,从而在应用程序中实现量身定制的体验
如果API返回部分或空结果,开发者应实现错误处理以通知用户。他们还可以提供后备选项,例如显示消息或建议可以获取歌词的替代曲目
获取歌词的接口主要需要"track_id"参数,这是Spotify曲目的唯一标识符。这使用户能够指定他们想要检索哪首歌的歌词
该API涵盖了多种流派的大量歌曲,包括流行、摇滚、嘻哈和独立音乐。它包括主流热门歌曲和不太知名的曲目,确保全球用户的广泛可访问性
"track_id"参数接受任何有效的Spotify曲目ID,通常是一个字母数字字符的字符串。用户必须确保该ID对应于Spotify目录中现有的曲目,以便成功检索
在响应中 "lyrics" 包含歌曲的完整歌词 "track_id" 标识歌曲 "artist" 提供艺术家的姓名 "timestamp" 表示歌词同步的时间 使得在播放过程中可以动态显示
用户可以解析JSON响应以提取歌词和元数据以在他们的应用程序中显示 通过使用“时间戳”数据 开发者可以将歌词与音乐播放同步 从而增强用户参与感
质量检查包括来自经过验证来源的定期审计和更新,确保歌词准确并反映最新版本 与音乐版权组织的合作进一步增强了数据的可靠性
响应通常包括一个结构化的JSON对象,其中包含歌词、曲目ID、艺术家名称和时间戳字段 用户可以期待一致的格式,使其易于集成到各种应用程序中
用户应实现错误处理,以捕获无效的轨道 ID,并向用户提供反馈。这可以包括显示错误消息或建议替代轨道,以确保顺畅的用户体验
服务级别:
100%
响应时间:
2,819ms
服务级别:
100%
响应时间:
379ms
服务级别:
100%
响应时间:
2,363ms
服务级别:
100%
响应时间:
1,063ms
服务级别:
78%
响应时间:
1,446ms
服务级别:
100%
响应时间:
2,438ms
服务级别:
100%
响应时间:
914ms
服务级别:
100%
响应时间:
329ms
服务级别:
100%
响应时间:
361ms
服务级别:
100%
响应时间:
308ms