如何在 iTunes API 中查询特定类型的电影

How to query the iTunes API for movies in a specific genre

我正在尝试在 iTunes API 中查询特定类型的电影。我已经搜索了几个小时,但似乎无法弄清楚。

示例:https://itunes.apple.com/search?term=james+cameron&limit=25&entity=movie

这会给我一个 James Cameron 制作的电影列表,但我不想搜索所有符合特定类型的电影,例如:"Romance"。

当我在这里查看文档时:https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/

它说我可以搜索 attribute=genreIndex,但我找不到任何指定此 'genreIndex' 的地方。所以我不知道在这里放什么? - 我发现了其他几个与此相关的问题,它们都是 link 到这个:https://affiliate.itunes.apple.com/resources/documentation/genre-mapping.html

哪个不存在了?

有什么我不明白的地方,或者我应该怎么做?

谢谢! :)

iTunes 文档中没有这个解决方案,我通过尝试找到了它。 (我认为 'genreIndex' 可能已被弃用,现在是 'genreTerm'(也许 Apple 忘记在文档中更新它)。然而,这完美地工作:

https://itunes.apple.com/search?term=romance&entity=movie&attribute=genreTerm