Models
Model classes are Pydantic-based representations of Spotify API responses. They are shared by sync and async clients.
Auto-generated reference
The sections below are rendered from the source models to keep the reference consistent with the SDK.
Album models
Includes SimplifiedAlbum, Album, and SavedAlbum.
Album models.
Album
pydantic-model
Bases: SimplifiedAlbum
Complete album with tracks, copyrights, and label info.
Show JSON schema:
{
"$defs": {
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalIds": {
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"LinkedFrom": {
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
},
"Page_SimplifiedTrack_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/SimplifiedTrack"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[SimplifiedTrack]",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
},
"SimplifiedTrack": {
"additionalProperties": true,
"description": "Basic track info embedded in other objects.",
"properties": {
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"disc_number": {
"title": "Disc Number",
"type": "integer"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"linked_from": {
"anyOf": [
{
"$ref": "#/$defs/LinkedFrom"
},
{
"type": "null"
}
],
"default": null
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"track_number": {
"title": "Track Number",
"type": "integer"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
}
},
"required": [
"artists",
"disc_number",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"name",
"track_number",
"type",
"uri",
"is_local"
],
"title": "SimplifiedTrack",
"type": "object"
}
},
"additionalProperties": true,
"description": "Complete album with tracks, copyrights, and label info.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"tracks": {
"$ref": "#/$defs/Page_SimplifiedTrack_"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"external_ids": {
"$ref": "#/$defs/ExternalIds"
},
"label": {
"title": "Label",
"type": "string"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists",
"tracks",
"copyrights",
"external_ids",
"label",
"popularity"
],
"title": "Album",
"type": "object"
}
Fields:
-
album_type(str) -
total_tracks(int) -
available_markets(list[str] | None) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
name(str) -
release_date(str) -
release_date_precision(str) -
restrictions(Restriction | None) -
type_(Literal['album']) -
uri(str) -
artists(list[SimplifiedArtist]) -
tracks(Page[SimplifiedTrack]) -
copyrights(list[Copyright]) -
external_ids(ExternalIds) -
label(str) -
popularity(int)
album_type
pydantic-field
artists
pydantic-field
available_markets = None
pydantic-field
copyrights
pydantic-field
external_ids
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
images
pydantic-field
label
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
popularity
pydantic-field
release_date
pydantic-field
release_date_precision
pydantic-field
restrictions = None
pydantic-field
total_tracks
pydantic-field
tracks
pydantic-field
type_
pydantic-field
uri
pydantic-field
Copyright
pydantic-model
Bases: SpotifyModel
Copyright statement. Type is 'C' (copyright) or 'P' (performance).
Show JSON schema:
{
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
}
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
text
pydantic-field
type_
pydantic-field
ExternalIds
pydantic-model
Bases: SpotifyModel
External identifiers: ISRC for tracks, EAN or UPC for albums.
Show JSON schema:
{
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
}
Fields:
ean = None
pydantic-field
isrc = None
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
upc = None
pydantic-field
ExternalUrls
pydantic-model
Bases: SpotifyModel
URLs for opening a resource in the Spotify web player.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
spotify
pydantic-field
Image
pydantic-model
Bases: SpotifyModel
Cover art or profile image. Dimensions may be null for user-uploaded images.
Show JSON schema:
{
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
Fields:
height
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
url
pydantic-field
width
pydantic-field
Page
pydantic-model
Bases: SpotifyModel, Generic[T]
Paginated response containing items and navigation links.
Show JSON schema:
{
"additionalProperties": true,
"description": "Paginated response containing items and navigation links.",
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page",
"type": "object"
}
Fields:
-
href(str) -
limit(int) -
next(str | None) -
offset(int) -
previous(str | None) -
total(int) -
items(list[T])
href
pydantic-field
items
pydantic-field
limit
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
next
pydantic-field
offset
pydantic-field
previous
pydantic-field
total
pydantic-field
Restriction
pydantic-model
Bases: SpotifyModel
Content restriction. Reason is 'market', 'product', or 'explicit'.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
reason
pydantic-field
SavedAlbum
pydantic-model
Bases: SpotifyModel
Album saved in a user's library with timestamp metadata.
Show JSON schema:
{
"$defs": {
"Album": {
"additionalProperties": true,
"description": "Complete album with tracks, copyrights, and label info.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"tracks": {
"$ref": "#/$defs/Page_SimplifiedTrack_"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"external_ids": {
"$ref": "#/$defs/ExternalIds"
},
"label": {
"title": "Label",
"type": "string"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists",
"tracks",
"copyrights",
"external_ids",
"label",
"popularity"
],
"title": "Album",
"type": "object"
},
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalIds": {
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"LinkedFrom": {
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
},
"Page_SimplifiedTrack_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/SimplifiedTrack"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[SimplifiedTrack]",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
},
"SimplifiedTrack": {
"additionalProperties": true,
"description": "Basic track info embedded in other objects.",
"properties": {
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"disc_number": {
"title": "Disc Number",
"type": "integer"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"linked_from": {
"anyOf": [
{
"$ref": "#/$defs/LinkedFrom"
},
{
"type": "null"
}
],
"default": null
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"track_number": {
"title": "Track Number",
"type": "integer"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
}
},
"required": [
"artists",
"disc_number",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"name",
"track_number",
"type",
"uri",
"is_local"
],
"title": "SimplifiedTrack",
"type": "object"
}
},
"additionalProperties": true,
"description": "Album saved in a user's library with timestamp metadata.",
"properties": {
"added_at": {
"format": "date-time",
"title": "Added At",
"type": "string"
},
"album": {
"$ref": "#/$defs/Album"
}
},
"required": [
"added_at",
"album"
],
"title": "SavedAlbum",
"type": "object"
}
Fields:
added_at
pydantic-field
album
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
SimplifiedAlbum
pydantic-model
Bases: SpotifyModel
Basic album info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic album info embedded in other objects.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists"
],
"title": "SimplifiedAlbum",
"type": "object"
}
Fields:
-
album_type(str) -
total_tracks(int) -
available_markets(list[str] | None) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
name(str) -
release_date(str) -
release_date_precision(str) -
restrictions(Restriction | None) -
type_(Literal['album']) -
uri(str) -
artists(list[SimplifiedArtist])
album_type
pydantic-field
artists
pydantic-field
available_markets = None
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
images
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
release_date
pydantic-field
release_date_precision
pydantic-field
restrictions = None
pydantic-field
total_tracks
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedArtist
pydantic-model
Bases: SpotifyModel
Basic artist info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
}
Fields:
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedTrack
pydantic-model
Bases: SpotifyModel
Basic track info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"LinkedFrom": {
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic track info embedded in other objects.",
"properties": {
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"disc_number": {
"title": "Disc Number",
"type": "integer"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"linked_from": {
"anyOf": [
{
"$ref": "#/$defs/LinkedFrom"
},
{
"type": "null"
}
],
"default": null
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"track_number": {
"title": "Track Number",
"type": "integer"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
}
},
"required": [
"artists",
"disc_number",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"name",
"track_number",
"type",
"uri",
"is_local"
],
"title": "SimplifiedTrack",
"type": "object"
}
Config:
extra:allow
Fields:
-
artists(list[SimplifiedArtist]) -
available_markets(list[str] | None) -
disc_number(int) -
duration_ms(int) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
is_playable(bool | None) -
linked_from(LinkedFrom | None) -
restrictions(Restriction | None) -
name(str) -
preview_url(str | None) -
track_number(int) -
type_(Literal['track']) -
uri(str) -
is_local(bool)
artists
pydantic-field
available_markets = None
pydantic-field
disc_number
pydantic-field
duration_ms
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
is_local
pydantic-field
is_playable = None
pydantic-field
linked_from = None
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
preview_url = None
pydantic-field
restrictions = None
pydantic-field
track_number
pydantic-field
type_
pydantic-field
uri
pydantic-field
SpotifyModel
pydantic-model
Bases: BaseModel
Base model for all Spotify API objects. Allows extra fields for forward compatibility.
Show JSON schema:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
Audiobook models
Audiobook and chapter models.
Audiobook
pydantic-model
Bases: SimplifiedAudiobook
Complete audiobook with chapter list.
Show JSON schema:
{
"$defs": {
"AudiobookAuthor": {
"additionalProperties": true,
"description": "Author of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookAuthor",
"type": "object"
},
"AudiobookNarrator": {
"additionalProperties": true,
"description": "Narrator of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookNarrator",
"type": "object"
},
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Page_SimplifiedChapter_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/SimplifiedChapter"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[SimplifiedChapter]",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
},
"SimplifiedChapter": {
"additionalProperties": true,
"description": "Basic chapter info embedded in other objects.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"chapter_number": {
"title": "Chapter Number",
"type": "integer"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "chapter",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"chapter_number",
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri"
],
"title": "SimplifiedChapter",
"type": "object"
}
},
"additionalProperties": true,
"description": "Complete audiobook with chapter list.",
"properties": {
"authors": {
"items": {
"$ref": "#/$defs/AudiobookAuthor"
},
"title": "Authors",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"edition": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Edition"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"narrators": {
"items": {
"$ref": "#/$defs/AudiobookNarrator"
},
"title": "Narrators",
"type": "array"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "audiobook",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_chapters": {
"title": "Total Chapters",
"type": "integer"
},
"chapters": {
"$ref": "#/$defs/Page_SimplifiedChapter_"
}
},
"required": [
"authors",
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"narrators",
"publisher",
"type",
"uri",
"total_chapters",
"chapters"
],
"title": "Audiobook",
"type": "object"
}
Fields:
-
authors(list[AudiobookAuthor]) -
available_markets(list[str] | None) -
copyrights(list[Copyright]) -
description(str) -
html_description(str) -
edition(str | None) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
languages(list[str]) -
media_type(str) -
name(str) -
narrators(list[AudiobookNarrator]) -
publisher(str) -
type_(Literal['audiobook']) -
uri(str) -
total_chapters(int) -
chapters(Page[SimplifiedChapter])
authors
pydantic-field
available_markets = None
pydantic-field
chapters
pydantic-field
copyrights
pydantic-field
description
pydantic-field
edition = None
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
languages
pydantic-field
media_type
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
narrators
pydantic-field
publisher
pydantic-field
total_chapters
pydantic-field
type_
pydantic-field
uri
pydantic-field
AudiobookAuthor
pydantic-model
Bases: SpotifyModel
Author of an audiobook.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
AudiobookNarrator
pydantic-model
Bases: SpotifyModel
Narrator of an audiobook.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
Chapter
pydantic-model
Bases: SimplifiedChapter
Complete chapter with audiobook info.
Show JSON schema:
{
"$defs": {
"AudiobookAuthor": {
"additionalProperties": true,
"description": "Author of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookAuthor",
"type": "object"
},
"AudiobookNarrator": {
"additionalProperties": true,
"description": "Narrator of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookNarrator",
"type": "object"
},
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
},
"SimplifiedAudiobook": {
"additionalProperties": true,
"description": "Basic audiobook info embedded in other objects.",
"properties": {
"authors": {
"items": {
"$ref": "#/$defs/AudiobookAuthor"
},
"title": "Authors",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"edition": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Edition"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"narrators": {
"items": {
"$ref": "#/$defs/AudiobookNarrator"
},
"title": "Narrators",
"type": "array"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "audiobook",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_chapters": {
"title": "Total Chapters",
"type": "integer"
}
},
"required": [
"authors",
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"narrators",
"publisher",
"type",
"uri",
"total_chapters"
],
"title": "SimplifiedAudiobook",
"type": "object"
}
},
"additionalProperties": true,
"description": "Complete chapter with audiobook info.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"chapter_number": {
"title": "Chapter Number",
"type": "integer"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "chapter",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"audiobook": {
"$ref": "#/$defs/SimplifiedAudiobook"
}
},
"required": [
"chapter_number",
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"audiobook"
],
"title": "Chapter",
"type": "object"
}
Fields:
-
audio_preview_url(str | None) -
available_markets(list[str] | None) -
chapter_number(int) -
description(str) -
html_description(str) -
duration_ms(int) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
is_playable(bool | None) -
languages(list[str]) -
name(str) -
release_date(str) -
release_date_precision(str) -
restrictions(Restriction | None) -
resume_point(ResumePoint | None) -
type_(Literal['chapter']) -
uri(str) -
audiobook(SimplifiedAudiobook)
audio_preview_url = None
pydantic-field
audiobook
pydantic-field
available_markets = None
pydantic-field
chapter_number
pydantic-field
description
pydantic-field
duration_ms
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
is_playable = None
pydantic-field
languages
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
release_date
pydantic-field
release_date_precision
pydantic-field
restrictions = None
pydantic-field
resume_point = None
pydantic-field
type_
pydantic-field
uri
pydantic-field
Copyright
pydantic-model
Bases: SpotifyModel
Copyright statement. Type is 'C' (copyright) or 'P' (performance).
Show JSON schema:
{
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
}
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
text
pydantic-field
type_
pydantic-field
ExternalUrls
pydantic-model
Bases: SpotifyModel
URLs for opening a resource in the Spotify web player.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
spotify
pydantic-field
Image
pydantic-model
Bases: SpotifyModel
Cover art or profile image. Dimensions may be null for user-uploaded images.
Show JSON schema:
{
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
Fields:
height
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
url
pydantic-field
width
pydantic-field
Page
pydantic-model
Bases: SpotifyModel, Generic[T]
Paginated response containing items and navigation links.
Show JSON schema:
{
"additionalProperties": true,
"description": "Paginated response containing items and navigation links.",
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page",
"type": "object"
}
Fields:
-
href(str) -
limit(int) -
next(str | None) -
offset(int) -
previous(str | None) -
total(int) -
items(list[T])
href
pydantic-field
items
pydantic-field
limit
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
next
pydantic-field
offset
pydantic-field
previous
pydantic-field
total
pydantic-field
Restriction
pydantic-model
Bases: SpotifyModel
Content restriction. Reason is 'market', 'product', or 'explicit'.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
reason
pydantic-field
ResumePoint
pydantic-model
Bases: SpotifyModel
Resume point for a chapter.
Show JSON schema:
{
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
}
Fields:
fully_played
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
resume_position_ms
pydantic-field
SavedAudiobook
pydantic-model
Bases: SpotifyModel
Audiobook saved in a user's library with timestamp metadata.
Show JSON schema:
{
"$defs": {
"AudiobookAuthor": {
"additionalProperties": true,
"description": "Author of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookAuthor",
"type": "object"
},
"AudiobookNarrator": {
"additionalProperties": true,
"description": "Narrator of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookNarrator",
"type": "object"
},
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"SimplifiedAudiobook": {
"additionalProperties": true,
"description": "Basic audiobook info embedded in other objects.",
"properties": {
"authors": {
"items": {
"$ref": "#/$defs/AudiobookAuthor"
},
"title": "Authors",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"edition": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Edition"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"narrators": {
"items": {
"$ref": "#/$defs/AudiobookNarrator"
},
"title": "Narrators",
"type": "array"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "audiobook",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_chapters": {
"title": "Total Chapters",
"type": "integer"
}
},
"required": [
"authors",
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"narrators",
"publisher",
"type",
"uri",
"total_chapters"
],
"title": "SimplifiedAudiobook",
"type": "object"
}
},
"additionalProperties": true,
"description": "Audiobook saved in a user's library with timestamp metadata.",
"properties": {
"added_at": {
"format": "date-time",
"title": "Added At",
"type": "string"
},
"audiobook": {
"$ref": "#/$defs/SimplifiedAudiobook"
}
},
"required": [
"added_at",
"audiobook"
],
"title": "SavedAudiobook",
"type": "object"
}
Fields:
added_at
pydantic-field
audiobook
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
SimplifiedAudiobook
pydantic-model
Bases: SpotifyModel
Basic audiobook info embedded in other objects.
Show JSON schema:
{
"$defs": {
"AudiobookAuthor": {
"additionalProperties": true,
"description": "Author of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookAuthor",
"type": "object"
},
"AudiobookNarrator": {
"additionalProperties": true,
"description": "Narrator of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookNarrator",
"type": "object"
},
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic audiobook info embedded in other objects.",
"properties": {
"authors": {
"items": {
"$ref": "#/$defs/AudiobookAuthor"
},
"title": "Authors",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"edition": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Edition"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"narrators": {
"items": {
"$ref": "#/$defs/AudiobookNarrator"
},
"title": "Narrators",
"type": "array"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "audiobook",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_chapters": {
"title": "Total Chapters",
"type": "integer"
}
},
"required": [
"authors",
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"narrators",
"publisher",
"type",
"uri",
"total_chapters"
],
"title": "SimplifiedAudiobook",
"type": "object"
}
Fields:
-
authors(list[AudiobookAuthor]) -
available_markets(list[str] | None) -
copyrights(list[Copyright]) -
description(str) -
html_description(str) -
edition(str | None) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
languages(list[str]) -
media_type(str) -
name(str) -
narrators(list[AudiobookNarrator]) -
publisher(str) -
type_(Literal['audiobook']) -
uri(str) -
total_chapters(int)
authors
pydantic-field
available_markets = None
pydantic-field
copyrights
pydantic-field
description
pydantic-field
edition = None
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
languages
pydantic-field
media_type
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
narrators
pydantic-field
publisher
pydantic-field
total_chapters
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedChapter
pydantic-model
Bases: SpotifyModel
Basic chapter info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic chapter info embedded in other objects.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"chapter_number": {
"title": "Chapter Number",
"type": "integer"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "chapter",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"chapter_number",
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri"
],
"title": "SimplifiedChapter",
"type": "object"
}
Fields:
-
audio_preview_url(str | None) -
available_markets(list[str] | None) -
chapter_number(int) -
description(str) -
html_description(str) -
duration_ms(int) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
is_playable(bool | None) -
languages(list[str]) -
name(str) -
release_date(str) -
release_date_precision(str) -
restrictions(Restriction | None) -
resume_point(ResumePoint | None) -
type_(Literal['chapter']) -
uri(str)
audio_preview_url = None
pydantic-field
available_markets = None
pydantic-field
chapter_number
pydantic-field
description
pydantic-field
duration_ms
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
is_playable = None
pydantic-field
languages
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
release_date
pydantic-field
release_date_precision
pydantic-field
restrictions = None
pydantic-field
resume_point = None
pydantic-field
type_
pydantic-field
uri
pydantic-field
SpotifyModel
pydantic-model
Bases: BaseModel
Base model for all Spotify API objects. Allows extra fields for forward compatibility.
Show JSON schema:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
Artist models
Artist models.
Artist
pydantic-model
Bases: SimplifiedArtist
Complete artist profile with followers, genres, and images.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Followers": {
"additionalProperties": true,
"description": "Follower information for an artist or playlist.",
"properties": {
"href": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Href"
},
"total": {
"title": "Total",
"type": "integer"
}
},
"required": [
"href",
"total"
],
"title": "Followers",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
},
"additionalProperties": true,
"description": "Complete artist profile with followers, genres, and images.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"followers": {
"$ref": "#/$defs/Followers"
},
"genres": {
"items": {
"type": "string"
},
"title": "Genres",
"type": "array"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri",
"followers",
"genres",
"images",
"popularity"
],
"title": "Artist",
"type": "object"
}
Fields:
-
external_urls(ExternalUrls) -
href(str) -
id(str) -
name(str) -
type_(Literal['artist']) -
uri(str) -
followers(Followers) -
genres(list[str]) -
images(list[Image]) -
popularity(int)
external_urls
pydantic-field
followers
pydantic-field
genres
pydantic-field
href
pydantic-field
id
pydantic-field
images
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
popularity
pydantic-field
type_
pydantic-field
uri
pydantic-field
ExternalUrls
pydantic-model
Bases: SpotifyModel
URLs for opening a resource in the Spotify web player.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
spotify
pydantic-field
Followers
pydantic-model
Bases: SpotifyModel
Follower information for an artist or playlist.
Show JSON schema:
{
"additionalProperties": true,
"description": "Follower information for an artist or playlist.",
"properties": {
"href": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Href"
},
"total": {
"title": "Total",
"type": "integer"
}
},
"required": [
"href",
"total"
],
"title": "Followers",
"type": "object"
}
Fields:
href
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
total
pydantic-field
Image
pydantic-model
Bases: SpotifyModel
Cover art or profile image. Dimensions may be null for user-uploaded images.
Show JSON schema:
{
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
Fields:
height
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
url
pydantic-field
width
pydantic-field
SimplifiedArtist
pydantic-model
Bases: SpotifyModel
Basic artist info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
}
Fields:
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
type_
pydantic-field
uri
pydantic-field
SpotifyModel
pydantic-model
Bases: BaseModel
Base model for all Spotify API objects. Allows extra fields for forward compatibility.
Show JSON schema:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
Playlist models
Playlist models.
PlaybackItem = Track | Episode
module-attribute
PlaylistItemContent = PlaybackItem | PlaylistEpisode
module-attribute
ExternalUrls
pydantic-model
Bases: SpotifyModel
URLs for opening a resource in the Spotify web player.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
spotify
pydantic-field
Image
pydantic-model
Bases: SpotifyModel
Cover art or profile image. Dimensions may be null for user-uploaded images.
Show JSON schema:
{
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
Fields:
height
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
url
pydantic-field
width
pydantic-field
Page
pydantic-model
Bases: SpotifyModel, Generic[T]
Paginated response containing items and navigation links.
Show JSON schema:
{
"additionalProperties": true,
"description": "Paginated response containing items and navigation links.",
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page",
"type": "object"
}
Fields:
-
href(str) -
limit(int) -
next(str | None) -
offset(int) -
previous(str | None) -
total(int) -
items(list[T])
href
pydantic-field
items
pydantic-field
limit
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
next
pydantic-field
offset
pydantic-field
previous
pydantic-field
total
pydantic-field
Playlist
pydantic-model
Bases: SimplifiedPlaylist
Complete playlist with item details.
Show JSON schema:
{
"$defs": {
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"Episode": {
"additionalProperties": true,
"description": "Complete episode with show info.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"show": {
"$ref": "#/$defs/SimplifiedShow"
}
},
"required": [
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"show"
],
"title": "Episode",
"type": "object"
},
"ExternalIds": {
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"LinkedFrom": {
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
},
"Page_PlaylistItem_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/PlaylistItem"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[PlaylistItem]",
"type": "object"
},
"PlaylistEpisode": {
"additionalProperties": true,
"description": "Episode payload returned by playlist items for some Spotify responses.",
"properties": {
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"episode": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Episode"
},
"track": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Track"
},
"album": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Album"
},
"artists": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Artists"
},
"disc_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Disc Number"
},
"track_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Track Number"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"external_ids": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "External Ids"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"popularity": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Popularity"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
}
},
"required": [
"explicit",
"type",
"duration_ms",
"external_urls",
"href",
"id",
"name",
"uri",
"is_local"
],
"title": "PlaylistEpisode",
"type": "object"
},
"PlaylistItem": {
"additionalProperties": true,
"description": "Playlist item with metadata about when and who added it.",
"properties": {
"added_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Added At"
},
"added_by": {
"anyOf": [
{
"$ref": "#/$defs/PublicUser"
},
{
"type": "null"
}
],
"default": null
},
"is_local": {
"title": "Is Local",
"type": "boolean"
},
"item": {
"anyOf": [
{
"$ref": "#/$defs/Track"
},
{
"$ref": "#/$defs/Episode"
},
{
"$ref": "#/$defs/PlaylistEpisode"
},
{
"type": "null"
}
],
"title": "Item"
}
},
"required": [
"is_local",
"item"
],
"title": "PlaylistItem",
"type": "object"
},
"PublicUser": {
"additionalProperties": true,
"description": "Public user profile for embedded user references.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "user",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "PublicUser",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
},
"SimplifiedAlbum": {
"additionalProperties": true,
"description": "Basic album info embedded in other objects.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists"
],
"title": "SimplifiedAlbum",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
},
"SimplifiedShow": {
"additionalProperties": true,
"description": "Basic show info embedded in other objects.",
"properties": {
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "show",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_episodes": {
"title": "Total Episodes",
"type": "integer"
}
},
"required": [
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"publisher",
"type",
"uri",
"total_episodes"
],
"title": "SimplifiedShow",
"type": "object"
},
"Track": {
"additionalProperties": true,
"description": "Complete track with album, popularity, and external IDs.",
"properties": {
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"disc_number": {
"title": "Disc Number",
"type": "integer"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"linked_from": {
"anyOf": [
{
"$ref": "#/$defs/LinkedFrom"
},
{
"type": "null"
}
],
"default": null
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"track_number": {
"title": "Track Number",
"type": "integer"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
},
"album": {
"$ref": "#/$defs/SimplifiedAlbum"
},
"external_ids": {
"$ref": "#/$defs/ExternalIds"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"artists",
"disc_number",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"name",
"track_number",
"type",
"uri",
"is_local",
"album",
"external_ids",
"popularity"
],
"title": "Track",
"type": "object"
}
},
"additionalProperties": true,
"description": "Complete playlist with item details.",
"properties": {
"collaborative": {
"title": "Collaborative",
"type": "boolean"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"owner": {
"$ref": "#/$defs/PublicUser"
},
"public": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Public"
},
"snapshot_id": {
"title": "Snapshot Id",
"type": "string"
},
"items": {
"$ref": "#/$defs/Page_PlaylistItem_"
},
"type": {
"const": "playlist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"collaborative",
"description",
"external_urls",
"href",
"id",
"images",
"name",
"owner",
"public",
"snapshot_id",
"items",
"type",
"uri"
],
"title": "Playlist",
"type": "object"
}
Fields:
-
collaborative(bool) -
description(str | None) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
name(str) -
owner(PublicUser) -
public(bool | None) -
snapshot_id(str) -
type_(Literal['playlist']) -
uri(str) -
items(Page[PlaylistItem])
collaborative
pydantic-field
description
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
images
pydantic-field
items
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
owner
pydantic-field
public
pydantic-field
snapshot_id
pydantic-field
type_
pydantic-field
uri
pydantic-field
PlaylistEpisode
pydantic-model
Bases: SpotifyModel
Episode payload returned by playlist items for some Spotify responses.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
}
},
"additionalProperties": true,
"description": "Episode payload returned by playlist items for some Spotify responses.",
"properties": {
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"episode": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Episode"
},
"track": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Track"
},
"album": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Album"
},
"artists": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Artists"
},
"disc_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Disc Number"
},
"track_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Track Number"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"external_ids": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "External Ids"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"popularity": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Popularity"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
}
},
"required": [
"explicit",
"type",
"duration_ms",
"external_urls",
"href",
"id",
"name",
"uri",
"is_local"
],
"title": "PlaylistEpisode",
"type": "object"
}
Fields:
-
preview_url(str | None) -
available_markets(list[str] | None) -
explicit(bool) -
type_(Literal['episode']) -
episode(bool | None) -
track_(bool | None) -
album(dict[str, object] | None) -
artists(list[dict[str, object]] | None) -
disc_number(int | None) -
track_number(int | None) -
duration_ms(int) -
external_ids(dict[str, str] | None) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
name(str) -
popularity(int | None) -
uri(str) -
is_local(bool)
album = None
pydantic-field
artists = None
pydantic-field
available_markets = None
pydantic-field
disc_number = None
pydantic-field
duration_ms
pydantic-field
episode = None
pydantic-field
explicit
pydantic-field
external_ids = None
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
is_local
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
popularity = None
pydantic-field
preview_url = None
pydantic-field
track_ = None
pydantic-field
track_number = None
pydantic-field
type_
pydantic-field
uri
pydantic-field
PlaylistItem
pydantic-model
Bases: SpotifyModel
Playlist item with metadata about when and who added it.
Show JSON schema:
{
"$defs": {
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"Episode": {
"additionalProperties": true,
"description": "Complete episode with show info.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"show": {
"$ref": "#/$defs/SimplifiedShow"
}
},
"required": [
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"show"
],
"title": "Episode",
"type": "object"
},
"ExternalIds": {
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"LinkedFrom": {
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
},
"PlaylistEpisode": {
"additionalProperties": true,
"description": "Episode payload returned by playlist items for some Spotify responses.",
"properties": {
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"episode": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Episode"
},
"track": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Track"
},
"album": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Album"
},
"artists": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Artists"
},
"disc_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Disc Number"
},
"track_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Track Number"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"external_ids": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "External Ids"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"popularity": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Popularity"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
}
},
"required": [
"explicit",
"type",
"duration_ms",
"external_urls",
"href",
"id",
"name",
"uri",
"is_local"
],
"title": "PlaylistEpisode",
"type": "object"
},
"PublicUser": {
"additionalProperties": true,
"description": "Public user profile for embedded user references.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "user",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "PublicUser",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
},
"SimplifiedAlbum": {
"additionalProperties": true,
"description": "Basic album info embedded in other objects.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists"
],
"title": "SimplifiedAlbum",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
},
"SimplifiedShow": {
"additionalProperties": true,
"description": "Basic show info embedded in other objects.",
"properties": {
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "show",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_episodes": {
"title": "Total Episodes",
"type": "integer"
}
},
"required": [
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"publisher",
"type",
"uri",
"total_episodes"
],
"title": "SimplifiedShow",
"type": "object"
},
"Track": {
"additionalProperties": true,
"description": "Complete track with album, popularity, and external IDs.",
"properties": {
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"disc_number": {
"title": "Disc Number",
"type": "integer"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"linked_from": {
"anyOf": [
{
"$ref": "#/$defs/LinkedFrom"
},
{
"type": "null"
}
],
"default": null
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"track_number": {
"title": "Track Number",
"type": "integer"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
},
"album": {
"$ref": "#/$defs/SimplifiedAlbum"
},
"external_ids": {
"$ref": "#/$defs/ExternalIds"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"artists",
"disc_number",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"name",
"track_number",
"type",
"uri",
"is_local",
"album",
"external_ids",
"popularity"
],
"title": "Track",
"type": "object"
}
},
"additionalProperties": true,
"description": "Playlist item with metadata about when and who added it.",
"properties": {
"added_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Added At"
},
"added_by": {
"anyOf": [
{
"$ref": "#/$defs/PublicUser"
},
{
"type": "null"
}
],
"default": null
},
"is_local": {
"title": "Is Local",
"type": "boolean"
},
"item": {
"anyOf": [
{
"$ref": "#/$defs/Track"
},
{
"$ref": "#/$defs/Episode"
},
{
"$ref": "#/$defs/PlaylistEpisode"
},
{
"type": "null"
}
],
"title": "Item"
}
},
"required": [
"is_local",
"item"
],
"title": "PlaylistItem",
"type": "object"
}
Fields:
-
added_at(datetime | None) -
added_by(PublicUser | None) -
is_local(bool) -
item(PlaylistItemContent | None)
added_at = None
pydantic-field
added_by = None
pydantic-field
is_local
pydantic-field
item
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
PlaylistItemsRef
pydantic-model
Bases: SpotifyModel
Reference to playlist items with total count.
Show JSON schema:
Fields:
href
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
total
pydantic-field
PublicUser
pydantic-model
Bases: SpotifyModel
Public user profile for embedded user references.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
}
},
"additionalProperties": true,
"description": "Public user profile for embedded user references.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "user",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "PublicUser",
"type": "object"
}
Fields:
-
external_urls(ExternalUrls) -
href(str) -
id(str) -
type_(Literal['user']) -
uri(str) -
display_name(str | None)
display_name = None
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
type_
pydantic-field
uri
pydantic-field
SimplifiedPlaylist
pydantic-model
Bases: SpotifyModel
Basic playlist info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"PlaylistItemsRef": {
"additionalProperties": true,
"description": "Reference to playlist items with total count.",
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"total": {
"title": "Total",
"type": "integer"
}
},
"required": [
"href",
"total"
],
"title": "PlaylistItemsRef",
"type": "object"
},
"PublicUser": {
"additionalProperties": true,
"description": "Public user profile for embedded user references.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "user",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "PublicUser",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic playlist info embedded in other objects.",
"properties": {
"collaborative": {
"title": "Collaborative",
"type": "boolean"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"owner": {
"$ref": "#/$defs/PublicUser"
},
"public": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Public"
},
"snapshot_id": {
"title": "Snapshot Id",
"type": "string"
},
"items": {
"$ref": "#/$defs/PlaylistItemsRef"
},
"type": {
"const": "playlist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"collaborative",
"description",
"external_urls",
"href",
"id",
"images",
"name",
"owner",
"public",
"snapshot_id",
"items",
"type",
"uri"
],
"title": "SimplifiedPlaylist",
"type": "object"
}
Fields:
-
collaborative(bool) -
description(str | None) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
name(str) -
owner(PublicUser) -
public(bool | None) -
snapshot_id(str) -
items(PlaylistItemsRef) -
type_(Literal['playlist']) -
uri(str)
collaborative
pydantic-field
description
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
images
pydantic-field
items
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
owner
pydantic-field
public
pydantic-field
snapshot_id
pydantic-field
type_
pydantic-field
uri
pydantic-field
SpotifyModel
pydantic-model
Bases: BaseModel
Base model for all Spotify API objects. Allows extra fields for forward compatibility.
Show JSON schema:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
Search models
Search models.
Artist
pydantic-model
Bases: SimplifiedArtist
Complete artist profile with followers, genres, and images.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Followers": {
"additionalProperties": true,
"description": "Follower information for an artist or playlist.",
"properties": {
"href": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Href"
},
"total": {
"title": "Total",
"type": "integer"
}
},
"required": [
"href",
"total"
],
"title": "Followers",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
},
"additionalProperties": true,
"description": "Complete artist profile with followers, genres, and images.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"followers": {
"$ref": "#/$defs/Followers"
},
"genres": {
"items": {
"type": "string"
},
"title": "Genres",
"type": "array"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri",
"followers",
"genres",
"images",
"popularity"
],
"title": "Artist",
"type": "object"
}
Fields:
-
external_urls(ExternalUrls) -
href(str) -
id(str) -
name(str) -
type_(Literal['artist']) -
uri(str) -
followers(Followers) -
genres(list[str]) -
images(list[Image]) -
popularity(int)
external_urls
pydantic-field
followers
pydantic-field
genres
pydantic-field
href
pydantic-field
id
pydantic-field
images
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
popularity
pydantic-field
type_
pydantic-field
uri
pydantic-field
Page
pydantic-model
Bases: SpotifyModel, Generic[T]
Paginated response containing items and navigation links.
Show JSON schema:
{
"additionalProperties": true,
"description": "Paginated response containing items and navigation links.",
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page",
"type": "object"
}
Fields:
-
href(str) -
limit(int) -
next(str | None) -
offset(int) -
previous(str | None) -
total(int) -
items(list[T])
href
pydantic-field
items
pydantic-field
limit
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
next
pydantic-field
offset
pydantic-field
previous
pydantic-field
total
pydantic-field
SearchResult
pydantic-model
Bases: SpotifyModel
Typed container for Spotify search results.
Show JSON schema:
{
"$defs": {
"Artist": {
"additionalProperties": true,
"description": "Complete artist profile with followers, genres, and images.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"followers": {
"$ref": "#/$defs/Followers"
},
"genres": {
"items": {
"type": "string"
},
"title": "Genres",
"type": "array"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri",
"followers",
"genres",
"images",
"popularity"
],
"title": "Artist",
"type": "object"
},
"AudiobookAuthor": {
"additionalProperties": true,
"description": "Author of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookAuthor",
"type": "object"
},
"AudiobookNarrator": {
"additionalProperties": true,
"description": "Narrator of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookNarrator",
"type": "object"
},
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalIds": {
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Followers": {
"additionalProperties": true,
"description": "Follower information for an artist or playlist.",
"properties": {
"href": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Href"
},
"total": {
"title": "Total",
"type": "integer"
}
},
"required": [
"href",
"total"
],
"title": "Followers",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"LinkedFrom": {
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
},
"Page_Artist_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/Artist"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[Artist]",
"type": "object"
},
"Page_SimplifiedAlbum_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/SimplifiedAlbum"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[SimplifiedAlbum]",
"type": "object"
},
"Page_SimplifiedAudiobook_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/SimplifiedAudiobook"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[SimplifiedAudiobook]",
"type": "object"
},
"Page_SimplifiedEpisode_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/SimplifiedEpisode"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[SimplifiedEpisode]",
"type": "object"
},
"Page_SimplifiedPlaylist_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/SimplifiedPlaylist"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[SimplifiedPlaylist]",
"type": "object"
},
"Page_SimplifiedShow_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/SimplifiedShow"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[SimplifiedShow]",
"type": "object"
},
"Page_Track_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/Track"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[Track]",
"type": "object"
},
"PlaylistItemsRef": {
"additionalProperties": true,
"description": "Reference to playlist items with total count.",
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"total": {
"title": "Total",
"type": "integer"
}
},
"required": [
"href",
"total"
],
"title": "PlaylistItemsRef",
"type": "object"
},
"PublicUser": {
"additionalProperties": true,
"description": "Public user profile for embedded user references.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "user",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "PublicUser",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
},
"SimplifiedAlbum": {
"additionalProperties": true,
"description": "Basic album info embedded in other objects.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists"
],
"title": "SimplifiedAlbum",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
},
"SimplifiedAudiobook": {
"additionalProperties": true,
"description": "Basic audiobook info embedded in other objects.",
"properties": {
"authors": {
"items": {
"$ref": "#/$defs/AudiobookAuthor"
},
"title": "Authors",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"edition": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Edition"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"narrators": {
"items": {
"$ref": "#/$defs/AudiobookNarrator"
},
"title": "Narrators",
"type": "array"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "audiobook",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_chapters": {
"title": "Total Chapters",
"type": "integer"
}
},
"required": [
"authors",
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"narrators",
"publisher",
"type",
"uri",
"total_chapters"
],
"title": "SimplifiedAudiobook",
"type": "object"
},
"SimplifiedEpisode": {
"additionalProperties": true,
"description": "Basic episode info embedded in other objects.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri"
],
"title": "SimplifiedEpisode",
"type": "object"
},
"SimplifiedPlaylist": {
"additionalProperties": true,
"description": "Basic playlist info embedded in other objects.",
"properties": {
"collaborative": {
"title": "Collaborative",
"type": "boolean"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"owner": {
"$ref": "#/$defs/PublicUser"
},
"public": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Public"
},
"snapshot_id": {
"title": "Snapshot Id",
"type": "string"
},
"items": {
"$ref": "#/$defs/PlaylistItemsRef"
},
"type": {
"const": "playlist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"collaborative",
"description",
"external_urls",
"href",
"id",
"images",
"name",
"owner",
"public",
"snapshot_id",
"items",
"type",
"uri"
],
"title": "SimplifiedPlaylist",
"type": "object"
},
"SimplifiedShow": {
"additionalProperties": true,
"description": "Basic show info embedded in other objects.",
"properties": {
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "show",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_episodes": {
"title": "Total Episodes",
"type": "integer"
}
},
"required": [
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"publisher",
"type",
"uri",
"total_episodes"
],
"title": "SimplifiedShow",
"type": "object"
},
"Track": {
"additionalProperties": true,
"description": "Complete track with album, popularity, and external IDs.",
"properties": {
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"disc_number": {
"title": "Disc Number",
"type": "integer"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"linked_from": {
"anyOf": [
{
"$ref": "#/$defs/LinkedFrom"
},
{
"type": "null"
}
],
"default": null
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"track_number": {
"title": "Track Number",
"type": "integer"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
},
"album": {
"$ref": "#/$defs/SimplifiedAlbum"
},
"external_ids": {
"$ref": "#/$defs/ExternalIds"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"artists",
"disc_number",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"name",
"track_number",
"type",
"uri",
"is_local",
"album",
"external_ids",
"popularity"
],
"title": "Track",
"type": "object"
}
},
"additionalProperties": true,
"description": "Typed container for Spotify search results.",
"properties": {
"tracks": {
"anyOf": [
{
"$ref": "#/$defs/Page_Track_"
},
{
"type": "null"
}
],
"default": null
},
"artists": {
"anyOf": [
{
"$ref": "#/$defs/Page_Artist_"
},
{
"type": "null"
}
],
"default": null
},
"albums": {
"anyOf": [
{
"$ref": "#/$defs/Page_SimplifiedAlbum_"
},
{
"type": "null"
}
],
"default": null
},
"playlists": {
"anyOf": [
{
"$ref": "#/$defs/Page_SimplifiedPlaylist_"
},
{
"type": "null"
}
],
"default": null
},
"shows": {
"anyOf": [
{
"$ref": "#/$defs/Page_SimplifiedShow_"
},
{
"type": "null"
}
],
"default": null
},
"episodes": {
"anyOf": [
{
"$ref": "#/$defs/Page_SimplifiedEpisode_"
},
{
"type": "null"
}
],
"default": null
},
"audiobooks": {
"anyOf": [
{
"$ref": "#/$defs/Page_SimplifiedAudiobook_"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "SearchResult",
"type": "object"
}
Fields:
-
tracks(Page[Track] | None) -
artists(Page[Artist] | None) -
albums(Page[SimplifiedAlbum] | None) -
playlists(Page[SimplifiedPlaylist] | None) -
shows(Page[SimplifiedShow] | None) -
episodes(Page[SimplifiedEpisode] | None) -
audiobooks(Page[SimplifiedAudiobook] | None)
albums = None
pydantic-field
artists = None
pydantic-field
audiobooks = None
pydantic-field
episodes = None
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
playlists = None
pydantic-field
shows = None
pydantic-field
tracks = None
pydantic-field
SimplifiedAlbum
pydantic-model
Bases: SpotifyModel
Basic album info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic album info embedded in other objects.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists"
],
"title": "SimplifiedAlbum",
"type": "object"
}
Fields:
-
album_type(str) -
total_tracks(int) -
available_markets(list[str] | None) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
name(str) -
release_date(str) -
release_date_precision(str) -
restrictions(Restriction | None) -
type_(Literal['album']) -
uri(str) -
artists(list[SimplifiedArtist])
album_type
pydantic-field
artists
pydantic-field
available_markets = None
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
images
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
release_date
pydantic-field
release_date_precision
pydantic-field
restrictions = None
pydantic-field
total_tracks
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedAudiobook
pydantic-model
Bases: SpotifyModel
Basic audiobook info embedded in other objects.
Show JSON schema:
{
"$defs": {
"AudiobookAuthor": {
"additionalProperties": true,
"description": "Author of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookAuthor",
"type": "object"
},
"AudiobookNarrator": {
"additionalProperties": true,
"description": "Narrator of an audiobook.",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "AudiobookNarrator",
"type": "object"
},
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic audiobook info embedded in other objects.",
"properties": {
"authors": {
"items": {
"$ref": "#/$defs/AudiobookAuthor"
},
"title": "Authors",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"edition": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Edition"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"narrators": {
"items": {
"$ref": "#/$defs/AudiobookNarrator"
},
"title": "Narrators",
"type": "array"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "audiobook",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_chapters": {
"title": "Total Chapters",
"type": "integer"
}
},
"required": [
"authors",
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"narrators",
"publisher",
"type",
"uri",
"total_chapters"
],
"title": "SimplifiedAudiobook",
"type": "object"
}
Fields:
-
authors(list[AudiobookAuthor]) -
available_markets(list[str] | None) -
copyrights(list[Copyright]) -
description(str) -
html_description(str) -
edition(str | None) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
languages(list[str]) -
media_type(str) -
name(str) -
narrators(list[AudiobookNarrator]) -
publisher(str) -
type_(Literal['audiobook']) -
uri(str) -
total_chapters(int)
authors
pydantic-field
available_markets = None
pydantic-field
copyrights
pydantic-field
description
pydantic-field
edition = None
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
languages
pydantic-field
media_type
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
narrators
pydantic-field
publisher
pydantic-field
total_chapters
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedEpisode
pydantic-model
Bases: SpotifyModel
Basic episode info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic episode info embedded in other objects.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri"
],
"title": "SimplifiedEpisode",
"type": "object"
}
Fields:
-
audio_preview_url(str | None) -
description(str) -
html_description(str) -
duration_ms(int) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
is_externally_hosted(bool | None) -
is_playable(bool | None) -
language(str | None) -
languages(list[str]) -
name(str) -
release_date(str) -
release_date_precision(str) -
restrictions(Restriction | None) -
resume_point(ResumePoint | None) -
type_(Literal['episode']) -
uri(str)
audio_preview_url = None
pydantic-field
description
pydantic-field
duration_ms
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
is_externally_hosted = None
pydantic-field
is_playable = None
pydantic-field
language = None
pydantic-field
languages
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
release_date
pydantic-field
release_date_precision
pydantic-field
restrictions = None
pydantic-field
resume_point = None
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedPlaylist
pydantic-model
Bases: SpotifyModel
Basic playlist info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"PlaylistItemsRef": {
"additionalProperties": true,
"description": "Reference to playlist items with total count.",
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"total": {
"title": "Total",
"type": "integer"
}
},
"required": [
"href",
"total"
],
"title": "PlaylistItemsRef",
"type": "object"
},
"PublicUser": {
"additionalProperties": true,
"description": "Public user profile for embedded user references.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "user",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "PublicUser",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic playlist info embedded in other objects.",
"properties": {
"collaborative": {
"title": "Collaborative",
"type": "boolean"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"owner": {
"$ref": "#/$defs/PublicUser"
},
"public": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Public"
},
"snapshot_id": {
"title": "Snapshot Id",
"type": "string"
},
"items": {
"$ref": "#/$defs/PlaylistItemsRef"
},
"type": {
"const": "playlist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"collaborative",
"description",
"external_urls",
"href",
"id",
"images",
"name",
"owner",
"public",
"snapshot_id",
"items",
"type",
"uri"
],
"title": "SimplifiedPlaylist",
"type": "object"
}
Fields:
-
collaborative(bool) -
description(str | None) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
name(str) -
owner(PublicUser) -
public(bool | None) -
snapshot_id(str) -
items(PlaylistItemsRef) -
type_(Literal['playlist']) -
uri(str)
collaborative
pydantic-field
description
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
images
pydantic-field
items
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
owner
pydantic-field
public
pydantic-field
snapshot_id
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedShow
pydantic-model
Bases: SpotifyModel
Basic show info embedded in other objects.
Show JSON schema:
{
"$defs": {
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic show info embedded in other objects.",
"properties": {
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "show",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_episodes": {
"title": "Total Episodes",
"type": "integer"
}
},
"required": [
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"publisher",
"type",
"uri",
"total_episodes"
],
"title": "SimplifiedShow",
"type": "object"
}
Fields:
-
available_markets(list[str] | None) -
copyrights(list[Copyright]) -
description(str) -
html_description(str) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
is_externally_hosted(bool | None) -
languages(list[str]) -
media_type(str) -
name(str) -
publisher(str) -
type_(Literal['show']) -
uri(str) -
total_episodes(int)
available_markets = None
pydantic-field
copyrights
pydantic-field
description
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
is_externally_hosted = None
pydantic-field
languages
pydantic-field
media_type
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
publisher
pydantic-field
total_episodes
pydantic-field
type_
pydantic-field
uri
pydantic-field
SpotifyModel
pydantic-model
Bases: BaseModel
Base model for all Spotify API objects. Allows extra fields for forward compatibility.
Show JSON schema:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
Track
pydantic-model
Bases: SimplifiedTrack
Complete track with album, popularity, and external IDs.
Show JSON schema:
{
"$defs": {
"ExternalIds": {
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"LinkedFrom": {
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"SimplifiedAlbum": {
"additionalProperties": true,
"description": "Basic album info embedded in other objects.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists"
],
"title": "SimplifiedAlbum",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
}
},
"additionalProperties": true,
"description": "Complete track with album, popularity, and external IDs.",
"properties": {
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"disc_number": {
"title": "Disc Number",
"type": "integer"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"linked_from": {
"anyOf": [
{
"$ref": "#/$defs/LinkedFrom"
},
{
"type": "null"
}
],
"default": null
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"track_number": {
"title": "Track Number",
"type": "integer"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
},
"album": {
"$ref": "#/$defs/SimplifiedAlbum"
},
"external_ids": {
"$ref": "#/$defs/ExternalIds"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"artists",
"disc_number",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"name",
"track_number",
"type",
"uri",
"is_local",
"album",
"external_ids",
"popularity"
],
"title": "Track",
"type": "object"
}
Fields:
-
artists(list[SimplifiedArtist]) -
available_markets(list[str] | None) -
disc_number(int) -
duration_ms(int) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
is_playable(bool | None) -
linked_from(LinkedFrom | None) -
restrictions(Restriction | None) -
name(str) -
preview_url(str | None) -
track_number(int) -
type_(Literal['track']) -
uri(str) -
is_local(bool) -
album(SimplifiedAlbum) -
external_ids(ExternalIds) -
popularity(int)
album
pydantic-field
artists
pydantic-field
available_markets = None
pydantic-field
disc_number
pydantic-field
duration_ms
pydantic-field
explicit
pydantic-field
external_ids
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
is_local
pydantic-field
is_playable = None
pydantic-field
linked_from = None
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
popularity
pydantic-field
preview_url = None
pydantic-field
restrictions = None
pydantic-field
track_number
pydantic-field
type_
pydantic-field
uri
pydantic-field
Show and episode models
Show and episode models.
Copyright
pydantic-model
Bases: SpotifyModel
Copyright statement. Type is 'C' (copyright) or 'P' (performance).
Show JSON schema:
{
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
}
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
text
pydantic-field
type_
pydantic-field
Episode
pydantic-model
Bases: SimplifiedEpisode
Complete episode with show info.
Show JSON schema:
{
"$defs": {
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
},
"SimplifiedShow": {
"additionalProperties": true,
"description": "Basic show info embedded in other objects.",
"properties": {
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "show",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_episodes": {
"title": "Total Episodes",
"type": "integer"
}
},
"required": [
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"publisher",
"type",
"uri",
"total_episodes"
],
"title": "SimplifiedShow",
"type": "object"
}
},
"additionalProperties": true,
"description": "Complete episode with show info.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"show": {
"$ref": "#/$defs/SimplifiedShow"
}
},
"required": [
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"show"
],
"title": "Episode",
"type": "object"
}
Fields:
-
audio_preview_url(str | None) -
description(str) -
html_description(str) -
duration_ms(int) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
is_externally_hosted(bool | None) -
is_playable(bool | None) -
language(str | None) -
languages(list[str]) -
name(str) -
release_date(str) -
release_date_precision(str) -
restrictions(Restriction | None) -
resume_point(ResumePoint | None) -
type_(Literal['episode']) -
uri(str) -
show(SimplifiedShow)
audio_preview_url = None
pydantic-field
description
pydantic-field
duration_ms
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
is_externally_hosted = None
pydantic-field
is_playable = None
pydantic-field
language = None
pydantic-field
languages
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
release_date
pydantic-field
release_date_precision
pydantic-field
restrictions = None
pydantic-field
resume_point = None
pydantic-field
show
pydantic-field
type_
pydantic-field
uri
pydantic-field
ExternalUrls
pydantic-model
Bases: SpotifyModel
URLs for opening a resource in the Spotify web player.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
spotify
pydantic-field
Image
pydantic-model
Bases: SpotifyModel
Cover art or profile image. Dimensions may be null for user-uploaded images.
Show JSON schema:
{
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
Fields:
height
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
url
pydantic-field
width
pydantic-field
Page
pydantic-model
Bases: SpotifyModel, Generic[T]
Paginated response containing items and navigation links.
Show JSON schema:
{
"additionalProperties": true,
"description": "Paginated response containing items and navigation links.",
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page",
"type": "object"
}
Fields:
-
href(str) -
limit(int) -
next(str | None) -
offset(int) -
previous(str | None) -
total(int) -
items(list[T])
href
pydantic-field
items
pydantic-field
limit
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
next
pydantic-field
offset
pydantic-field
previous
pydantic-field
total
pydantic-field
Restriction
pydantic-model
Bases: SpotifyModel
Content restriction. Reason is 'market', 'product', or 'explicit'.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
reason
pydantic-field
ResumePoint
pydantic-model
Bases: SpotifyModel
Resume point for a chapter.
Show JSON schema:
{
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
}
Fields:
fully_played
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
resume_position_ms
pydantic-field
SavedEpisode
pydantic-model
Bases: SpotifyModel
Episode saved in a user's library with timestamp metadata.
Show JSON schema:
{
"$defs": {
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"Episode": {
"additionalProperties": true,
"description": "Complete episode with show info.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"show": {
"$ref": "#/$defs/SimplifiedShow"
}
},
"required": [
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"show"
],
"title": "Episode",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
},
"SimplifiedShow": {
"additionalProperties": true,
"description": "Basic show info embedded in other objects.",
"properties": {
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "show",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_episodes": {
"title": "Total Episodes",
"type": "integer"
}
},
"required": [
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"publisher",
"type",
"uri",
"total_episodes"
],
"title": "SimplifiedShow",
"type": "object"
}
},
"additionalProperties": true,
"description": "Episode saved in a user's library with timestamp metadata.",
"properties": {
"added_at": {
"format": "date-time",
"title": "Added At",
"type": "string"
},
"episode": {
"$ref": "#/$defs/Episode"
}
},
"required": [
"added_at",
"episode"
],
"title": "SavedEpisode",
"type": "object"
}
Fields:
added_at
pydantic-field
episode
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
SavedShow
pydantic-model
Bases: SpotifyModel
Show saved in a user's library with timestamp metadata.
Show JSON schema:
{
"$defs": {
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"SimplifiedShow": {
"additionalProperties": true,
"description": "Basic show info embedded in other objects.",
"properties": {
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "show",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_episodes": {
"title": "Total Episodes",
"type": "integer"
}
},
"required": [
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"publisher",
"type",
"uri",
"total_episodes"
],
"title": "SimplifiedShow",
"type": "object"
}
},
"additionalProperties": true,
"description": "Show saved in a user's library with timestamp metadata.",
"properties": {
"added_at": {
"format": "date-time",
"title": "Added At",
"type": "string"
},
"show": {
"$ref": "#/$defs/SimplifiedShow"
}
},
"required": [
"added_at",
"show"
],
"title": "SavedShow",
"type": "object"
}
Fields:
added_at
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
show
pydantic-field
Show
pydantic-model
Bases: SimplifiedShow
Complete show with episode list.
Show JSON schema:
{
"$defs": {
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Page_SimplifiedEpisode_": {
"additionalProperties": true,
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/$defs/SimplifiedEpisode"
},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page[SimplifiedEpisode]",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
},
"SimplifiedEpisode": {
"additionalProperties": true,
"description": "Basic episode info embedded in other objects.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri"
],
"title": "SimplifiedEpisode",
"type": "object"
}
},
"additionalProperties": true,
"description": "Complete show with episode list.",
"properties": {
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "show",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_episodes": {
"title": "Total Episodes",
"type": "integer"
},
"episodes": {
"$ref": "#/$defs/Page_SimplifiedEpisode_"
}
},
"required": [
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"publisher",
"type",
"uri",
"total_episodes",
"episodes"
],
"title": "Show",
"type": "object"
}
Fields:
-
available_markets(list[str] | None) -
copyrights(list[Copyright]) -
description(str) -
html_description(str) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
is_externally_hosted(bool | None) -
languages(list[str]) -
media_type(str) -
name(str) -
publisher(str) -
type_(Literal['show']) -
uri(str) -
total_episodes(int) -
episodes(Page[SimplifiedEpisode])
available_markets = None
pydantic-field
copyrights
pydantic-field
description
pydantic-field
episodes
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
is_externally_hosted = None
pydantic-field
languages
pydantic-field
media_type
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
publisher
pydantic-field
total_episodes
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedEpisode
pydantic-model
Bases: SpotifyModel
Basic episode info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"ResumePoint": {
"additionalProperties": true,
"description": "Resume point for a chapter.",
"properties": {
"fully_played": {
"title": "Fully Played",
"type": "boolean"
},
"resume_position_ms": {
"title": "Resume Position Ms",
"type": "integer"
}
},
"required": [
"fully_played",
"resume_position_ms"
],
"title": "ResumePoint",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic episode info embedded in other objects.",
"properties": {
"audio_preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Audio Preview Url"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"resume_point": {
"anyOf": [
{
"$ref": "#/$defs/ResumePoint"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "episode",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"description",
"html_description",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"name",
"release_date",
"release_date_precision",
"type",
"uri"
],
"title": "SimplifiedEpisode",
"type": "object"
}
Fields:
-
audio_preview_url(str | None) -
description(str) -
html_description(str) -
duration_ms(int) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
is_externally_hosted(bool | None) -
is_playable(bool | None) -
language(str | None) -
languages(list[str]) -
name(str) -
release_date(str) -
release_date_precision(str) -
restrictions(Restriction | None) -
resume_point(ResumePoint | None) -
type_(Literal['episode']) -
uri(str)
audio_preview_url = None
pydantic-field
description
pydantic-field
duration_ms
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
is_externally_hosted = None
pydantic-field
is_playable = None
pydantic-field
language = None
pydantic-field
languages
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
release_date
pydantic-field
release_date_precision
pydantic-field
restrictions = None
pydantic-field
resume_point = None
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedShow
pydantic-model
Bases: SpotifyModel
Basic show info embedded in other objects.
Show JSON schema:
{
"$defs": {
"Copyright": {
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic show info embedded in other objects.",
"properties": {
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"copyrights": {
"items": {
"$ref": "#/$defs/Copyright"
},
"title": "Copyrights",
"type": "array"
},
"description": {
"title": "Description",
"type": "string"
},
"html_description": {
"title": "Html Description",
"type": "string"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"is_externally_hosted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Externally Hosted"
},
"languages": {
"items": {
"type": "string"
},
"title": "Languages",
"type": "array"
},
"media_type": {
"title": "Media Type",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"publisher": {
"title": "Publisher",
"type": "string"
},
"type": {
"const": "show",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"total_episodes": {
"title": "Total Episodes",
"type": "integer"
}
},
"required": [
"copyrights",
"description",
"html_description",
"explicit",
"external_urls",
"href",
"id",
"images",
"languages",
"media_type",
"name",
"publisher",
"type",
"uri",
"total_episodes"
],
"title": "SimplifiedShow",
"type": "object"
}
Fields:
-
available_markets(list[str] | None) -
copyrights(list[Copyright]) -
description(str) -
html_description(str) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
is_externally_hosted(bool | None) -
languages(list[str]) -
media_type(str) -
name(str) -
publisher(str) -
type_(Literal['show']) -
uri(str) -
total_episodes(int)
available_markets = None
pydantic-field
copyrights
pydantic-field
description
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
html_description
pydantic-field
id
pydantic-field
images
pydantic-field
is_externally_hosted = None
pydantic-field
languages
pydantic-field
media_type
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
publisher
pydantic-field
total_episodes
pydantic-field
type_
pydantic-field
uri
pydantic-field
SpotifyModel
pydantic-model
Bases: BaseModel
Base model for all Spotify API objects. Allows extra fields for forward compatibility.
Show JSON schema:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
Track models
Track models.
ExternalIds
pydantic-model
Bases: SpotifyModel
External identifiers: ISRC for tracks, EAN or UPC for albums.
Show JSON schema:
{
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
}
Fields:
ean = None
pydantic-field
isrc = None
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
upc = None
pydantic-field
ExternalUrls
pydantic-model
Bases: SpotifyModel
URLs for opening a resource in the Spotify web player.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
spotify
pydantic-field
LinkedFrom
pydantic-model
Bases: SpotifyModel
Original track info when track relinking has replaced the requested track.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
}
},
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
}
Fields:
-
external_urls(ExternalUrls) -
href(str) -
id(str) -
type_(Literal['track']) -
uri(str)
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
type_
pydantic-field
uri
pydantic-field
Restriction
pydantic-model
Bases: SpotifyModel
Content restriction. Reason is 'market', 'product', or 'explicit'.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
reason
pydantic-field
SavedTrack
pydantic-model
Bases: SpotifyModel
Track saved in a user's library with timestamp metadata.
Show JSON schema:
{
"$defs": {
"ExternalIds": {
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"LinkedFrom": {
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"SimplifiedAlbum": {
"additionalProperties": true,
"description": "Basic album info embedded in other objects.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists"
],
"title": "SimplifiedAlbum",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
},
"Track": {
"additionalProperties": true,
"description": "Complete track with album, popularity, and external IDs.",
"properties": {
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"disc_number": {
"title": "Disc Number",
"type": "integer"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"linked_from": {
"anyOf": [
{
"$ref": "#/$defs/LinkedFrom"
},
{
"type": "null"
}
],
"default": null
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"track_number": {
"title": "Track Number",
"type": "integer"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
},
"album": {
"$ref": "#/$defs/SimplifiedAlbum"
},
"external_ids": {
"$ref": "#/$defs/ExternalIds"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"artists",
"disc_number",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"name",
"track_number",
"type",
"uri",
"is_local",
"album",
"external_ids",
"popularity"
],
"title": "Track",
"type": "object"
}
},
"additionalProperties": true,
"description": "Track saved in a user's library with timestamp metadata.",
"properties": {
"added_at": {
"format": "date-time",
"title": "Added At",
"type": "string"
},
"track": {
"$ref": "#/$defs/Track"
}
},
"required": [
"added_at",
"track"
],
"title": "SavedTrack",
"type": "object"
}
Fields:
added_at
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
track
pydantic-field
SimplifiedAlbum
pydantic-model
Bases: SpotifyModel
Basic album info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic album info embedded in other objects.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists"
],
"title": "SimplifiedAlbum",
"type": "object"
}
Fields:
-
album_type(str) -
total_tracks(int) -
available_markets(list[str] | None) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
images(list[Image]) -
name(str) -
release_date(str) -
release_date_precision(str) -
restrictions(Restriction | None) -
type_(Literal['album']) -
uri(str) -
artists(list[SimplifiedArtist])
album_type
pydantic-field
artists
pydantic-field
available_markets = None
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
images
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
release_date
pydantic-field
release_date_precision
pydantic-field
restrictions = None
pydantic-field
total_tracks
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedArtist
pydantic-model
Bases: SpotifyModel
Basic artist info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
}
Fields:
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
type_
pydantic-field
uri
pydantic-field
SimplifiedTrack
pydantic-model
Bases: SpotifyModel
Basic track info embedded in other objects.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"LinkedFrom": {
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
}
},
"additionalProperties": true,
"description": "Basic track info embedded in other objects.",
"properties": {
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"disc_number": {
"title": "Disc Number",
"type": "integer"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"linked_from": {
"anyOf": [
{
"$ref": "#/$defs/LinkedFrom"
},
{
"type": "null"
}
],
"default": null
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"track_number": {
"title": "Track Number",
"type": "integer"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
}
},
"required": [
"artists",
"disc_number",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"name",
"track_number",
"type",
"uri",
"is_local"
],
"title": "SimplifiedTrack",
"type": "object"
}
Config:
extra:allow
Fields:
-
artists(list[SimplifiedArtist]) -
available_markets(list[str] | None) -
disc_number(int) -
duration_ms(int) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
is_playable(bool | None) -
linked_from(LinkedFrom | None) -
restrictions(Restriction | None) -
name(str) -
preview_url(str | None) -
track_number(int) -
type_(Literal['track']) -
uri(str) -
is_local(bool)
artists
pydantic-field
available_markets = None
pydantic-field
disc_number
pydantic-field
duration_ms
pydantic-field
explicit
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
is_local
pydantic-field
is_playable = None
pydantic-field
linked_from = None
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
preview_url = None
pydantic-field
restrictions = None
pydantic-field
track_number
pydantic-field
type_
pydantic-field
uri
pydantic-field
SpotifyModel
pydantic-model
Bases: BaseModel
Base model for all Spotify API objects. Allows extra fields for forward compatibility.
Show JSON schema:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
Track
pydantic-model
Bases: SimplifiedTrack
Complete track with album, popularity, and external IDs.
Show JSON schema:
{
"$defs": {
"ExternalIds": {
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
},
"LinkedFrom": {
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
},
"Restriction": {
"additionalProperties": true,
"description": "Content restriction. Reason is 'market', 'product', or 'explicit'.",
"properties": {
"reason": {
"title": "Reason",
"type": "string"
}
},
"required": [
"reason"
],
"title": "Restriction",
"type": "object"
},
"SimplifiedAlbum": {
"additionalProperties": true,
"description": "Basic album info embedded in other objects.",
"properties": {
"album_type": {
"title": "Album Type",
"type": "string"
},
"total_tracks": {
"title": "Total Tracks",
"type": "integer"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"release_date": {
"title": "Release Date",
"type": "string"
},
"release_date_precision": {
"title": "Release Date Precision",
"type": "string"
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"const": "album",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
}
},
"required": [
"album_type",
"total_tracks",
"external_urls",
"href",
"id",
"images",
"name",
"release_date",
"release_date_precision",
"type",
"uri",
"artists"
],
"title": "SimplifiedAlbum",
"type": "object"
},
"SimplifiedArtist": {
"additionalProperties": true,
"description": "Basic artist info embedded in other objects.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"const": "artist",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"name",
"type",
"uri"
],
"title": "SimplifiedArtist",
"type": "object"
}
},
"additionalProperties": true,
"description": "Complete track with album, popularity, and external IDs.",
"properties": {
"artists": {
"items": {
"$ref": "#/$defs/SimplifiedArtist"
},
"title": "Artists",
"type": "array"
},
"available_markets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Markets"
},
"disc_number": {
"title": "Disc Number",
"type": "integer"
},
"duration_ms": {
"title": "Duration Ms",
"type": "integer"
},
"explicit": {
"title": "Explicit",
"type": "boolean"
},
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"is_playable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Playable"
},
"linked_from": {
"anyOf": [
{
"$ref": "#/$defs/LinkedFrom"
},
{
"type": "null"
}
],
"default": null
},
"restrictions": {
"anyOf": [
{
"$ref": "#/$defs/Restriction"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview Url"
},
"track_number": {
"title": "Track Number",
"type": "integer"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"is_local": {
"title": "Is Local",
"type": "boolean"
},
"album": {
"$ref": "#/$defs/SimplifiedAlbum"
},
"external_ids": {
"$ref": "#/$defs/ExternalIds"
},
"popularity": {
"title": "Popularity",
"type": "integer"
}
},
"required": [
"artists",
"disc_number",
"duration_ms",
"explicit",
"external_urls",
"href",
"id",
"name",
"track_number",
"type",
"uri",
"is_local",
"album",
"external_ids",
"popularity"
],
"title": "Track",
"type": "object"
}
Fields:
-
artists(list[SimplifiedArtist]) -
available_markets(list[str] | None) -
disc_number(int) -
duration_ms(int) -
explicit(bool) -
external_urls(ExternalUrls) -
href(str) -
id(str) -
is_playable(bool | None) -
linked_from(LinkedFrom | None) -
restrictions(Restriction | None) -
name(str) -
preview_url(str | None) -
track_number(int) -
type_(Literal['track']) -
uri(str) -
is_local(bool) -
album(SimplifiedAlbum) -
external_ids(ExternalIds) -
popularity(int)
album
pydantic-field
artists
pydantic-field
available_markets = None
pydantic-field
disc_number
pydantic-field
duration_ms
pydantic-field
explicit
pydantic-field
external_ids
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
is_local
pydantic-field
is_playable = None
pydantic-field
linked_from = None
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
name
pydantic-field
popularity
pydantic-field
preview_url = None
pydantic-field
restrictions = None
pydantic-field
track_number
pydantic-field
type_
pydantic-field
uri
pydantic-field
User models
User models.
CurrentUser
pydantic-model
Bases: PublicUser
Current user's private profile details.
Show JSON schema:
{
"$defs": {
"ExplicitContent": {
"additionalProperties": true,
"description": "Explicit content settings for a user account.",
"properties": {
"filter_enabled": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Filter Enabled"
},
"filter_locked": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Filter Locked"
}
},
"title": "ExplicitContent",
"type": "object"
},
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
},
"Followers": {
"additionalProperties": true,
"description": "Follower information for an artist or playlist.",
"properties": {
"href": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Href"
},
"total": {
"title": "Total",
"type": "integer"
}
},
"required": [
"href",
"total"
],
"title": "Followers",
"type": "object"
},
"Image": {
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
},
"additionalProperties": true,
"description": "Current user's private profile details.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "user",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Country"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"explicit_content": {
"anyOf": [
{
"$ref": "#/$defs/ExplicitContent"
},
{
"type": "null"
}
],
"default": null
},
"followers": {
"anyOf": [
{
"$ref": "#/$defs/Followers"
},
{
"type": "null"
}
],
"default": null
},
"images": {
"items": {
"$ref": "#/$defs/Image"
},
"title": "Images",
"type": "array"
},
"product": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Product"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri",
"images"
],
"title": "CurrentUser",
"type": "object"
}
Fields:
-
external_urls(ExternalUrls) -
href(str) -
id(str) -
type_(Literal['user']) -
uri(str) -
display_name(str | None) -
country(str | None) -
email(str | None) -
explicit_content(ExplicitContent | None) -
followers(Followers | None) -
images(list[Image]) -
product(str | None)
country = None
pydantic-field
display_name = None
pydantic-field
email = None
pydantic-field
explicit_content = None
pydantic-field
external_urls
pydantic-field
followers = None
pydantic-field
href
pydantic-field
id
pydantic-field
images
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
product = None
pydantic-field
type_
pydantic-field
uri
pydantic-field
ExplicitContent
pydantic-model
Bases: SpotifyModel
Explicit content settings for a user account.
Show JSON schema:
{
"additionalProperties": true,
"description": "Explicit content settings for a user account.",
"properties": {
"filter_enabled": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Filter Enabled"
},
"filter_locked": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Filter Locked"
}
},
"title": "ExplicitContent",
"type": "object"
}
Fields:
-
filter_enabled(bool | None) -
filter_locked(bool | None)
filter_enabled = None
pydantic-field
filter_locked = None
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
Followers
pydantic-model
Bases: SpotifyModel
Follower information for an artist or playlist.
Show JSON schema:
{
"additionalProperties": true,
"description": "Follower information for an artist or playlist.",
"properties": {
"href": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Href"
},
"total": {
"title": "Total",
"type": "integer"
}
},
"required": [
"href",
"total"
],
"title": "Followers",
"type": "object"
}
Fields:
href
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
total
pydantic-field
Image
pydantic-model
Bases: SpotifyModel
Cover art or profile image. Dimensions may be null for user-uploaded images.
Show JSON schema:
{
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
Fields:
height
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
url
pydantic-field
width
pydantic-field
PublicUser
pydantic-model
Bases: SpotifyModel
Public user profile for embedded user references.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
}
},
"additionalProperties": true,
"description": "Public user profile for embedded user references.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "user",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "PublicUser",
"type": "object"
}
Fields:
-
external_urls(ExternalUrls) -
href(str) -
id(str) -
type_(Literal['user']) -
uri(str) -
display_name(str | None)
display_name = None
pydantic-field
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
type_
pydantic-field
uri
pydantic-field
SpotifyModel
pydantic-model
Bases: BaseModel
Base model for all Spotify API objects. Allows extra fields for forward compatibility.
Show JSON schema:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
Common models
Common models shared across resources.
T = TypeVar('T')
module-attribute
Copyright
pydantic-model
Bases: SpotifyModel
Copyright statement. Type is 'C' (copyright) or 'P' (performance).
Show JSON schema:
{
"additionalProperties": true,
"description": "Copyright statement. Type is 'C' (copyright) or 'P' (performance).",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "Copyright",
"type": "object"
}
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
text
pydantic-field
type_
pydantic-field
Cursor
pydantic-model
Bases: SpotifyModel
Cursor keys for cursor-based pagination.
Show JSON schema:
{
"additionalProperties": true,
"description": "Cursor keys for cursor-based pagination.",
"properties": {
"after": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "After"
},
"before": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Before"
}
},
"title": "Cursor",
"type": "object"
}
Fields:
after = None
pydantic-field
before = None
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
CursorPage
pydantic-model
Bases: SpotifyModel, Generic[T]
Cursor-paginated response containing items and a next page link.
Show JSON schema:
{
"$defs": {
"Cursor": {
"additionalProperties": true,
"description": "Cursor keys for cursor-based pagination.",
"properties": {
"after": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "After"
},
"before": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Before"
}
},
"title": "Cursor",
"type": "object"
}
},
"additionalProperties": true,
"description": "Cursor-paginated response containing items and a next page link.",
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"cursors": {
"$ref": "#/$defs/Cursor"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"cursors",
"total",
"items"
],
"title": "CursorPage",
"type": "object"
}
Fields:
cursors
pydantic-field
href
pydantic-field
items
pydantic-field
limit
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
next
pydantic-field
total
pydantic-field
ExternalIds
pydantic-model
Bases: SpotifyModel
External identifiers: ISRC for tracks, EAN or UPC for albums.
Show JSON schema:
{
"additionalProperties": true,
"description": "External identifiers: ISRC for tracks, EAN or UPC for albums.",
"properties": {
"isrc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Isrc"
},
"ean": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ean"
},
"upc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Upc"
}
},
"title": "ExternalIds",
"type": "object"
}
Fields:
ean = None
pydantic-field
isrc = None
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
upc = None
pydantic-field
ExternalUrls
pydantic-model
Bases: SpotifyModel
URLs for opening a resource in the Spotify web player.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
spotify
pydantic-field
Followers
pydantic-model
Bases: SpotifyModel
Follower information for an artist or playlist.
Show JSON schema:
{
"additionalProperties": true,
"description": "Follower information for an artist or playlist.",
"properties": {
"href": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Href"
},
"total": {
"title": "Total",
"type": "integer"
}
},
"required": [
"href",
"total"
],
"title": "Followers",
"type": "object"
}
Fields:
href
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
total
pydantic-field
Image
pydantic-model
Bases: SpotifyModel
Cover art or profile image. Dimensions may be null for user-uploaded images.
Show JSON schema:
{
"additionalProperties": true,
"description": "Cover art or profile image. Dimensions may be null for user-uploaded images.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width"
}
},
"required": [
"url",
"height",
"width"
],
"title": "Image",
"type": "object"
}
Fields:
height
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
url
pydantic-field
width
pydantic-field
LinkedFrom
pydantic-model
Bases: SpotifyModel
Original track info when track relinking has replaced the requested track.
Show JSON schema:
{
"$defs": {
"ExternalUrls": {
"additionalProperties": true,
"description": "URLs for opening a resource in the Spotify web player.",
"properties": {
"spotify": {
"title": "Spotify",
"type": "string"
}
},
"required": [
"spotify"
],
"title": "ExternalUrls",
"type": "object"
}
},
"additionalProperties": true,
"description": "Original track info when track relinking has replaced the requested track.",
"properties": {
"external_urls": {
"$ref": "#/$defs/ExternalUrls"
},
"href": {
"title": "Href",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"type": {
"const": "track",
"title": "Type",
"type": "string"
},
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"external_urls",
"href",
"id",
"type",
"uri"
],
"title": "LinkedFrom",
"type": "object"
}
Fields:
-
external_urls(ExternalUrls) -
href(str) -
id(str) -
type_(Literal['track']) -
uri(str)
external_urls
pydantic-field
href
pydantic-field
id
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
type_
pydantic-field
uri
pydantic-field
Page
pydantic-model
Bases: SpotifyModel, Generic[T]
Paginated response containing items and navigation links.
Show JSON schema:
{
"additionalProperties": true,
"description": "Paginated response containing items and navigation links.",
"properties": {
"href": {
"title": "Href",
"type": "string"
},
"limit": {
"title": "Limit",
"type": "integer"
},
"next": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next"
},
"offset": {
"title": "Offset",
"type": "integer"
},
"previous": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Previous"
},
"total": {
"title": "Total",
"type": "integer"
},
"items": {
"items": {},
"title": "Items",
"type": "array"
}
},
"required": [
"href",
"limit",
"next",
"offset",
"previous",
"total",
"items"
],
"title": "Page",
"type": "object"
}
Fields:
-
href(str) -
limit(int) -
next(str | None) -
offset(int) -
previous(str | None) -
total(int) -
items(list[T])
href
pydantic-field
items
pydantic-field
limit
pydantic-field
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
next
pydantic-field
offset
pydantic-field
previous
pydantic-field
total
pydantic-field
Restriction
pydantic-model
Bases: SpotifyModel
Content restriction. Reason is 'market', 'product', or 'explicit'.
Show JSON schema:
Fields:
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
reason
pydantic-field
SpotifyModel
pydantic-model
Bases: BaseModel
Base model for all Spotify API objects. Allows extra fields for forward compatibility.