{"id":13837167,"url":"https://github.com/dawsonandrews/spotify-mac-api","last_synced_at":"2025-07-10T16:32:30.789Z","repository":{"id":89283065,"uuid":"41421023","full_name":"dawsonandrews/spotify-mac-api","owner":"dawsonandrews","description":"HTTP API to control a spotify player on Mac OS","archived":false,"fork":false,"pushed_at":"2015-10-21T10:41:04.000Z","size":188,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-05T15:05:38.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dawsonandrews.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}},"created_at":"2015-08-26T11:02:56.000Z","updated_at":"2020-04-20T18:19:21.000Z","dependencies_parsed_at":"2023-03-13T18:13:09.423Z","dependency_job_id":null,"html_url":"https://github.com/dawsonandrews/spotify-mac-api","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsonandrews%2Fspotify-mac-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsonandrews%2Fspotify-mac-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsonandrews%2Fspotify-mac-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dawsonandrews%2Fspotify-mac-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dawsonandrews","download_url":"https://codeload.github.com/dawsonandrews/spotify-mac-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225648368,"owners_count":17502176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-04T15:01:02.398Z","updated_at":"2024-11-20T23:32:29.604Z","avatar_url":"https://github.com/dawsonandrews.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Spotify Mac API\n\nHTTP API to control a spotify player on Mac OS. This is useful if you want to write scripts to control the music in your office from [Hubot](https://hubot.github.com/)\n\n\n## Running the API server\n\n```sh\n$ npm i -g spotify-mac-api\n$ spotify-mac-api -p 3344 -s myWonderfulSekret\n```\n\n## Making your server publicly available\n\nUse [ngrok](https://ngrok.com/docs) to expose the server on the web\n\n```sh\n$ ngrok http 3344\n```\n\nCheckout [this guide](https://github.com/alternatelabs/spotify-mac-api/wiki/Running-on-startup-on-OS-X) using launchd to start on boot and keep it running.\n\n## API endpoints\n\n### Security\n\nCurrently there is a rather basic shared secret used to control access, pass the `secret` param with all requests. You can set this when running `spotify-mac-api -s MySharedSecret`\n\n### POST /(play/pause/toggle)\n\nToggles play/pause\n\n### POST /next\n\nPlays the next track and returns the next tracks name.\n\n### POST /prev\n\nPlays the previous track and returns the previous tracks name.\n\n### POST /playing\n\nReturns the currently playing tracks name\n\n### POST /mute\n\nToggles muting the volume\n\n### POST /search?type=track\u0026query=mr%20brightside\n\n**type** - track, artist, album or playlist\n**query** - the search query\n\nReturns response text to queue up a play\n\n### POST /play/track/:name\n\n**name** - name of the song to find and play\n\n### POST /play/artist/:name\n\n**name** - name of the artist to find and play\n\n### POST /play/album/:name\n\n**name** - name of the album to find and play\n\n### POST /play/playlist/:name\n\n**name** - name of the playlist to find and play\n\n### POST /play/queue/:id\n\n**id** - ID of the song to play from search results\n\n\n## Inspiration\n\nInspired by [Hubot-spotify](https://github.com/davidvanleeuwen/hubot-spotify/blob/master/spotify.coffee)\n\n## License\n\nCopyright (c) 2015 Alternate Labs Ltd\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdawsonandrews%2Fspotify-mac-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdawsonandrews%2Fspotify-mac-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdawsonandrews%2Fspotify-mac-api/lists"}