{"id":23626070,"url":"https://github.com/nurulashraf/spotify-data-retrieval","last_synced_at":"2026-04-25T21:32:10.601Z","repository":{"id":267079969,"uuid":"900172528","full_name":"nurulashraf/spotify-data-retrieval","owner":"nurulashraf","description":"Python Programming - Spotify Data Retrieval (API)","archived":false,"fork":false,"pushed_at":"2025-02-03T07:36:37.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T16:09:44.575Z","etag":null,"topics":["api-integration","data-retrieval","music-data","playlist-management","python","python-projects","spotify-api","spotify-web-api","user-authentication"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nurulashraf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-08T03:50:18.000Z","updated_at":"2025-02-03T07:36:41.000Z","dependencies_parsed_at":"2024-12-08T07:26:12.188Z","dependency_job_id":"b1bd7078-270b-403d-98ce-61a053762d36","html_url":"https://github.com/nurulashraf/spotify-data-retrieval","commit_stats":null,"previous_names":["nurulashraf/cr-project-spotify","nurulashraf/spotify-user-library","nurulashraf/spotify-data-fetcher"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nurulashraf/spotify-data-retrieval","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurulashraf%2Fspotify-data-retrieval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurulashraf%2Fspotify-data-retrieval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurulashraf%2Fspotify-data-retrieval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurulashraf%2Fspotify-data-retrieval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nurulashraf","download_url":"https://codeload.github.com/nurulashraf/spotify-data-retrieval/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurulashraf%2Fspotify-data-retrieval/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32278249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-integration","data-retrieval","music-data","playlist-management","python","python-projects","spotify-api","spotify-web-api","user-authentication"],"created_at":"2024-12-27T22:39:38.778Z","updated_at":"2026-04-25T21:32:10.584Z","avatar_url":"https://github.com/nurulashraf.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spotify Data Retrieval Tools\n\nA collection of Python scripts to interact with the Spotify Web API for retrieving user library data and artist information. This repository provides easy-to-use tools for accessing various Spotify data endpoints.\n\n## Features\n\n- User Library Data Retrieval:\n  - Access saved albums\n  - View liked songs\n  - List user playlists\n  \n- Artist Data Retrieval:\n  - Search for artists\n  - Get artist's top tracks\n  - Access artist's albums\n  - View album tracks\n  - Retrieve detailed artist information\n\n## Prerequisites\n\n- Python 3.6 or higher\n- Spotify Developer account\n- Spotify API credentials (Client ID and Client Secret)\n\n## Setup and Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/nurulashraf/spotify-data-retrieval.git\n   cd spotify-data-retrieval\n   ```\n\n2. Install required packages:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. Create a Spotify Developer account and register your application at [Spotify Developer Dashboard](https://developer.spotify.com/dashboard)\n\n## Usage\n\n### Configuration\n\n1. In the Spotify Developer Dashboard:\n   - Create a new application\n   - Get your Client ID and Client Secret\n   - Set up your Redirect URI\n   - Add the URI to your application settings\n\n2. Update the credentials in the scripts:\n   - Open `src/spotify_user_data_retrieval.ipynb`\n   - Replace the placeholder values with your credentials:\n     ```python\n     client_id = 'your_client_id'\n     client_secret = 'your_client_secret'\n     redirect_uri = 'your_redirect_uri'\n     ```\n   - Do the same for `src/spotify_artist_data_retrieval.ipynb`\n\n### Running the Scripts\n\n1. For User Data Retrieval:\n   - Open `src/spotify_user_data_retrieval.ipynb` in Jupyter Notebook or Google Colab\n   - Run the first cell with authentication code\n   - After running, a Spotify authorization page will open in your browser\n   - Authorize the application\n   - You will be redirected to your redirect URI\n   - In the URL of the redirect page, look for the code parameter after `?code=`\n   - Copy the code value (everything after `?code=` and before any `\u0026` if present)\n   - In the second cell of the notebook, replace the placeholder:\n     ```python\n     auth_code = 'your_authorization_code'  # Replace with the code from the URL\n     ```\n   - Run the remaining cells to fetch user data\n\n2. For Artist Data Retrieval:\n   - Open `src/spotify_artist_data_retrieval.ipynb`\n   - In the second cell, locate the search query variable:\n     ```python\n     search_query = 'desired_artist_name'  # Replace with desired artist name\n     ```\n   - Replace the placeholder with your desired artist name (e.g., 'Taylor Swift', 'The Beatles')\n   - The script will return:\n     - List of matching artists (top 5 results)\n     - Detailed information about the top match\n     - Top tracks from the artist\n     - Recent albums\n     - Tracks from their most recent album\n   - Run all cells to get the complete artist information\n\n## Scopes Used\n\nThe following Spotify API scopes are used in this project:\n- `user-library-read`: Access user's saved albums and tracks\n- `user-top-read`: Access user's top artists and tracks\n- `user-read-playback-state`: Read user's playback state\n\n## Limitations\n- Access token expires after a short period\n- Requires manual token refresh\n\n## Contributing\nContributions, issues, and feature requests are welcome!\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurulashraf%2Fspotify-data-retrieval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnurulashraf%2Fspotify-data-retrieval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurulashraf%2Fspotify-data-retrieval/lists"}