Spotify APi
Here’s the updated documentation with the revised instructions for obtaining an API key:
Spotify API Endpoint Documentation
Overview
The Spotify API endpoints allow users to search for tracks, artists, or albums and retrieve detailed information about each entity. You can access information such as the artist's name, song's popularity, the number of followers the artist has, and links to Spotify.
Base URL
https://connect.dinocoreapi.com/spotify
Endpoints
Search Endpoint
URL:
GET /search
Description: Allows searching for tracks, artists, or albums with detailed information.
Query Parameters:
q
(required): The search query string (e.g., song title, artist name, album name).type
(optional): The type of item to search for. Defaults totrack
if not specified. Possible values:track
album
artist
Request Headers:
Authorization
: Bearer YOUR_API_KEY
Example Request:
Response:
A JSON object containing an array of items with details such as:
artistName
: The name of the artist.songName
: The name of the song.popularity
: The song's popularity score (0-100).artistFollowers
: The total number of followers the artist has.songLink
: A direct link to the song on Spotify.
Example Response:
Track Information Endpoint
URL:
GET /track/:id
Description: Retrieves detailed information about a specific track by ID.
Artist Information Endpoint
URL:
GET /artist/:id
Description: Retrieves detailed information about a specific artist by ID.
Album Information Endpoint
URL:
GET /album/:id
Description: Retrieves detailed information about a specific album by ID.
Error Responses
400 Bad Request: If the
q
parameter is missing or improperly formatted.401 Unauthorized: If the API key is missing or invalid.
500 Internal Server Error: If there is an issue with the Spotify API or the server.
Usage Notes
Access Token: The endpoint handles authentication with Spotify internally using the Client Credentials Flow. Users only need to provide a valid API key.
Rate Limiting: Spotify API rate limits apply. If you receive a 429 Too Many Requests response, reduce the frequency of your requests.
How to Obtain an API Key
To get access to the API key, please join our Discord server.
FAQ
Q: What types of searches can I perform?
A: You can search for tracks, albums, or artists using the
type
query parameter.
Q: How accurate is the popularity score?
A: The popularity score is provided by Spotify and is based on the number of recent plays and other factors.
Last updated