### Making a Track Recommendation Request (Python) Source: https://reccobeats.com/docs/apis/get-recommendation Example of how to make a GET request to the ReccoBeats API for track recommendations using Python's http.client library. It demonstrates setting headers and reading the response. ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/track/recommendation", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### Get Album Detail Request Examples Source: https://reccobeats.com/docs/apis/get-album-by-id Examples of how to make a GET request to the album detail endpoint using various programming languages and tools. These examples demonstrate how to construct the request and handle the response. ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/album/:id", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### Request Audio Features using Python http.client Source: https://reccobeats.com/docs/apis/get-audio-features Example of how to request audio features using Python's http.client library. This code snippet demonstrates making a GET request to the /v1/audio-features endpoint and printing the decoded response. ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/audio-features", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### Search Artist API Request Example (Python) Source: https://reccobeats.com/docs/apis/search-artists This Python code demonstrates how to make a GET request to the ReccoBeats API's artist search endpoint using the http.client library. It includes setting up the connection, headers, and printing the decoded response. ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/artist/search", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### Get Artist Detail API Request (Python) Source: https://reccobeats.com/docs/apis/get-artist-by-id This Python code snippet demonstrates how to make a GET request to the Reccobeats API to retrieve artist details. It uses the `http.client` library to establish a connection and send the request. The response is then decoded and printed. ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/artist/:id", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### Get Artist's Tracks (HTTP Client) Source: https://reccobeats.com/docs/apis/get-artist-track Demonstrates how to make a GET request to the ReccoBeats API to retrieve an artist's tracks using Python's http.client. This method requires manual handling of connection and request details. ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/artist/:id/track", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### Get Multiple Artists (Python HTTP Client) Source: https://reccobeats.com/docs/apis/get-artists This snippet demonstrates how to retrieve multiple artist details using the Python `http.client` library. It sends a GET request to the ReccoBeats API with the 'Accept' header set to 'application/json'. The response is then decoded and printed. ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/artist", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### Album Resource JSON Example Source: https://reccobeats.com/docs/documentation/Resources/album This JSON object represents an example of the Album resource. It includes details like the album's ID, type, artists, total tracks, name, release date, and other metadata. This structure is commonly used for representing album data in APIs. ```json { "id": "2670c328-c40f-45f4-80df-f48b29296deb", "albumType": "album", "artists": [ { "id": "c7b330b5-a62e-420c-bf02-943ca6bb8746", "name": "Taylor Swift", "href": "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02" } ], "totalTracks": 46, "href": "https://open.spotify.com/album/1MPAXuTVL2Ej5x0JHiSPq8", "name": "reputation Stadium Tour Surprise Song Playlist", "availableCountries": "AR,AU,AT,BE,BO,BR,BG,CA,CL,CO,CR,CY,CZ,DK,DO,DE,EC,EE,SV,FI,FR,GR,GT,HN,HK,HU,IS,IE,IT,LV,LT,LU,MY,MT,MX,NL,NZ,NI,NO,PA,PY,PE,PH,PL,PT,SG,SK,ES,SE,CH,TW,TR,UY,US,GB,AD,LI,MC,ID,JP,TH,VN,RO,IL,ZA,SA,AE,BH,QA,OM,KW,EG,MA,DZ,TN,LB,JO,PS,IN,BY,KZ,MD,UA,AL,BA,HR,ME,MK,RS,SI,KR,BD,PK,LK,GH,KE,NG,TZ,UG,AG,AM,BS,BB,BZ,BT,BW,BF,CV,CW,DM,FJ,GM,GE,GD,GW,GY,HT,JM,KI,LS,LR,MW,MV,ML,MH,FM,NA,NR,NE,PW,PG,WS,SM,ST,SN,SC,SL,SB,KN,LC,VC,SR,TL,TO,TT,TV,VU,AZ,BN,BI,KH,CM,TD,KM,GQ,SZ,GA,GN,KG,LA,MO,MR,MN,NP,RW,TG,UZ,ZW,BJ,MG,MU,MZ,AO,CI,DJ,ZM,CD,CG,IQ,LY,TJ,VE,ET,XK", "releaseDate": "2017-11-09", "releaseDateFormat": "day", "isrc": null, "ean": null, "upc": "00843930039371", "label": "Big Machine Records, LLC", "popularity": 68 } ``` -------------------------------- ### Track Resource Example Source: https://reccobeats.com/docs/documentation/Resources/track This JSON object demonstrates the structure and attributes of a Track resource. It includes details like track title, artist information, duration, ISRC, and availability across countries. ```json { "id": "878dadea-33c5-4c08-bdb9-e2b117475a99", "trackTitle": "All Too Well", "artists": [ { "id": "c7b330b5-a62e-420c-bf02-943ca6bb8746", "name": "Taylor Swift", "href": "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02" } ], "durationMs": 329160, "isrc": "USCJY1231021", "ean": null, "upc": null, "href": "https://open.spotify.com/track/00vJzaoxM3Eja1doBUhX0P", "availableCountries": "AR,AU,AT,BE,BO,BR,BG,CA,CL,CO,CR,CY,CZ,DK,DO,DE,EC,EE,SV,FI,FR,GR,GT,HN,HK,HU,IS,IE,IT,LV,LT,LU,MY,MT,MX,NL,NZ,NI,NO,PA,PY,PE,PH,PL,PT,SG,SK,ES,SE,CH,TW,TR,UY,US,GB,AD,LI,MC,ID,JP,TH,VN,RO,IL,ZA,SA,AE,BH,QA,OM,KW,EG,MA,DZ,TN,LB,JO,PS,IN,BY,KZ,MD,UA,AL,BA,HR,ME,MK,RS,SI,KR,BD,PK,LK,GH,KE,NG,TZ,UG,AG,AM,BS,BB,BZ,BT,BW,BF,CV,CW,DM,FJ,GM,GE,GD,GW,GY,HT,JM,KI,LS,LR,MW,MV,ML,MH,FM,NA,NR,NE,PW,PG,WS,SM,ST,SN,SC,SL,SB,KN,LC,VC,SR,TL,TO,TT,TV,VU,AZ,BN,BI,KH,CM,TD,KM,GQ,SZ,GA,GN,KG,LA,MO,MR,MN,NP,RW,TG,UZ,ZW,BJ,MG,MU,MZ,AO,CI,DJ,ZM,CD,CG,IQ,LY,TJ,VE,ET,XK", "popularity": 34 } ``` -------------------------------- ### Get Track Detail (Python http.client) Source: https://reccobeats.com/docs/apis/get-track-by-id This Python code uses the `http.client` library to make a GET request to the ReccoBeats API to fetch track details. It includes setting the request headers and printing the decoded JSON response. ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/track/:id", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### GET /v1/album Source: https://reccobeats.com/docs/apis/get-albums Retrieves a list of multiple albums. This endpoint allows clients to fetch album data. ```APIDOC ## GET /v1/album ### Description Retrieves a list of multiple albums. This endpoint allows clients to fetch album data. ### Method GET ### Endpoint /v1/album ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **albums** (array) - A list of album objects. #### Response Example ```json { "albums": [ { "album_id": "string", "title": "string", "artist": "string", "release_date": "string" } ] } ``` #### Error Responses - **400**: Bad request - **404**: Album not found ``` -------------------------------- ### GET /v1/track/recommendation Source: https://reccobeats.com/docs/apis/get-recommendation Retrieves a list of recommended tracks based on specified criteria. This endpoint allows for filtering and personalization of music recommendations. ```APIDOC ## GET /v1/track/recommendation ### Description Retrieves a list of recommended tracks based on specified criteria. This endpoint allows for filtering and personalization of music recommendations. ### Method GET ### Endpoint /v1/track/recommendation ### Parameters #### Query Parameters - **size** (integer) - Required - The number of recommendations to return. - **seeds** (string) - Required - A comma-separated list of seed track or artist IDs. - **negativeSeeds** (string) - Optional - A comma-separated list of track or artist IDs to exclude from recommendations. - **acousticness** (number) - Optional - Filter recommendations based on acousticness (0.0 to 1.0). - **danceability** (number) - Optional - Filter recommendations based on danceability (0.0 to 1.0). - **energy** (number) - Optional - Filter recommendations based on energy (0.0 to 1.0). - **instrumentalness** (number) - Optional - Filter recommendations based on instrumentalness (0.0 to 1.0). - **key** (integer) - Optional - Filter recommendations based on key (0 to 11). - **liveness** (number) - Optional - Filter recommendations based on liveness (0.0 to 1.0). - **loudness** (number) - Optional - Filter recommendations based on loudness (in dB). - **mode** (integer) - Optional - Filter recommendations based on mode (0 for minor, 1 for major). - **speechiness** (number) - Optional - Filter recommendations based on speechiness (0.0 to 1.0). - **tempo** (number) - Optional - Filter recommendations based on tempo (in beats per minute). - **valence** (number) - Optional - Filter recommendations based on valence (0.0 to 1.0). - **popularity** (integer) - Optional - Filter recommendations based on track popularity (0 to 100). - **featureWeight** (number) - Optional - Weight for feature-based recommendations. ### Request Example ``` GET https://api.reccobeats.com/v1/track/recommendation?size=10&seeds=4i9j1o8f3k2l1m5n6p7q8r9s0t,1a2b3c4d5e6f7g8h9i0j ``` ### Response #### Success Response (200) - **content** (array) - An array of track objects. - **id** (string) - Unique ID for the track. - **trackTitle** (string) - Name of the track. - **artists** (array) - List of artists for this track. - **id** (string) - Unique ID for the artist. - **name** (string) - Artist's name. - **href** (string) - Known Spotify URLs for this artist. - **durationMs** (integer) - Duration of the track in milliseconds. - **isrc** (string) - International Standard Recording Code (Optional). - **ean** (string) - European Article Number (Optional). - **upc** (string) - Universal Product Code (Optional). - **href** (string) - Known Spotify URLs for this track. - **availableCountries** (string) - List of available countries for this track identified by their ISO 3166-1 alpha-2 code, separated by comma (Optional). - **popularity** (integer) - The popularity of the track (0-100). #### Response Example ```json { "content": [ { "id": "string", "trackTitle": "string", "artists": [ { "id": "string", "name": "string", "href": "string" } ], "durationMs": 0, "isrc": "string", "ean": "string", "upc": "string", "href": "string", "availableCountries": "string", "popularity": 0 } ] } ``` #### Error Response (400) Bad request ``` -------------------------------- ### Example API Success Response (JSON) Source: https://reccobeats.com/docs/documentation/request-and-response A successful API request returns data in JSON format with a 'status' field set to 'success'. This example shows a track object with details like title, artists, duration, and availability. ```json { "id": "8212bab8-5911-48a0-b177-24923ef2329a", "trackTitle": "Wicked Games", "artists": [ { "id": "9451b6b2-8746-4d43-abd7-c355ed1e3048", "name": "The Weeknd", "href": "https://open.spotify.com/artist/1Xyo4u8uXC1ZmMpatF05PJ" } ], "durationMs": 325305, "isrc": "USUM72104140", "ean": null, "upc": null, "href": "https://open.spotify.com/track/00aqkszH1FdUiJJWvX6iEl", "availableCountries": "AR,AU,AT,BE,BO,BR,BG,CA,CL,CO,CR,CY,CZ,DK,DO,DE,EC,EE,SV,FI,FR,GR,GT,HN,HK,HU,IS,IE,IT,LV,LT,LU,MY,MT,MX,NL,NZ,NI,NO,PA,PY,PE,PH,PL,PT,SG,SK,ES,SE,CH,TW,TR,UY,US,GB,AD,LI,MC,ID,JP,TH,VN,RO,IL,ZA,SA,AE,BH,QA,OM,KW,EG,MA,DZ,TN,LB,JO,PS,IN,BY,KZ,MD,UA,AL,BA,HR,ME,MK,RS,SI,KR,BD,PK,LK,GH,KE,NG,TZ,UG,AG,AM,BS,BB,BZ,BT,BW,BF,CV,CW,DM,FJ,GM,GE,GD,GW,GY,HT,JM,KI,LS,LR,MW,MV,ML,MH,FM,NA,NR,NE,PW,PG,WS,SM,ST,SN,SC,SL,SB,KN,LC,VC,SR,TL,TO,TT,TV,VU,AZ,BN,BI,KH,CM,TD,KM,GQ,SZ,GA,GN,KG,LA,MO,MR,MN,NP,RW,TG,UZ,ZW,BJ,MG,MU,MZ,AO,CI,DJ,ZM,CD,CG,IQ,LY,TJ,VE,ET,XK", "popularity": 69 } ``` -------------------------------- ### GET /v1/artist/:id Source: https://reccobeats.com/docs/apis/get-artist-by-id Retrieves detailed information about a specific artist using their unique ID. ```APIDOC ## GET /v1/artist/:id ### Description Retrieves detailed information about a specific artist using their unique ID. ### Method GET ### Endpoint https://api.reccobeats.com/v1/artist/:id ### Parameters #### Path Parameters - **id** (string) - Required - Artist ID. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **id** (string) - Unique id for artist - **name** (string) - Artist's name - **href** (string) - Known spotify URLs for this artist. #### Response Example ```json { "id": "string", "name": "string", "href": "string" } ``` #### Error Responses - **400**: Bad request - **404**: Artist not found ``` -------------------------------- ### Artist Resource JSON Example Source: https://reccobeats.com/docs/documentation/Resources/artist This JSON object represents a musical artist. It includes a unique ID, the artist's name, and a Spotify URL. This structure is used to identify and provide information about artists. ```json { "id": "c7b330b5-a62e-420c-bf02-943ca6bb8746", "name": "Taylor Swift", "href": "https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02" } ``` -------------------------------- ### Get Artist's Albums (HTTP Client) Source: https://reccobeats.com/docs/apis/get-artist-album This snippet demonstrates how to fetch an artist's albums using Python's http.client. It makes a GET request to the specified API endpoint and prints the JSON response. Ensure you replace ':id' with a valid artist ID. ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/artist/:id/album", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### Get Track Recommendations Source: https://reccobeats.com/docs/documentation/Resources/resource-id Get track recommendations based on a list of seed track IDs (Reccobeats or Spotify). ```APIDOC ## GET /track/recommendation ### Description Provides track recommendations based on a list of seed track IDs, which can be either Reccobeats IDs or Spotify IDs. ### Method GET ### Endpoint `/track/recommendation` ### Parameters #### Query Parameters - **seeds** (string) - Required - A comma-separated list of Reccobeats IDs or Spotify IDs to use as seeds for recommendations. - **size** (integer) - Optional - The number of recommendations to return. Defaults to 10. ### Request Example ``` GET /track/recommendation?seeds=00vJzaoxM3Eja1doBUhX0P,2670c328-c40f-45f4-80df-f48b29296deb&size=10 ``` ### Response #### Success Response (200) - **recommendations** (array) - A list of recommended track objects. - **track_id** (string) - The Reccobeats ID of the recommended track. - **title** (string) - The title of the recommended track. - **artist** (string) - The name of the artist of the recommended track. #### Response Example ```json { "recommendations": [ { "track_id": "rec1_track_id", "title": "Recommended Track 1", "artist": "Recommended Artist 1" }, { "track_id": "rec2_track_id", "title": "Recommended Track 2", "artist": "Recommended Artist 2" } ] } ``` ``` -------------------------------- ### GET /v1/artist Source: https://reccobeats.com/docs/apis/get-artists Retrieves a list of artists based on provided IDs. Supports filtering by ReccoBeats ID or Spotify ID. ```APIDOC ## GET /v1/artist ### Description Retrieves a list of artists based on provided IDs. Supports filtering by ReccoBeats ID or Spotify ID. ### Method GET ### Endpoint https://api.reccobeats.com/v1/artist ### Parameters #### Query Parameters - **ids** (string[]) - Required - List of Artist's ReccoBeats ID or Spotify ID. Possible values: `>= 1`, `<= 40` ### Request Example ```json { "ids": ["artist1_id", "artist2_id"] } ``` ### Response #### Success Response (200) - **content** (object[]) - An array of artist objects. - **id** (string) - Unique id for artist. - **name** (string) - Artist's name. - **href** (string) - Known spotify URLs for this artist. #### Response Example ```json { "content": [ { "id": "string", "name": "string", "href": "string" } ] } ``` #### Error Response (400) Bad request ``` -------------------------------- ### GET /v1/album/search Source: https://reccobeats.com/docs/apis/search-albums Searches for albums based on provided criteria. Returns a list of matching albums upon success or an error if the request is malformed. ```APIDOC ## GET /v1/album/search ### Description Searches for albums based on provided criteria. Returns a list of matching albums upon success or an error if the request is malformed. ### Method GET ### Endpoint /v1/album/search ### Parameters #### Query Parameters - **query** (string) - Required - The search query string for albums. ### Request Example ``` GET /v1/album/search?query=example_album_name ``` ### Response #### Success Response (200) - **albums** (array) - A list of album objects matching the search criteria. - **album_id** (string) - The unique identifier for the album. - **title** (string) - The title of the album. - **artist** (string) - The artist of the album. #### Response Example ```json { "albums": [ { "album_id": "alb_12345", "title": "Example Album", "artist": "Example Artist" } ] } ``` #### Error Response (400) - **error** (string) - A message describing the bad request. #### Response Example ```json { "error": "Bad request" } ``` ``` -------------------------------- ### GET /v1/track Source: https://reccobeats.com/docs/apis/get-tracks Retrieves a list of multiple tracks. This endpoint is used to fetch track data from the Reccobeats platform. ```APIDOC ## GET /v1/track ### Description Retrieves a list of multiple tracks. This endpoint is used to fetch track data from the Reccobeats platform. ### Method GET ### Endpoint /v1/track ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **message** (string) - A success message indicating the tracks were retrieved. #### Response Example { "message": "Tracks retrieved successfully" } #### Error Response (400) - **error** (string) - An error message indicating a bad request. #### Response Example { "error": "Bad request" } ``` -------------------------------- ### GET /v1/album/:id/track Source: https://reccobeats.com/docs/apis/get-album-track Retrieves all tracks belonging to a specific album. This endpoint allows users to fetch the tracklist for any given album ID. ```APIDOC ## GET /v1/album/:id/track ### Description Retrieves all tracks belonging to a specific album. This endpoint allows users to fetch the tracklist for any given album ID. ### Method GET ### Endpoint /v1/album/:id/track ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the album. ### Response #### Success Response (200) - **tracks** (array) - A list of tracks associated with the album. #### Error Response (400) - **message** (string) - Description of the bad request. #### Error Response (404) - **message** (string) - Indicates that the album was not found. ``` -------------------------------- ### Get Track's Album Information (HTTP Client) Source: https://reccobeats.com/docs/apis/get-track-album This snippet demonstrates how to retrieve album information for a track using the HTTP client in Python. It sends a GET request to the ReccoBeats API and prints the JSON response. Ensure you have a valid track ID to use in the request. ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/track/:id/album", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### Get Multiple Audio Features Request Source: https://reccobeats.com/docs/apis/get-audio-features This snippet demonstrates how to make a GET request to the ReccoBeats API to retrieve audio features for multiple tracks. The request requires a list of track IDs (ReccoBeats, Spotify, or ISRC) as a query parameter, with a maximum of 40 IDs allowed. ```http GET https://api.reccobeats.com/v1/audio-features?ids=TRACK_ID_1,TRACK_ID_2,TRACK_ID_3 ``` -------------------------------- ### Get Track Recommendations by Seeds Source: https://reccobeats.com/docs/documentation/Resources/resource-id Illustrates how to obtain track recommendations based on seed tracks. This endpoint accepts both Reccobeats IDs and Spotify IDs as seeds, allowing for diverse recommendation generation. ```HTTP GET /track/recommendation?seeds=00vJzaoxM3Eja1doBUhX0P&seeds=2670c328-c40f-45f4-80df-f48b29296deb&size=10 ``` -------------------------------- ### GET /v1/artist/:id/album Source: https://reccobeats.com/docs/apis/get-artist-album Retrieves a list of albums for a specific artist. You can paginate through the results and specify the number of items per page. ```APIDOC ## GET /v1/artist/:id/album ### Description Retrieves a list of albums for a specific artist. Supports pagination and custom page sizes. ### Method GET ### Endpoint `https://api.reccobeats.com/v1/artist/:id/album` ### Parameters #### Path Parameters - **id** (string) - Required - Artist ID. #### Query Parameters - **page** (integer) - Optional - Page number, starting from 0. Default is 0. Max value is 1000. - **size** (integer) - Optional - Total elements per page. Default is 25. Max value is 50. ### Request Example ```json { "example": "(No request body for GET request)" } ``` ### Response #### Success Response (200) - **content** (object[]) - An array of album objects. - **id** (string) - Unique ID for the album. - **albumType** (string) - The type of the album (e.g., 'album', 'single', 'compilation'). - **artists** (object[]) - List of artists for this album. - **id** (string) - Unique ID for the artist. - **name** (string) - Artist's name. - **href** (string) - Known Spotify URLs for this artist. - **totalTracks** (integer) - Total number of tracks in the album. - **href** (string) - Known Spotify URLs for this album. - **name** (string) - Name of the album. - **availableCountries** (string) - List of available countries identified by their ISO 3166-1 alpha-2 code, separated by commas (Optional). - **releaseDate** (string) - The date the album was first released (Optional). - **releaseDateFormat** (string) - The precision of the release date (e.g., 'YYYY-MM-DD', 'MM-DD', 'YYYY'). - **isrc** (string) - International Standard Recording Code (Optional). - **ean** (string) - European Article Number (Optional). - **upc** (string) - Universal Product Code (Optional). - **label** (string) - The label associated with the album. - **popularity** (integer) - The popularity of the album (0-100). - **page** (integer) - Current page number. - **size** (integer) - Number of elements per page. - **totalElements** (integer) - Total number of elements available. - **totalPages** (integer) - Total number of pages. #### Response Example ```json { "content": [ { "id": "string", "albumType": "string", "artists": [ { "id": "string", "name": "string", "href": "string" } ], "totalTracks": 0, "href": "string", "name": "string", "availableCountries": "string", "releaseDate": "string", "releaseDateFormat": "string", "isrc": "string", "ean": "string", "upc": "string", "label": "string", "popularity": 0 } ], "page": 0, "size": 0, "totalElements": 0, "totalPages": 0 } ``` #### Error Responses - **400**: Bad request (e.g., invalid parameters). - **404**: Artist not found. ``` -------------------------------- ### Get Track Detail (HTTP GET Request) Source: https://reccobeats.com/docs/apis/get-track-by-id This snippet demonstrates how to make an HTTP GET request to retrieve detailed information about a specific track using its ID. It specifies the API endpoint and the expected response format. ```http GET https://api.reccobeats.com/v1/track/:id ``` -------------------------------- ### GET /v1/audio-features Source: https://reccobeats.com/docs/apis/get-audio-features Retrieves audio features for one or more tracks based on their IDs. This endpoint allows you to get detailed characteristics such as acousticness, danceability, energy, and more for specified tracks. ```APIDOC ## GET /v1/audio-features ### Description Retrieves audio features for one or more tracks based on their IDs. This endpoint allows you to get detailed characteristics such as acousticness, danceability, energy, and more for specified tracks. ### Method GET ### Endpoint /v1/audio-features ### Parameters #### Query Parameters - **ids** (string) - Required - A comma-separated list of track IDs for which to retrieve audio features. #### Request Body This endpoint does not accept a request body. ### Response #### Success Response (200) - **content** (object[]) - An array of objects, where each object represents the audio features of a track. - **id** (string) - Unique ID for the track. - **href** (string) - Known Spotify URLs for this track. - **isrc** (string) - International Standard Recording Code. - **acousticness** (float) - A confidence measure from 0.0 to 1.0, greater value represents higher confidence the track is acoustic. - **danceability** (float) - A measure of how suitable a song is for dancing, ranging from 0 to 1. - **energy** (float) - A measure of the intensity and liveliness of a track, ranging from 0 to 1. - **instrumentalness** (float) - Predicts whether a track contains no vocals. Values above 0.5 are intended to represent instrumental tracks. - **key** (integer) - The key the track is in. Integers map to pitches using standard Pitch Class notation (0 = C, 1 = C♯/D♭, etc.). -1 if no key was detected. - **liveness** (float) - Detects the presence of an audience in the recording. Higher values represent an increased probability that the track was performed live. - **loudness** (float) - The overall loudness of a track in decibels (dB). Values typical range between -60 and 0 db. - **mode** (integer) - Indicates the modality (major or minor) of a track. 1 for major, 0 for minor. - **speechiness** (float) - Detects the presence of spoken words in a track. Closer to 1.0 means more speech-like. - **tempo** (float) - The overall estimated tempo of a track in beats per minute (BPM). Values typical range between 0 and 250. - **valence** (float) - Measures the emotional tone or mood of a track, ranging from 0 (negative) to 1 (positive). #### Error Response (400) - **Bad request** - Indicates an issue with the request parameters, such as invalid track IDs. #### Error Response (404) - **Audio features not found** - Indicates that audio features could not be found for the provided track IDs. ### Request Example ```python import http.client conn = http.client.HTTPSConnection("api.reccobeats.com") payload = '' headers = { 'Accept': 'application/json' } conn.request("GET", "/v1/audio-features?ids=TRACK_ID_1,TRACK_ID_2", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ### Response Example (Success) ```json { "content": [ { "id": "string", "href": "string", "isrc": "string", "acousticness": 0.123, "danceability": 0.789, "energy": 0.987, "instrumentalness": 0.012, "key": 5, "liveness": 0.456, "loudness": -5.67, "mode": 1, "speechiness": 0.089, "tempo": 120.5, "valence": 0.876 } ] } ``` ``` -------------------------------- ### 200 OK Response Schema for Track Recommendations Source: https://reccobeats.com/docs/apis/get-recommendation Defines the structure of a successful response when requesting track recommendations. It includes details about tracks, artists, duration, and popularity. ```json { "content": [ { "id": "string", "trackTitle": "string", "artists": [ { "id": "string", "name": "string", "href": "string" } ], "durationMs": 0, "isrc": "string", "ean": "string", "upc": "string", "href": "string", "availableCountries": "string", "popularity": 0 } ] } ``` -------------------------------- ### GET /v1/track/:id Source: https://reccobeats.com/docs/apis/get-track-by-id Retrieves detailed information about a specific track using its ReccoBeats ID. ```APIDOC ## GET /v1/track/:id ### Description Retrieves detailed information about a specific track using its ReccoBeats ID. ### Method GET ### Endpoint https://api.reccobeats.com/v1/track/:id ### Parameters #### Path Parameters - **id** (string) - Required - ReccoBeats's Track ID (example 2670c328-c40f-45f4-80df-f48b29296deb). ### Request Example ```json { "example": "No request body for GET request" } ``` ### Response #### Success Response (200) - **id** (string) - Unique id for track - **trackTitle** (string) - Name of the track - **artists** (object[]) - List of artist for this track - **id** (string) - Unique id for artist - **name** (string) - Artist's name - **href** (string) - Known spotify URLs for this artist. - **durationMs** (integer) - Duration of the track in milliseconds - **isrc** (string) - International Standard Recording Code (Optional) - **ean** (string) - European Article Number (Optional) - **upc** (string) - Universal Product Code (Optional) - **href** (string) - Known spotify URLs for this track - **availableCountries** (string) - List of available country for this track identified by their ISO 3166-1 alpha-2 code. Separated by comma (Optional) - **popularity** (integer) - The popularity of the track. The value will be between 0 and 100, with 100 being the most popular. #### Response Example ```json { "id": "string", "trackTitle": "string", "artists": [ { "id": "string", "name": "string", "href": "string" } ], "durationMs": 0, "isrc": "string", "ean": "string", "upc": "string", "href": "string", "availableCountries": "string", "popularity": 0 } ``` #### Error Responses - **400**: Bad request - **404**: Track not found ```