Metrics
API Version 2 (V2)
Podcasts
You can retrieve the favorite podcasts and episodes of the user data by user_id.
Get a podcasts data by user_id
GET
Request
Query Parameters
user_id
required
String
User ID returned by add integration request. This key should be stored in your database against the user and used for all interactions with the Spike API.
Header Parameters
authorizationtoken
optional
String
Client access token (deprecated)
x-spike-auth
required
String
Client access token
Python
Node.js
Ruby
Java
Curl
1import requests
2
3url = "https://api.spikeapi.com/v2/metrics/podcasts/?user_id=fa1e3803-6068-4ea7-9788-eccce210daa1"
4headers = {}
5headers['x-spike-auth'] = 'fa0b3803-1111-2222-9788-eccce210d30c'
6response = requests.request("GET", url, headers=headers)
7
8print(response.text)
Responses
200
1{
2 "user_id": "fa1e3803-6068-4ea7-9788-eccce210daa1",
3 "type": "podcasts",
4 "source": [
5 {
6 "name": "spotify",
7 "status": "ok"
8 }
9 ],
10 "favorite_podcasts": [
11 {
12 "name": "The Free Audiobooks",
13 "publisher": "The Free Audiobooks",
14 "description": "'The Free Audiobooks' brings you a whole new collection of informative, useful, entertaining, and knowledgeable Audiobooks.",
15 "added_at": "2022-01-24T15:09:09",
16 "available_markets": [],
17 "copyrights": [],
18 "explicit": false,
19 "external_urls": "https://open.spotify.com/show/6R76Hw6GPIX8AnFXE9UtWf"
20 "languages": [ "en" ],
21 "media_type": "audio",
22 "total_episodes": 76,
23 }
24 ],
25 "saved_episodes": [
26 {
27 "name": "Swimming with Sharks in Caye Caulker Belize",
28 "description": "Welcome to episode 1 of series 2 of Many Roads Travelled: (Solo Female) Travel Podcast The travel podcast that takes you on epic road trips around the world via public transport or hitching! So if you love to travel & travel adventures then come along for the ride! This first series was about my 16 months, 31k mile road trip from Paris to Cape Town way back in 1993/94! The 2nd series I about my solo month-long overland trip around Central America in February 2020.",
29 "added_at": "2022-01-29T09:35:33",
30 "fully_played": false,
31 "resume_position_ms": 0
32 "audio_preview_url": "https://p.scdn.co/mp3-preview/17ba151a8ca1df0c37508445407e43e28754f504",
33 "duration_ms": 1729280,
34 "explicit": false,
35 "external_urls": "https://open.spotify.com/episode/7sV1Mg4VLDWJlqTrNfC8fi"
36 "languages": [ "en-US" ],
37 "release_date": "2021-12-10",
38 "release_date_precision": "day",
39 "podcast": {
40 "name": "Many Roads Travelled : (Solo Female) Travel Podcast",
41 "publisher": "Many Roads Travelled",
42 "description": "The travel podcast that takes you on epic adventures around the world!My first series will take you with me on my 16 months, 30,000+ mile road trip from Paris to Cape Town & back to Nairobi!
43 "available_markets": [ "US" ],
44 "copyrights": [],
45 "explicit": false,
46 "external_urls": "https://open.spotify.com/show/31ZuU6LHZofkvAa751fgNB" ,
47 "languages": [ "en" ],
48 "media_type": "audio",
49 "total_episodes": 65
50 }
51 }
52 ],
53 "topics": ["Technology", "Fashion", "Architecture"]
54 }]
55}
1<style>
2@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap');
3
4.h2, .h3, .list, .description{
5 font-family: 'Poppins', sans-serif;
6 font-weight: 500;
7}
8
9.h2 {
10 margin-top: -20px;
11 margin-bottom: 20px;
12
13 font-size: 30px;
14}
15
16.h3 {
17 font-size: 22px;
18 margin-top: -20px;
19}
20
21.list-wrapper {
22 white-space: normal;
23 margin-top: -10px;
24}
25
26.list, .description {
27 font-size: 14px;
28}
29
30</style>
31<h2 class="h2">Fields</h2>
32<h3 class="h3">Favorite_podcasts.name</h3>
33<ul class="list-wrapper">
34 <li class="list">Type: String</li>
35 <li class="list">Example: The Free Audiobooks</li>
36</ul><p class="description">The name of the podcast.</p>
37
38<h3 class="h3">Favorite_podcasts.publisher</h3>
39<ul class="list-wrapper">
40 <li class="list">Type: String</li>
41 <li class="list">Example: The Free Audiobooks</li>
42</ul><p class="description">The publisher of the podcast.</p>
43
44<h3 class="h3">Favorite_podcasts.description</h3>
45<ul class="list-wrapper">
46 <li class="list">Type: String</li>
47</ul><p class="description">A description of the podcast.</p>
48
49<h3 class="h3">Favorite_podcasts.added_at</h3>
50<ul class="list-wrapper">
51 <li class="list">Type: String</li>
52 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
53 <li class="list">Example: 2022-01-24T15:09:09</li>
54</ul><p class="description">Date and time when user added podcast to list</p>
55
56<h3 class="h3">Favorite_podcasts.available_markets</h3>
57<ul class="list-wrapper">
58 <li class="list">Type: Array of strings</li>
59 <li class="list">Example: [ "DE", "US" ]</li>
60</ul><p class="description">A list of the countries in which the podcast can be played, identified by their ISO 3166-1 alpha-2 code.</p>
61
62<h3 class="h3">Favorite_podcasts.copyrights</h3>
63<ul class="list-wrapper">
64 <li class="list">Type: String</li>
65</ul><p class="description">The copyright statements of the podcast.</p>
66
67<h3 class="h3">Favorite_podcasts.explicit</h3>
68<ul class="list-wrapper">
69 <li class="list">Type: Boolean</li>
70 <li class="list">Values: true | false</li>
71</ul><p class="description">Whether or not the podcast has explicit content (true = yes it does; false = no it does not OR unknown).</p>
72
73<h3 class="h3">Favorite_podcasts.external_urls</h3>
74<ul class="list-wrapper">
75 <li class="list">Type: String</li>
76 <li class="list">Example: https://open.spotify.com/show/6R76Hw6GPIX8AnFXE9UtWf</li>
77</ul><p class="description">External URLs for this podcast.</p>
78
79<h3 class="h3">Favorite_podcasts.languages</h3>
80<ul class="list-wrapper">
81 <li class="list">Type: Array of strings</li>
82 <li class="list">Example: [ "en" ]</li>
83</ul><p class="description">A list of the languages used in the podcast, identified by their ISO 639 code.</p>
84
85<h3 class="h3">Favorite_podcasts.media_type</h3>
86<ul class="list-wrapper">
87 <li class="list">Type: String</li>
88 <li class="list">Example: audio</li>
89</ul><p class="description">The media type of the podcast.</p>
90
91<h3 class="h3">Favorite_podcasts.total_episodes</h3>
92<ul class="list-wrapper">
93 <li class="list">Type: Int</li>
94 <li class="list">Example: 20</li>
95</ul><p class="description">The total number of episodes available</p>
96
97<h3 class="h3">Saved_episodes.name</h3>
98<ul class="list-wrapper">
99 <li class="list">Type: String</li>
100 <li class="list">Example: Swimming with Sharks in Caye Caulker Belize</li>
101</ul><p class="description">The name of the episode</p>
102
103<h3 class="h3">Saved_episodes.description</h3>
104<ul class="list-wrapper">
105 <li class="list">Type: String</li>
106</ul><p class="description">A description of the episode.</p>
107
108<h3 class="h3">Saved_episodes.added_at</h3>
109<ul class="list-wrapper">
110 <li class="list">Type: String</li>
111 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
112 <li class="list">Example: 2022-01-24T15:09:09</li>
113</ul><p class="description">Date and time when user added episode to list</p>
114
115<h3 class="h3">Saved_episodes.fully_played</h3>
116<ul class="list-wrapper">
117 <li class="list">Type: Boolean</li>
118 <li class="list">Values: true | false </li>
119</ul><p class="description">Whether or not the episode has been fully played by the user.</p>
120
121<h3 class="h3">Saved_episodes.resume_position_ms</h3>
122<ul class="list-wrapper">
123 <li class="list">Type: Int</li>
124 <li class="list">Example: 22000</li>
125</ul><p class="description">The user's most recent position in the episode in milliseconds.</p>
126
127<h3 class="h3">Saved_episodes.audio_preview_url</h3>
128<ul class="list-wrapper">
129 <li class="list">Type: String</li>
130 <li class="list">Example: https://p.scdn.co/mp3-preview/17ba151a8ca1df0c37508445407e43e28754f504</li>
131</ul><p class="description">A URL to a short preview of the episode. null if not available.</p>
132
133<h3 class="h3">Saved_episodes.duration_ms</h3>
134<ul class="list-wrapper">
135 <li class="list">Type: Int</li>
136 <li class="list">Example: 1686233</li>
137</ul><p class="description">The episode length in milliseconds.</p>
138
139<h3 class="h3">Saved_episodes.explicit</h3>
140<ul class="list-wrapper">
141 <li class="list">Type: Boolean</li>
142 <li class="list">Values: true | false</li>
143</ul><p class="description">Whether or not the episode has explicit content (true = yes it does; false = no it does not OR unknown).</p>
144
145<h3 class="h3">Saved_episodes.external_urls</h3>
146<ul class="list-wrapper">
147 <li class="list">Type: String</li>
148 <li class="list">Example: https://open.spotify.com/episode/7sV1Mg4VLDWJlqTrNfC8fi</li>
149</ul><p class="description">External URLs for this episode.</p>
150
151<h3 class="h3">Saved_episodes.languages</h3>
152<ul class="list-wrapper">
153 <li class="list">Type: Array of strings</li>
154 <li class="list">Example: [ "en" ]</li>
155</ul><p class="description">A list of the languages used in the episode, identified by their ISO 639 code.</p>
156
157<h3 class="h3">Saved_episodes.release_date</h3>
158<ul class="list-wrapper">
159 <li class="list">Type: String</li>
160 <li class="list">Format: Date, YYYY-MM-DD</li>
161 <li class="list">Example: 2020-05-01</li>
162</ul><p class="description">The date the episode was first released, for example "1981-12-15". Depending on the precision, it might be shown as "1981" or "1981-12".</p>
163
164<h3 class="h3">Saved_episodes.release_date_precision</h3>
165<ul class="list-wrapper">
166 <li class="list">Type: String</li>
167 <li class="list">Format: Date, YYYY-MM-DD</li>
168 <li class="list">Values: year | month | day </li>
169</ul><p class="description">The precision with which release_date value is known</p>
170
171<h3 class="h3">Saved_episodes.podcast.name</h3>
172<ul class="list-wrapper">
173 <li class="list">Type: String</li>
174 <li class="list">Example: Many Roads Travelled : (Solo Female) Travel Podcast</li>
175</ul><p class="description">The name of the podcast.</p>
176
177<h3 class="h3">Saved_episodes.podcast.publisher</h3>
178<ul class="list-wrapper">
179 <li class="list">Type: String</li>
180 <li class="list">Example: Many Roads Travelled</li>
181</ul><p class="description">The publisher of the podcast.</p>
182
183<h3 class="h3">Saved_episodes.podcast.description</h3>
184<ul class="list-wrapper">
185 <li class="list">Type: String</li>
186</ul><p class="description">A description of the podcast.</p>
187
188<h3 class="h3">Saved_episodes.podcast.available_markets</h3>
189<ul class="list-wrapper">
190 <li class="list">Type: Array of strings</li>
191 <li class="list">Example: [ "DE", "US" ]</li>
192</ul><p class="description">A list of the countries in which the podcast can be played, identified by their ISO 3166-1 alpha-2 code.</p>
193
194<h3 class="h3">Saved_episodes.podcast.copyrights</h3>
195<ul class="list-wrapper">
196 <li class="list">Type: String</li>
197</ul><p class="description">The copyright statements of the podcast.</p>
198
199<h3 class="h3">Saved_episodes.podcast.explicit</h3>
200<ul class="list-wrapper">
201 <li class="list">Type: Boolean</li>
202 <li class="list">Values: true | false</li>
203</ul><p class="description">Whether or not the podcast has explicit content (true = yes it does; false = no it does not OR unknown).</p>
204
205<h3 class="h3">Saved_episodes.podcast.external_urls</h3>
206<ul class="list-wrapper">
207 <li class="list">Type: String</li>
208 <li class="list">Example: https://open.spotify.com/show/6R76Hw6GPIX8AnFXE9UtWf</li>
209</ul><p class="description">External URLs for this podcast.</p>
210
211<h3 class="h3">Saved_episodes.podcast.languages</h3>
212<ul class="list-wrapper">
213 <li class="list">Type: Array of strings</li>
214 <li class="list">Example: [ "en" ]</li>
215</ul><p class="description">A list of the languages used in the podcast, identified by their ISO 639 code.</p>
216
217<h3 class="h3">Saved_episodes.podcast.media_type</h3>
218<ul class="list-wrapper">
219 <li class="list">Type: String</li>
220 <li class="list">Example: audio</li>
221</ul><p class="description">The media type of the podcast.</p>
222
223<h3 class="h3">Saved_episodes.podcast.total_episodes</h3>
224<ul class="list-wrapper">
225 <li class="list">Type: Int</li>
226 <li class="list">Example: 20</li>
227</ul><p class="description">The total number of episodes available</p>
228
229<h3 class="h3">Topics</h3>
230<ul class="list-wrapper">
231 <li class="list">Type: Array of strings</li>
232 <li class="list">Example: ["Technology", "Fashion", "Architecture"]</li>
233</ul><p class="description">Key Topics Of Interest (TOI) of the particular user based on the type of Podcasts the user has engaged with historically. Key topics have been extracted using the Natural Language Processing (NLP) models proprietary to DataMe LLP. Textual fields used to derive topics from were the following: Show title, Show Description, Episode Title and Episode Description.</p>
234
235