Skip to content

Audiobooks

Note

Audiobooks are only available for the US, UK, Ireland, New Zealand and Australia markets.

API #

Implementation to make API calls with.

Parameters:

get_audiobook #

get_audiobook(audiobook_id: str, *, market: MissingOr[str] = MISSING) -> Audiobook

Get Spotify catalog information for a single audiobook.

Parameters:

Returns:

get_several_audiobooks #

get_several_audiobooks(audiobook_ids: list[str], *, market: MissingOr[str] = MISSING) -> list[Audiobook]

Get Spotify catalog information for several audiobooks.

Parameters:

Returns:

get_audiobook_chapters #

get_audiobook_chapters(audiobook_id: str, *, limit: MissingOr[int] = MISSING, offset: MissingOr[int] = MISSING, market: MissingOr[str] = MISSING) -> Paginator[SimpleChapter]

Get Spotify catalog information about an audiobooks's chapters.

Parameters:

  • audiobook_id (str) –

    The ID of the audiobook.

  • limit (int, default: 20 ) –

    The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.

  • offset (int, default: 0 ) –

    The index of the first item to return. Default: 0 (the first item).

  • market (str, default: MISSING ) –

    Only get content available in that market. Must be an ISO 3166-1 alpha-2 country code.

Returns:

get_users_saved_audiobooks #

get_users_saved_audiobooks(*, limit: MissingOr[int] = MISSING, offset: MissingOr[int] = MISSING) -> Paginator[SimpleAudiobook]

Get a list of the audiobooks saved in the current user's 'Your Music' library.

Required Authorization Scope

USER_LIBRARY_READ

Parameters:

  • limit (int, default: 20 ) –

    The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.

  • offset (int, default: 0 ) –

    The index of the first item to return. Default: 0 (the first item).

Returns:

save_audiobooks_for_user #

save_audiobooks_for_user(audiobook_ids: list[str]) -> None

Save one or more audiobooks to the current user's 'Your Music' library.

Required Authorization Scope

USER_LIBRARY_MODIFY

Parameters:

  • audiobook_ids (list[str]) –

    The IDs of the audiobooks. Maximum: 50.

remove_users_saved_audiobooks #

remove_users_saved_audiobooks(audiobook_ids: list[str]) -> None

Remove one or more audiobooks from the current user's 'Your Music' library.

Required Authorization Scope

USER_LIBRARY_MODIFY

Parameters:

  • audiobook_ids (list[str]) –

    The IDs of the audiobooks. Maximum: 50.

check_users_saved_audiobooks #

check_users_saved_audiobooks(audiobook_ids: list[str]) -> list[bool]

Check if one or more audiobooks are already saved in the current user's 'Your Music' library.

Required Authorization Scope

USER_LIBRARY_READ

Parameters:

  • audiobook_ids (list[str]) –

    The IDs of the audiobooks. Maximum: 50.

Returns:

  • list[bool]

    A list of booleans dictating whether or not the corresponding audiobooks are already saved.

SimpleAudiobook #

A simplified audiobook.

authors #

authors: list[Author]

The author(s) of the audiobook.

available_markets #

available_markets: list[str]

A list of the countries in which the audiobook can be played, identified by their ISO 3166-1 alpha-2 code.

copyrights #

copyrights: list[Copyright]

The copyright statements of the audiobook.

description #

description: str

A description of the audiobook. HTML tags are stripped away from this field, use the html_description field in case HTML tags are needed.

html_description #

html_description: str

A description of the audiobook. This field may contain HTML tags.

edition #

edition: str | None

The edition of the audiobook.

explicit #

explicit: bool

Whether or not the audiobook has explicit content.

external_urls #

external_urls: ExternalURLs

External URLs for the audiobook.

href #

href: str

A link to the Web API endpoint providing full details of the audiobook.

id #

id: str

The Spotify ID for the audiobook.

images #

images: list[Image]

The cover art for the audiobook in various sizes, widest first.

languages #

languages: list[str]

A list of the languages used in the audiobook, identified by their ISO 639 code.

media_type #

media_type: str

The media type of the audiobook.

name #

name: str

The name of the audiobook.

narrators #

narrators: list[Narrator]

The narrator(s) of the audiobook.

publisher #

publisher: str

The publisher of the audiobook.

uri #

uri: str

The Spotify URI for the audiobook.

total_chapters #

total_chapters: int | None

The number of chapters in the audiobook.

Audiobook #

An audiobook.

authors #

authors: list[Author]

The author(s) of the audiobook.

available_markets #

available_markets: list[str]

A list of the countries in which the audiobook can be played, identified by their ISO 3166-1 alpha-2 code.

copyrights #

copyrights: list[Copyright]

The copyright statements of the audiobook.

description #

description: str

A description of the audiobook. HTML tags are stripped away from this field, use the html_description field in case HTML tags are needed.

html_description #

html_description: str

A description of the audiobook. This field may contain HTML tags.

edition #

edition: str | None

The edition of the audiobook.

explicit #

explicit: bool

Whether or not the audiobook has explicit content.

external_urls #

external_urls: ExternalURLs

External URLs for the audiobook.

href #

href: str

A link to the Web API endpoint providing full details of the audiobook.

id #

id: str

The Spotify ID for the audiobook.

images #

images: list[Image]

The cover art for the audiobook in various sizes, widest first.

languages #

languages: list[str]

A list of the languages used in the audiobook, identified by their ISO 639 code.

media_type #

media_type: str

The media type of the audiobook.

name #

name: str

The name of the audiobook.

narrators #

narrators: list[Narrator]

The narrator(s) of the audiobook.

publisher #

publisher: str

The publisher of the audiobook.

uri #

uri: str

The Spotify URI for the audiobook.

total_chapters #

total_chapters: int | None

The number of chapters in the audiobook.

chapters #

The chapters of the audiobook.

Author #

Audiobook author information.

name #

name: str

The name of the author.

Narrator #

Narrator information.

name #

name: str

The name of the narrator.