You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Gracenote API获取曲目详情(如链接)?

Hey there! I see you’ve successfully pulled basic track metadata using the searchTrack method, but you’re missing the links and additional details you need. Let’s walk through how to grab that info:

1. Use the track_gnid to Fetch Full Track Details

The searchTrack endpoint only returns core metadata (title, artist, track number, etc.). To get extended details like links, you’ll need to make a follow-up request using the track_gnid from your initial search response.

Most Gracenote SDKs include a method like fetchTrack (or a similar-named equivalent) built for this exact purpose. Here’s how to use it with your existing data:

// Extract the track GNID from your search results
$trackGnid = $results['tracks'][0]['track_gnid'];

// Fetch complete track details
$trackDetails = $api->fetchTrack($trackGnid);

2. Request Extended Data (If Required)

Sometimes, links and non-core fields aren’t returned by default. You may need to pass additional options to explicitly request this data. For example:

// Specify you want to include link-related extended data
$options = [
    'include' => 'media_links,streaming_providers'
];

$trackDetails = $api->fetchTrack($trackGnid, $options);

Exact option names depend on your Gracenote API version and access level—double-check your SDK documentation for valid parameters.

Once you retrieve the trackDetails response, look for fields like:

  • links: An array containing different types of links (streaming, purchase, etc.)
  • streaming_urls: Direct links to streaming platforms
  • purchase_links: Links to buy the track

4. Fallback: Direct API Request (If SDK Lacks the Method)

If your SDK doesn’t have a fetchTrack method, you can construct a direct HTTP request to Gracenote’s API endpoint. Include your API credentials, the track_gnid, and any parameters to request extended data in the request headers or body.


内容的提问来源于stack exchange,提问作者Sonali Iflair

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 07:58:41