查询 MusicBrainz 搜索 API 并获取指定录音的多个艺术家

Querying MusicBrainz search API and get multiple artists for the specified recording

我想为指定的录音获取多位艺术家。假设我有像 Pat Metheny 这样的(主要)艺术家名字,并且有像 "Bright Size Life" 这样的专辑名称。我想让其他 (2) 位艺术家来完成我的结果(Jaco Pastorius 和 Bob Moses)。当我以交互方式使用时,网页会显示这两位艺术家,但是当我使用 API 时,响应中只有一位艺术家。

以下是我正在尝试的查询:

http://musicbrainz.org/ws/2/work/?query=bright%20size%20life

http://musicbrainz.org/ws/2/recording?query=Bright%20size%20life

这里是只有一位艺术家的结果:

我错过了什么? 提前致谢

您当前的方法有几个问题:

  1. 您在第一个屏幕截图中显示的关系是 release, not a recording. Recordings do not inherit the relationships of the releases they appear on and there's a reason for it: there's a semantic difference between relationships applied to recordings/tracks and the release itself which is best described by looking at the guidelines 关系的关系(特别是第 2、3 和 4 点意味着发布级别的关系不能自动应用于发行版中的所有录音)
There are multiple levels at which an artist's role on a song or album can be noted:
1. If the relationship is applicable to all tracks on a release, apply it to every work or recording on the release.
2. If the relationship applies to only a few tracks, and you know which ones, apply it only to those works or recordings.
3. If you are unsure which tracks a relationship applies to, put it at release level. A basic effort to determine to which tracks the relationship is applicable is appreciated.
4. If the credit is release level, and does not apply on a track by track basis (e.g. graphic design for the album's cover), then apply the relationship to the release, not the tracks. 
  1. 您在第二个屏幕截图中显示的录音是 this one,它没有任何关系,它出现的版本也没有(因此没有可以包含的关系信息在 XML 回复中)。

  2. search web service is not a replacement for the normal one。这意味着并非数据库中的所有可用信息都可以通过搜索网络服务获得,尽管它可能可以通过常规服务获得(尽管使用常规服务可能需要先搜索以获取所需内容的 MusicBrainz ID检索有关信息)。

因此,要回答如何在您的第一个屏幕截图中检索有关录音的信息的问题(this one): The result you get from the standard web service (click on the "Details" tab on the website, it will include a link to the XML representation, which is https://musicbrainz.org/ws/2/recording/6cbda46a-4db9-4575-865d-5be479e30b84?inc=artist-credits+releases for "Bright Size Life") can be made to changed to include relationships to artists by including the artist-rels include argument (here's 确实有关系的录音会是什么样子)。

但是,如果您知道发行版的 MusicBrainz ID 并希望在一个请求中同时获得发行版和录音关系,那么这是可行的并已记录在案:

By default, these 'inc=' arguments will only load relationship for the requested entity. When you are loading a release, you might want to load relationships for all its recordings and also works linked to the recordings. This is useful to get full release credits. There are additional arguments that can be used only on release requests and allow you to specify for which entities to load relationships:

- recording-level-rels
- work-level-rels

这意味着您可以将 artist-relsrecording-level-rels 添加到 Bright Size Life 发行的发行请求(如 https://musicbrainz.org/ws/2/release/b60d1bc5-a18c-38ca-a26b-6e040d5d7acb?inc=artist-credits%2Bdiscids%2Blabels%2Brecordings+recording-level-rels+artist-rels),并获取该发行的艺术家关系信息和所有录音出现在上面。