-
Notifications
You must be signed in to change notification settings - Fork 9
/
fixed-spotify-open-api.yml
6920 lines (6908 loc) · 253 KB
/
fixed-spotify-open-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
description: |
You can use Spotify's Web API to discover music and podcasts, manage your Spotify library, control audio playback, and much more. Browse our available Web API endpoints using the sidebar at left, or via the navigation bar on top of this page on smaller screens.
In order to make successful Web API requests your app will need a valid access token. One can be obtained through <a href="https://developer.spotify.com/documentation/general/guides/authorization-guide/">OAuth 2.0</a>.
The base URI for all Web API requests is `https://api.spotify.com/v1`.
Need help? See our <a href="https://developer.spotify.com/documentation/web-api/guides/">Web API guides</a> for more information, or visit the <a href="https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer">Spotify for Developers community forum</a> to ask questions and connect with other developers.
version: 2024.11.2
title: Spotify Web API with fixes and improvements from sonallux
termsOfService: https://developer.spotify.com/terms/
contact:
name: sonallux
url: https://github.com/sonallux/spotify-web-api
servers:
- url: https://api.spotify.com/v1
tags:
- name: Albums
- name: Artists
- name: Audiobooks
- name: Categories
- name: Chapters
- name: Episodes
- name: Library
- name: Genres
- name: Markets
- name: Player
- name: Playlists
- name: Search
- name: Shows
- name: Tracks
- name: Users
paths:
/albums/{id}:
get:
operationId: get-an-album
tags:
- Albums
summary: |
Get Album
description: |
Get Spotify catalog information for a single album.
parameters:
- $ref: "#/components/parameters/PathAlbumId"
- $ref: "#/components/parameters/QueryMarket"
responses:
"200":
$ref: "#/components/responses/OneAlbum"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/albums:
get:
operationId: get-multiple-albums
tags:
- Albums
summary: |
Get Several Albums
description: |
Get Spotify catalog information for multiple albums identified by their Spotify IDs.
parameters:
- $ref: "#/components/parameters/QueryAlbumIds"
- $ref: "#/components/parameters/QueryMarket"
responses:
"200":
$ref: "#/components/responses/ManyAlbums"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/albums/{id}/tracks:
get:
operationId: get-an-albums-tracks
tags:
- Albums
- Tracks
summary: |
Get Album Tracks
description: |
Get Spotify catalog information about an album’s tracks.
Optional parameters can be used to limit the number of tracks returned.
parameters:
- $ref: "#/components/parameters/PathAlbumId"
- $ref: "#/components/parameters/QueryMarket"
- $ref: "#/components/parameters/QueryLimit"
- $ref: "#/components/parameters/QueryOffset"
responses:
"200":
$ref: "#/components/responses/PagingSimplifiedTrackObject"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/artists/{id}:
get:
tags:
- Artists
operationId: get-an-artist
summary: |
Get Artist
description: |
Get Spotify catalog information for a single artist identified by their unique Spotify ID.
parameters:
- $ref: "#/components/parameters/PathArtistId"
responses:
"200":
$ref: "#/components/responses/OneArtist"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/artists:
get:
tags:
- Artists
operationId: get-multiple-artists
summary: |
Get Several Artists
description: |
Get Spotify catalog information for several artists based on their Spotify IDs.
parameters:
- name: ids
required: true
in: query
schema:
title: Spotify Artist IDs
description: |
A comma-separated list of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for the artists. Maximum: 50 IDs.
example: "2CIMQHirSU0MQqyYHq0eOx,57dN52uHvrHOxijzpIgu3E,1vCWHaC5f2uS3yhpwWbIA6"
type: string
responses:
"200":
$ref: "#/components/responses/ManyArtists"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/artists/{id}/albums:
get:
tags:
- Artists
- Albums
operationId: get-an-artists-albums
summary: |
Get Artist's Albums
description: |
Get Spotify catalog information about an artist's albums.
parameters:
- $ref: "#/components/parameters/PathArtistId"
- $ref: "#/components/parameters/QueryIncludeGroups"
- $ref: "#/components/parameters/QueryMarket"
- $ref: "#/components/parameters/QueryLimit"
- $ref: "#/components/parameters/QueryOffset"
responses:
"200":
$ref: "#/components/responses/PagingArtistDiscographyAlbumObject"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/artists/{id}/top-tracks:
get:
tags:
- Artists
- Tracks
operationId: get-an-artists-top-tracks
summary: |
Get Artist's Top Tracks
description: |
Get Spotify catalog information about an artist's top tracks by country.
parameters:
- $ref: "#/components/parameters/PathArtistId"
- $ref: "#/components/parameters/QueryMarket"
responses:
"200":
$ref: "#/components/responses/ManyTracks"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/artists/{id}/related-artists:
get:
tags:
- Artists
operationId: get-an-artists-related-artists
summary: |
Get Artist's Related Artists
description: |
Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's listening history.
parameters:
- $ref: "#/components/parameters/PathArtistId"
responses:
"200":
$ref: "#/components/responses/ManyArtists"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/shows/{id}:
get:
tags:
- Shows
operationId: get-a-show
summary: |
Get Show
description: |
Get Spotify catalog information for a single show identified by its
unique Spotify ID.
parameters:
- $ref: "#/components/parameters/QueryMarket"
- $ref: "#/components/parameters/PathShowId"
responses:
"200":
$ref: "#/components/responses/OneShow"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- user-read-playback-position
/shows:
get:
tags:
- Shows
operationId: get-multiple-shows
summary: |
Get Several Shows
description: |
Get Spotify catalog information for several shows based on their Spotify IDs.
parameters:
- $ref: "#/components/parameters/QueryMarket"
- $ref: "#/components/parameters/QueryShowIds"
responses:
"200":
$ref: "#/components/responses/ManySimplifiedShows"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/shows/{id}/episodes:
get:
tags:
- Shows
- Episodes
operationId: get-a-shows-episodes
summary: |
Get Show Episodes
description: |
Get Spotify catalog information about an show’s episodes. Optional parameters can be used to limit the number of episodes returned.
parameters:
- $ref: "#/components/parameters/PathShowId"
- $ref: "#/components/parameters/QueryMarket"
- $ref: "#/components/parameters/QueryLimit"
- $ref: "#/components/parameters/QueryOffset"
responses:
"200":
$ref: "#/components/responses/PagingSimplifiedEpisodeObject"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- user-read-playback-position
/episodes/{id}:
get:
tags:
- Episodes
operationId: get-an-episode
summary: |
Get Episode
description: |
Get Spotify catalog information for a single episode identified by its
unique Spotify ID.
parameters:
- name: id
required: true
in: path
schema:
title: Get an Episode
description: "The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids)\
\ for the episode."
example: 512ojhOuo1ktJprKbVcKyQ
type: string
- $ref: "#/components/parameters/QueryMarket"
responses:
"200":
$ref: "#/components/responses/OneEpisode"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- user-read-playback-position
/episodes:
get:
tags:
- Episodes
operationId: get-multiple-episodes
summary: |
Get Several Episodes
description: |
Get Spotify catalog information for several episodes based on their Spotify IDs.
parameters:
- name: ids
required: true
in: query
schema:
title: Ids
description: |
A comma-separated list of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for the episodes. Maximum: 50 IDs.
example: "77o6BIVlYM3msb4MMIL1jH,0Q86acNRm6V9GYx55SXKwf"
type: string
- $ref: "#/components/parameters/QueryMarket"
responses:
"200":
$ref: "#/components/responses/ManyEpisodes"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- user-read-playback-position
/audiobooks/{id}:
get:
operationId: get-an-audiobook
tags:
- Audiobooks
summary: |
Get an Audiobook
description: |
Get Spotify catalog information for a single audiobook. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
parameters:
- $ref: "#/components/parameters/PathAudiobookId"
- $ref: "#/components/parameters/QueryMarket"
responses:
"200":
$ref: "#/components/responses/OneAudiobook"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/audiobooks:
get:
operationId: get-multiple-audiobooks
tags:
- Audiobooks
summary: |
Get Several Audiobooks
description: |
Get Spotify catalog information for several audiobooks identified by their Spotify IDs. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
parameters:
- $ref: "#/components/parameters/QueryAudiobookIds"
- $ref: "#/components/parameters/QueryMarket"
responses:
"200":
$ref: "#/components/responses/ManyAudiobooks"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/audiobooks/{id}/chapters:
get:
operationId: get-audiobook-chapters
tags:
- Audiobooks
- Chapters
summary: |
Get Audiobook Chapters
description: |
Get Spotify catalog information about an audiobook's chapters. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
parameters:
- $ref: "#/components/parameters/PathAudiobookId"
- $ref: "#/components/parameters/QueryMarket"
- $ref: "#/components/parameters/QueryLimit"
- $ref: "#/components/parameters/QueryOffset"
responses:
"200":
$ref: "#/components/responses/PagingSimplifiedChapterObject"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/me/audiobooks:
get:
tags:
- Audiobooks
- Library
operationId: get-users-saved-audiobooks
summary: |
Get User's Saved Audiobooks
description: |
Get a list of the audiobooks saved in the current Spotify user's 'Your Music' library.
parameters:
- $ref: "#/components/parameters/QueryLimit"
- $ref: "#/components/parameters/QueryOffset"
responses:
"200":
$ref: "#/components/responses/PagingSavedAudiobookObject"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- user-library-read
put:
tags:
- Audiobooks
- Library
operationId: save-audiobooks-user
summary: |
Save Audiobooks for Current User
description: |
Save one or more audiobooks to the current Spotify user's library.
parameters:
- $ref: "#/components/parameters/QueryAudiobookIds"
responses:
"200":
description: Audiobook(s) are saved to the library
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- user-library-modify
delete:
tags:
- Audiobooks
- Library
operationId: remove-audiobooks-user
summary: |
Remove User's Saved Audiobooks
description: |
Remove one or more audiobooks from the Spotify user's library.
parameters:
- $ref: "#/components/parameters/QueryAudiobookIds"
responses:
"200":
description: Audiobook(s) have been removed from the library
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- user-library-modify
/me/audiobooks/contains:
get:
tags:
- Audiobooks
- Library
operationId: check-users-saved-audiobooks
summary: |
Check User's Saved Audiobooks
description: |
Check if one or more audiobooks are already saved in the current Spotify user's library.
parameters:
- $ref: "#/components/parameters/QueryAudiobookIds"
responses:
"200":
$ref: "#/components/responses/ArrayOfBooleans"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- user-library-read
/chapters/{id}:
get:
operationId: get-a-chapter
tags:
- Chapters
summary: |
Get a Chapter
description: |
Get Spotify catalog information for a single audiobook chapter. Chapters are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
parameters:
- $ref: "#/components/parameters/PathChapterId"
- $ref: "#/components/parameters/QueryMarket"
responses:
"200":
$ref: "#/components/responses/OneChapter"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/chapters:
get:
operationId: get-several-chapters
tags:
- Chapters
summary: |
Get Several Chapters
description: |
Get Spotify catalog information for several audiobook chapters identified by their Spotify IDs. Chapters are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
parameters:
- $ref: "#/components/parameters/QueryChapterIds"
- $ref: "#/components/parameters/QueryMarket"
responses:
"200":
$ref: "#/components/responses/ManyChapters"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/tracks/{id}:
get:
tags:
- Tracks
operationId: get-track
summary: |
Get Track
description: |
Get Spotify catalog information for a single track identified by its
unique Spotify ID.
parameters:
- name: id
required: true
in: path
schema:
title: Spotify Track ID
description: |
The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids)
for the track.
example: 11dFghVXANMlKmJXsNCbNl
type: string
- $ref: "#/components/parameters/QueryMarket"
responses:
"200":
$ref: "#/components/responses/OneTrack"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/tracks:
get:
tags:
- Tracks
operationId: get-several-tracks
summary: |
Get Several Tracks
description: |
Get Spotify catalog information for multiple tracks based on their Spotify IDs.
parameters:
- $ref: "#/components/parameters/QueryMarket"
- name: ids
required: true
in: query
schema:
title: Spotify Track IDs
description: |
A comma-separated list of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example: `ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M`. Maximum: 50 IDs.
example: "7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,2takcwOaAZWiXQijPHIx7B"
type: string
responses:
"200":
$ref: "#/components/responses/ManyTracks"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/search:
get:
tags:
- Search
operationId: search
summary: |
Search for Item
description: |
Get Spotify catalog information about albums, artists, playlists, tracks, shows, episodes or audiobooks
that match a keyword string. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
parameters:
- name: q
required: true
in: query
schema:
title: Query
description: |
Your search query.
You can narrow down your search using field filters. The available filters are `album`, `artist`, `track`, `year`, `upc`, `tag:hipster`, `tag:new`, `isrc`, and `genre`. Each field filter only applies to certain result types.
The `artist` and `year` filters can be used while searching albums, artists and tracks. You can filter on a single `year` or a range (e.g. 1955-1960).<br />
The `album` filter can be used while searching albums and tracks.<br />
The `genre` filter can be used while searching artists and tracks.<br />
The `isrc` and `track` filters can be used while searching tracks.<br />
The `upc`, `tag:new` and `tag:hipster` filters can only be used while searching albums. The `tag:new` filter will return albums released in the past two weeks and `tag:hipster` can be used to return only albums with the lowest 10% popularity.<br />
example: remaster%20track:Doxy%20artist:Miles%20Davis
type: string
- name: type
required: true
explode: false
in: query
schema:
title: Item type
description: |
A comma-separated list of item types to search across. Search results include hits
from all the specified item types. For example: `q=abacab&type=album,track` returns
both albums and tracks matching "abacab".
items:
type: string
enum:
- album
- artist
- playlist
- track
- show
- episode
- audiobook
type: array
- $ref: "#/components/parameters/QueryMarket"
- name: limit
required: false
in: query
schema:
title: Limit
description: |
The maximum number of results to return in each item type.
default: 20
example: 10
type: integer
minimum: 1
maximum: 50
- name: offset
required: false
in: query
schema:
title: Offset
description: |
The index of the first result to return. Use
with limit to get the next page of search results.
default: 0
minimum: 0
maximum: 1000
example: 5
type: integer
- name: include_external
required: false
in: query
schema:
title: Include External
description: |
If `include_external=audio` is specified it signals that the client can play externally hosted audio content, and marks
the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response.
type: string
enum:
- audio
responses:
"200":
$ref: "#/components/responses/SearchItems"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
/me:
get:
tags:
- Users
operationId: get-current-users-profile
summary: |
Get Current User's Profile
description: |
Get detailed profile information about the current user (including the
current user's username).
responses:
"200":
$ref: "#/components/responses/OnePrivateUser"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- user-read-private
- user-read-email
/playlists/{playlist_id}:
get:
tags:
- Playlists
operationId: get-playlist
summary: |
Get Playlist
description: |
Get a playlist owned by a Spotify user.
parameters:
- $ref: "#/components/parameters/PathPlaylistId"
- $ref: "#/components/parameters/QueryMarket"
- name: fields
required: false
in: query
schema:
title: Fields
description: |
Filters for the query: a comma-separated list of the
fields to return. If omitted, all fields are returned. For example, to get
just the playlist''s description and URI: `fields=description,uri`. A dot
separator can be used to specify non-reoccurring fields, while parentheses
can be used to specify reoccurring fields within objects. For example, to
get just the added date and user ID of the adder: `fields=tracks.items(added_at,added_by.id)`.
Use multiple parentheses to drill down into nested objects, for example: `fields=tracks.items(track(name,href,album(name,href)))`.
Fields can be excluded by prefixing them with an exclamation mark, for example:
`fields=tracks.items(track(name,href,album(!name,href)))`
example: "items(added_by.id,track(name,href,album(name,href)))"
type: string
- $ref: "#/components/parameters/QueryAdditionalTypes"
responses:
"200":
$ref: "#/components/responses/OnePlaylist"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0: []
put:
tags:
- Playlists
- Library
operationId: change-playlist-details
summary: |
Change Playlist Details
description: |
Change a playlist's name and public/private state. (The user must, of
course, own the playlist.)
parameters:
- $ref: "#/components/parameters/PathPlaylistId"
requestBody:
content:
application/json:
schema:
example:
name: Updated Playlist Name
description: Updated playlist description
public: false
type: object
additionalProperties: true
properties:
name:
type: string
description: |
The new name for the playlist, for example `"My New Playlist Title"`
public:
type: boolean
description: |
The playlist's public/private status (if it should be added to the user's profile or not): `true` the playlist will be public, `false` the playlist will be private, `null` the playlist status is not relevant. For more about public/private status, see [Working with Playlists](/documentation/web-api/concepts/playlists)
collaborative:
type: boolean
description: |
If `true`, the playlist will become collaborative and other users will be able to modify the playlist in their Spotify client. <br/>
_**Note**: You can only set `collaborative` to `true` on non-public playlists._
description:
type: string
description: |
Value for playlist description as displayed in Spotify Clients and in the Web API.
responses:
"200":
description: Playlist updated
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- playlist-modify-public
- playlist-modify-private
/playlists/{playlist_id}/tracks:
get:
tags:
- Playlists
- Tracks
operationId: get-playlists-tracks
summary: |
Get Playlist Items
description: |
Get full details of the items of a playlist owned by a Spotify user.
parameters:
- $ref: "#/components/parameters/PathPlaylistId"
- $ref: "#/components/parameters/QueryMarket"
- name: fields
required: false
in: query
schema:
title: Fields
description: |
Filters for the query: a comma-separated list of the
fields to return. If omitted, all fields are returned. For example, to get
just the total number of items and the request limit:<br/>`fields=total,limit`<br/>A
dot separator can be used to specify non-reoccurring fields, while parentheses
can be used to specify reoccurring fields within objects. For example, to
get just the added date and user ID of the adder:<br/>`fields=items(added_at,added_by.id)`<br/>Use
multiple parentheses to drill down into nested objects, for example:<br/>`fields=items(track(name,href,album(name,href)))`<br/>Fields
can be excluded by prefixing them with an exclamation mark, for example:<br/>`fields=items.track.album(!external_urls,images)`
example: "items(added_by.id,track(name,href,album(name,href)))"
type: string
- name: limit
required: false
in: query
schema:
title: Limit
description: |
The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 100.
default: 20
example: 10
type: integer
minimum: 1
maximum: 100
- $ref: "#/components/parameters/QueryOffset"
- $ref: "#/components/parameters/QueryAdditionalTypes"
responses:
"200":
$ref: "#/components/responses/PagingPlaylistTrackObject"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- playlist-read-private
post:
tags:
- Playlists
- Tracks
operationId: add-tracks-to-playlist
summary: |
Add Items to Playlist
description: |
Add one or more items to a user's playlist.
parameters:
- $ref: "#/components/parameters/PathPlaylistId"
- name: position
required: false
in: query
schema:
title: Position (append by default)
description: |
The position to insert the items, a zero-based index. For example, to insert the items in the first position: `position=0`; to insert the items in the third position: `position=2`. If omitted, the items will be appended to the playlist. Items are added in the order they are listed in the query string or request body.
example: 0
type: integer
- name: uris
required: false
in: query
schema:
title: Spotify Track URIs
description: |
A comma-separated list of [Spotify URIs](/documentation/web-api/concepts/spotify-uris-ids) to add, can be track or episode URIs. For example:<br/>`uris=spotify:track:4iV5W9uYEdYUVa79Axb7Rh, spotify:track:1301WleyT98MSxVHPZCA6M, spotify:episode:512ojhOuo1ktJprKbVcKyQ`<br/>A maximum of 100 items can be added in one request. <br/>
_**Note**: it is likely that passing a large number of item URIs as a query parameter will exceed the maximum length of the request URI. When adding a large number of items, it is recommended to pass them in the request body, see below._
example: "spotify:track:4iV5W9uYEdYUVa79Axb7Rh,spotify:track:1301WleyT98MSxVHPZCA6M"
type: string
requestBody:
content:
application/json:
schema:
type: object
additionalProperties: true
properties:
uris:
description: |
A JSON array of the [Spotify URIs](/documentation/web-api/concepts/spotify-uris-ids) to add. For example: `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M", "spotify:episode:512ojhOuo1ktJprKbVcKyQ"]}`<br/>A maximum of 100 items can be added in one request. _**Note**: if the `uris` parameter is present in the query string, any URIs listed here in the body will be ignored._
type: array
items:
type: string
position:
description: |
The position to insert the items, a zero-based index. For example, to insert the items in the first position: `position=0` ; to insert the items in the third position: `position=2`. If omitted, the items will be appended to the playlist. Items are added in the order they appear in the uris array. For example: `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M"], "position": 3}`
type: integer
responses:
"201":
$ref: "#/components/responses/PlaylistSnapshotId"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/TooManyRequests"
security:
- oauth_2_0:
- playlist-modify-public
- playlist-modify-private
put:
tags:
- Playlists
- Tracks
operationId: reorder-or-replace-playlists-tracks
summary: |
Update Playlist Items
description: |
Either reorder or replace items in a playlist depending on the request's parameters.
To reorder items, include `range_start`, `insert_before`, `range_length` and `snapshot_id` in the request's body.
To replace items, include `uris` as either a query parameter or in the request's body.
Replacing items in a playlist will overwrite its existing items. This operation can be used for replacing or clearing items in a playlist.
<br/>
**Note**: Replace and reorder are mutually exclusive operations which share the same endpoint, but have different parameters.
These operations can't be applied together in a single request.
parameters:
- $ref: "#/components/parameters/PathPlaylistId"