<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Ability to retrieve track language in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5720971#M11740</link>
    <description>&lt;P&gt;That's the track id and you usually get them from other API endpoints.&lt;/P&gt;</description>
    <pubDate>Sat, 02 Dec 2023 23:00:18 GMT</pubDate>
    <dc:creator>lanahra</dc:creator>
    <dc:date>2023-12-02T23:00:18Z</dc:date>
    <item>
      <title>Ability to retrieve track language</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5437477#M6602</link>
      <description>&lt;P&gt;The Track Web API provides a lot of useful information and more can even be retrieved from the Get Audio Analysis endpoint. A track additionally has a lot of metadata flags such as the explicit flag but there is no language attribute on the track object. Would it be possible to expose a track's language so that apps/extensions can be used to leverage this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use cases such as:&lt;/P&gt;&lt;P&gt;- Prevent the playing of any songs not in a preferred language&lt;/P&gt;&lt;P&gt;- Creating Playlists based on language&lt;/P&gt;&lt;P&gt;- Getting better recommendations based on language&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If language isn't something that doesn't yet exist in the track API then this is very easy to backfill using NLP models. Google Translate has an autodetect language feature which showcases this. An implementation for fixing bad language labels could also be available for users and could be regulated based on amount of reports for the same language for example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be a really nice feature and l know I would personally benefit from this because if there is one thing that grinds my gears, it is getting songs with languages I don't even speak in my Discover Weekly! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 12:16:44 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5437477#M6602</guid>
      <dc:creator>vancromy</dc:creator>
      <dc:date>2022-09-30T12:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Ability to retrieve track language</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5526505#M8460</link>
      <description>&lt;P&gt;Hey! I was searching for the same question on the internet and landed here.&lt;BR /&gt;Were you able to figure it out? I couldn't find any answer to it.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 17:42:58 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5526505#M8460</guid>
      <dc:creator>RahulKanna</dc:creator>
      <dc:date>2023-03-23T17:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Ability to retrieve track language</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5527792#M8494</link>
      <description>&lt;P&gt;Turns out the Spotify client makes requests to an internal API does indeed return info about the track's language. However, this API is not accessible through the official API token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;GET&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://spclient.wg.spotify.com/metadata/4/track/80b933ec871d4e39955980ca131fde18?market=from_token" target="_blank"&gt;https://spclient.wg.spotify.com/metadata/4/track/80b933ec871d4e39955980ca131fde18?market=from_token&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Authorization: Bearer &amp;lt;token from Spotify client&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Response:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_gjzzhndajv9_0-1679755206563.png" style="width: 400px;"&gt;&lt;img src="https://community.spotify.com/t5/image/serverpage/image-id/154400iF7BBF54E513441F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_gjzzhndajv9_0-1679755206563.png" alt="_gjzzhndajv9_0-1679755206563.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While the "language_of_performace" is not available for all tracks, the information is already there, so it would be great if the Spotify Developers could add this to the official API.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2023 14:44:21 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5527792#M8494</guid>
      <dc:creator>lanahra</dc:creator>
      <dc:date>2023-03-25T14:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Ability to retrieve track language</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5575837#M9091</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.png" style="width: 400px;"&gt;&lt;img src="https://community.spotify.com/t5/image/serverpage/image-id/156662iE16DE19EBA8E12DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot_1.png" alt="Screenshot_1.png" /&gt;&lt;/span&gt;&lt;BR /&gt;what is it and how can i access it&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 05 May 2023 10:25:09 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5575837#M9091</guid>
      <dc:creator>BurakV0101</dc:creator>
      <dc:date>2023-05-05T10:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ability to retrieve track language</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5720971#M11740</link>
      <description>&lt;P&gt;That's the track id and you usually get them from other API endpoints.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 23:00:18 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5720971#M11740</guid>
      <dc:creator>lanahra</dc:creator>
      <dc:date>2023-12-02T23:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Ability to retrieve track language</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5721003#M11741</link>
      <description>&lt;P&gt;So I found a way to make this work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can make requests to&amp;nbsp;&lt;A href="https://spclient.wg.spotify.com/metadata/4/track/80b933ec871d4e39955980ca131fde18?market=from_token" target="_blank" rel="nofollow noopener noreferrer"&gt;https://spclient.wg.spotify.com/&lt;/A&gt;&amp;nbsp;if you retrieve the access token from&amp;nbsp;&lt;A href="https://open.spotify.com/get_access_token/" target="_blank"&gt;https://open.spotify.com/get_access_token/&lt;/A&gt;. That's where the web player gets it's token from.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some endpoints of the&amp;nbsp;&lt;A href="https://spclient.wg.spotify.com/metadata/4/track/80b933ec871d4e39955980ca131fde18?market=from_token" target="_blank" rel="nofollow noopener noreferrer"&gt;https://spclient.wg.spotify.com/&lt;/A&gt;&amp;nbsp;require a non-anonymous user, which you can get by accessing&amp;nbsp;&lt;A href="https://open.spotify.com/get_access_token/" target="_blank"&gt;https://open.spotify.com/get_access_token/&lt;/A&gt;&amp;nbsp;with a logged-on Spotify account in your browser, or by passing the proper cookie from&amp;nbsp;&lt;A href="https://open.spotify.com/get_access_token/" target="_blank"&gt;open.spotify.com&lt;/A&gt;&amp;nbsp;in the request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other endpoints (which include the one I mentioned to retrieve track details) can be accessed with an anonymous access token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;GET&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://spclient.wg.spotify.com/metadata/4/track/80b933ec871d4e39955980ca131fde18?market=from_token" target="_blank" rel="nofollow noopener noreferrer"&gt;https://spclient.wg.spotify.com/metadata/4/track/80b933ec871d4e39955980ca131fde18?market=from_token&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Authorization: Bearer &amp;lt;accessToken from&amp;nbsp;&lt;A href="https://open.spotify.com/get_access_token/" target="_blank"&gt;https://open.spotify.com/get_access_token/&lt;/A&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;App-Platform: WebPlayer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Accept: application/json&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do note the "&lt;SPAN&gt;App-Platform: WebPlayer" header may be required for some of the endpoints, it doesn't look like it's required for this particular one.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The endpoint&amp;nbsp;&lt;A href="https://open.spotify.com/get_access_token/" target="_blank"&gt;https://open.spotify.com/get_access_token/&lt;/A&gt;&amp;nbsp;has CORS restrictions, so if you want to use the anonymous access token in a web app, you will need to use a server-side proxy. If you need the non-anonymous access token unfornately there is no automated way to do this, you will have to ask the user to either input the access token itself or at least the cookie.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 23:17:31 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5721003#M11741</guid>
      <dc:creator>lanahra</dc:creator>
      <dc:date>2023-12-02T23:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Ability to retrieve track language</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5726018#M11769</link>
      <description>&lt;P&gt;How do you get this track ID? It's not the 'track ID' from the Spotify API, it's called 'gid' on the screenshot you posted earlier&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 01:19:27 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5726018#M11769</guid>
      <dc:creator>peurxz</dc:creator>
      <dc:date>2023-12-05T01:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Ability to retrieve track language</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5907550#M12830</link>
      <description>&lt;P&gt;How are you getting the track ID? I am copying it from the track's share URL link, and I am getting 404 when I replace.&lt;/P&gt;&lt;P data-unlink="true"&gt;https://open.spotify.com/track/7BKLCZ1jbUBVqRi2FVlTVw&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Track ID =&amp;nbsp;7BKLCZ1jbUBVqRi2FVlTVw&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ID mentioned in the above examples(&lt;A href="https://spclient.wg.spotify.com/metadata/4/track/80b933ec871d4e39955980ca131fde18?market=from_token" target="_blank" rel="nofollow noopener noreferrer"&gt;80b933ec871d4e39955980ca131fde18&lt;/A&gt;) has a different length and this ID does not work in api.spotify to fetch track details (throws error).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to retrieve track details from api.spotify though (&lt;A href="https://developer.spotify.com/documentation/web-api/reference/get-track" target="_blank" rel="noopener"&gt;Web API Reference | Spotify for Developers&lt;/A&gt;) with the above-mentioned ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: Found this solution&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/76326306/spotify-gid-of-tracks" target="_blank" rel="noopener"&gt;Spotify - "gid" of Tracks.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 05:08:09 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5907550#M12830</guid>
      <dc:creator>nagavignesh</dc:creator>
      <dc:date>2024-03-05T05:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ability to retrieve track language</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5907957#M12833</link>
      <description>&lt;P&gt;Hey, you are all right, this is an internal id commonly referred as gid. There is a way to translate gid to an id understood by the public API and back, if you look around in the web you'll find answers on how to do this conversion. Last time I tried to post the algorithm my comment was deleted without explanation, so I don't think I can disclose this here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: sorry didn't see your edit, that's it!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 01:31:41 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/5907957#M12833</guid>
      <dc:creator>lanahra</dc:creator>
      <dc:date>2024-02-26T01:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Ability to retrieve track language</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/6417257#M15182</link>
      <description>&lt;P&gt;Hey there, I'm trying to convert a track id to GID but it doesn't seem to be working. Do you know how to convert a track id to GID. I tried reversing the code in the stackoverflow thread but it doesn't seem to be doing it..&lt;BR /&gt;&lt;BR /&gt;edit: NVM GOT IT&lt;/P&gt;</description>
      <pubDate>Sat, 05 Oct 2024 20:57:47 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Ability-to-retrieve-track-language/m-p/6417257#M15182</guid>
      <dc:creator>confessfrog</dc:creator>
      <dc:date>2024-10-05T20:57:47Z</dc:date>
    </item>
  </channel>
</rss>

