Help us shape the future of Go! Take the 2026 Go Developer Survey

spotify

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 12 Imported by: 0

README

Spotify clients for Crawlora

Official Crawlora client packages for the hosted Spotify API. Access 38 API endpoints covering search, tracks, albums, artists, playlists, profiles, audiobooks, charts, and podcast shows and episodes from JavaScript/TypeScript, Python, Go, Ruby, Java, and PHP. These clients call Crawlora's hosted API; they do not scrape Spotify locally. Requests use your Crawlora account and CRAWLORA_API_KEY; service usage follows your account billing plan. Crawlora is independent from and not affiliated with or endorsed by Spotify or its owners.

Language packages

For installation and runnable examples, use the README for your language. See the API endpoint and parameter reference for shared operation details.

Create an account at crawlora.net, open the Crawlora console to get an API key, or read the API documentation. Keep CRAWLORA_API_KEY out of source control.

API coverage and supported endpoints

The six language clients provide access to all 38 selected public Spotify API operations. Search or browse by endpoint path and operation ID below; the complete API reference adds parameters, enums, and response details.

Method Endpoint API operation Description
GET /spotify-podcasts/categories spotify-podcasts-categories Retrieve Spotify Podcasts categories
GET /spotify-podcasts/charts spotify-podcasts-charts Retrieve Spotify podcast charts
GET /spotify-podcasts/episode spotify-podcasts-episode Retrieve Spotify podcast episode details
GET /spotify-podcasts/home spotify-podcasts-home Retrieve Spotify Podcasts home
GET /spotify-podcasts/search spotify-podcasts-search Search Spotify Podcasts
GET /spotify-podcasts/show spotify-podcasts-show Retrieve Spotify podcast show metadata
GET /spotify-podcasts/show/episodes spotify-podcasts-show-episodes Retrieve Spotify podcast show episodes
GET /spotify-podcasts/show/recommendations spotify-podcasts-show-recommendations Retrieve Spotify podcast recommendations
GET /spotify/album spotify-album Retrieve Spotify album details
GET /spotify/album/tracks spotify-album-tracks Retrieve Spotify album tracks
GET /spotify/albums/search spotify-albums-search Search Spotify albums
GET /spotify/artist spotify-artist Retrieve Spotify artist details
GET /spotify/artist/albums spotify-artist-albums Retrieve Spotify artist albums
GET /spotify/artist/playlists spotify-artist-playlists Retrieve Spotify artist playlists
GET /spotify/artist/related spotify-artist-related Retrieve Spotify related artists
GET /spotify/artists/search spotify-artists-search Search Spotify artists
GET /spotify/audiobook spotify-audiobook Retrieve Spotify audiobook details
GET /spotify/audiobook/chapters spotify-audiobook-chapters Retrieve Spotify audiobook chapters
GET /spotify/audiobooks/search spotify-audiobooks-search Search Spotify audiobooks
GET /spotify/chapter spotify-chapter Retrieve Spotify audiobook chapter details
GET /spotify/episodes/search spotify-episodes-search Search Spotify episodes
GET /spotify/featured-charts-by-country spotify-featured-charts-by-country Retrieve Spotify featured charts by country
GET /spotify/genre spotify-genre Retrieve Spotify genre page
GET /spotify/home spotify-home Retrieve Spotify home sections
GET /spotify/playlist spotify-playlist Retrieve Spotify playlist details
GET /spotify/playlists/search spotify-playlists-search Search Spotify playlists
GET /spotify/popular-by-country spotify-popular-by-country Retrieve Spotify popular by country
GET /spotify/profile spotify-profile Retrieve Spotify public profile
GET /spotify/profile/followers spotify-profile-followers Retrieve Spotify public profile followers
GET /spotify/profile/playlists spotify-profile-playlists Retrieve Spotify public profile playlists
GET /spotify/profiles/search spotify-profiles-search Search Spotify profiles
GET /spotify/search spotify-search Search Spotify catalog
GET /spotify/section spotify-section Retrieve Spotify browse section
GET /spotify/shows/search spotify-shows-search Search Spotify shows
GET /spotify/track spotify-track Retrieve Spotify track details
GET /spotify/track/recommended spotify-track-recommended Retrieve Spotify recommended tracks
GET /spotify/track/similar-albums spotify-track-similar-albums Retrieve Spotify track similar albums
GET /spotify/tracks/search spotify-tracks-search Search Spotify tracks

License

MIT. See LICENSE.

Documentation

Overview

Package spotify is Crawlora's Spotify API client for 38 endpoints, covering search, tracks, albums, artists, playlists, profiles, audiobooks, charts, and podcast shows and episodes. API documentation: https://crawlora.net/docs?utm_source=pkg.go.dev&utm_medium=referral&utm_campaign=platform-clients&utm_content=spotify-go-api-docs

Index

Examples

Constants

View Source
const (
	DefaultBaseURL = "https://api.crawlora.net/api/v1"
	Version        = "0.2.0"
)
View Source
const OperationCount = 38

OperationCount reports how many selected-platform operations this module exposes.

Variables

This section is empty.

Functions

func OperationIDs

func OperationIDs() []string

OperationIDs returns the selected operation IDs in stable sorted order.

Types

type Client

type Client struct {
	APIKey     string
	BaseURL    string
	Timeout    time.Duration
	HTTPClient *http.Client
}

Client calls only the operation IDs included in this platform module.

func NewClient

func NewClient(apiKey string) *Client

NewClient creates a client using the supplied API key, or CRAWLORA_API_KEY when empty.

func (*Client) Album

func (c *Client) Album(ctx context.Context, params Params) (any, error)

Album calls the spotify-album operation.

func (*Client) AlbumTracks

func (c *Client) AlbumTracks(ctx context.Context, params Params) (any, error)

AlbumTracks calls the spotify-album-tracks operation.

func (*Client) AlbumsSearch

func (c *Client) AlbumsSearch(ctx context.Context, params Params) (any, error)

AlbumsSearch calls the spotify-albums-search operation.

func (*Client) Artist

func (c *Client) Artist(ctx context.Context, params Params) (any, error)

Artist calls the spotify-artist operation.

func (*Client) ArtistAlbums

func (c *Client) ArtistAlbums(ctx context.Context, params Params) (any, error)

ArtistAlbums calls the spotify-artist-albums operation.

func (*Client) ArtistPlaylists

func (c *Client) ArtistPlaylists(ctx context.Context, params Params) (any, error)

ArtistPlaylists calls the spotify-artist-playlists operation.

func (*Client) ArtistRelated

func (c *Client) ArtistRelated(ctx context.Context, params Params) (any, error)

ArtistRelated calls the spotify-artist-related operation.

func (*Client) ArtistsSearch

func (c *Client) ArtistsSearch(ctx context.Context, params Params) (any, error)

ArtistsSearch calls the spotify-artists-search operation.

func (*Client) Audiobook

func (c *Client) Audiobook(ctx context.Context, params Params) (any, error)

Audiobook calls the spotify-audiobook operation.

func (*Client) AudiobookChapters

func (c *Client) AudiobookChapters(ctx context.Context, params Params) (any, error)

AudiobookChapters calls the spotify-audiobook-chapters operation.

func (*Client) AudiobooksSearch

func (c *Client) AudiobooksSearch(ctx context.Context, params Params) (any, error)

AudiobooksSearch calls the spotify-audiobooks-search operation.

func (*Client) Call

func (c *Client) Call(ctx context.Context, operationID string, params Params) (any, error)

Call executes a selected platform operation by operation ID.

Example
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
	w.Header().Set("Content-Type", "application/json")
	_, _ = w.Write([]byte(`{"ok":true}`))
}))
defer server.Close()

client := NewClient("your-crawlora-api-key")
client.BaseURL = server.URL + "/api/v1"
client.HTTPClient = server.Client()
result, err := client.Call(context.Background(), "spotify-podcasts-categories", Params{})
if err != nil {
	panic(err)
}
fmt.Println(result.(map[string]any)["ok"])
Output:
true

func (*Client) Chapter

func (c *Client) Chapter(ctx context.Context, params Params) (any, error)

Chapter calls the spotify-chapter operation.

func (*Client) Close

func (c *Client) Close() error

Close releases idle connections held by the configured HTTP transport.

func (*Client) EpisodesSearch

func (c *Client) EpisodesSearch(ctx context.Context, params Params) (any, error)

EpisodesSearch calls the spotify-episodes-search operation.

func (*Client) FeaturedChartsByCountry

func (c *Client) FeaturedChartsByCountry(ctx context.Context, params Params) (any, error)

FeaturedChartsByCountry calls the spotify-featured-charts-by-country operation.

func (*Client) Genre

func (c *Client) Genre(ctx context.Context, params Params) (any, error)

Genre calls the spotify-genre operation.

func (*Client) Home

func (c *Client) Home(ctx context.Context, params Params) (any, error)

Home calls the spotify-home operation.

func (*Client) Playlist

func (c *Client) Playlist(ctx context.Context, params Params) (any, error)

Playlist calls the spotify-playlist operation.

func (*Client) PlaylistsSearch

func (c *Client) PlaylistsSearch(ctx context.Context, params Params) (any, error)

PlaylistsSearch calls the spotify-playlists-search operation.

func (*Client) PodcastsCategories

func (c *Client) PodcastsCategories(ctx context.Context, params Params) (any, error)

PodcastsCategories calls the spotify-podcasts-categories operation.

func (*Client) PodcastsCharts

func (c *Client) PodcastsCharts(ctx context.Context, params Params) (any, error)

PodcastsCharts calls the spotify-podcasts-charts operation.

func (*Client) PodcastsEpisode

func (c *Client) PodcastsEpisode(ctx context.Context, params Params) (any, error)

PodcastsEpisode calls the spotify-podcasts-episode operation.

func (*Client) PodcastsHome

func (c *Client) PodcastsHome(ctx context.Context, params Params) (any, error)

PodcastsHome calls the spotify-podcasts-home operation.

func (*Client) PodcastsSearch

func (c *Client) PodcastsSearch(ctx context.Context, params Params) (any, error)

PodcastsSearch calls the spotify-podcasts-search operation.

func (*Client) PodcastsShow

func (c *Client) PodcastsShow(ctx context.Context, params Params) (any, error)

PodcastsShow calls the spotify-podcasts-show operation.

func (*Client) PodcastsShowEpisodes

func (c *Client) PodcastsShowEpisodes(ctx context.Context, params Params) (any, error)

PodcastsShowEpisodes calls the spotify-podcasts-show-episodes operation.

func (*Client) PodcastsShowRecommendations

func (c *Client) PodcastsShowRecommendations(ctx context.Context, params Params) (any, error)

PodcastsShowRecommendations calls the spotify-podcasts-show-recommendations operation.

func (*Client) PopularByCountry

func (c *Client) PopularByCountry(ctx context.Context, params Params) (any, error)

PopularByCountry calls the spotify-popular-by-country operation.

func (*Client) Profile

func (c *Client) Profile(ctx context.Context, params Params) (any, error)

Profile calls the spotify-profile operation.

func (*Client) ProfileFollowers

func (c *Client) ProfileFollowers(ctx context.Context, params Params) (any, error)

ProfileFollowers calls the spotify-profile-followers operation.

func (*Client) ProfilePlaylists

func (c *Client) ProfilePlaylists(ctx context.Context, params Params) (any, error)

ProfilePlaylists calls the spotify-profile-playlists operation.

func (*Client) ProfilesSearch

func (c *Client) ProfilesSearch(ctx context.Context, params Params) (any, error)

ProfilesSearch calls the spotify-profiles-search operation.

func (*Client) Search

func (c *Client) Search(ctx context.Context, params Params) (any, error)

Search calls the spotify-search operation.

func (*Client) Section

func (c *Client) Section(ctx context.Context, params Params) (any, error)

Section calls the spotify-section operation.

func (*Client) ShowsSearch

func (c *Client) ShowsSearch(ctx context.Context, params Params) (any, error)

ShowsSearch calls the spotify-shows-search operation.

func (*Client) Track

func (c *Client) Track(ctx context.Context, params Params) (any, error)

Track calls the spotify-track operation.

func (*Client) TrackRecommended

func (c *Client) TrackRecommended(ctx context.Context, params Params) (any, error)

TrackRecommended calls the spotify-track-recommended operation.

func (*Client) TrackSimilarAlbums

func (c *Client) TrackSimilarAlbums(ctx context.Context, params Params) (any, error)

TrackSimilarAlbums calls the spotify-track-similar-albums operation.

func (*Client) TracksSearch

func (c *Client) TracksSearch(ctx context.Context, params Params) (any, error)

TracksSearch calls the spotify-tracks-search operation.

type Params

type Params map[string]any

Params maps the exact OpenAPI parameter names expected by this platform client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL