Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide API support #37

Open
arsaboo opened this issue Nov 20, 2024 · 7 comments · May be fixed by #43
Open

Provide API support #37

arsaboo opened this issue Nov 20, 2024 · 7 comments · May be fixed by #43

Comments

@arsaboo
Copy link

arsaboo commented Nov 20, 2024

This is a great tool and I would love to be able to integrate with Beets. Is there any way to use it without the UI using an API?

@goodness-from-me
Copy link

The API is already here.

Request:

POST https://idonthavespotify.donado.co/api/search?v=1 HTTP/1.1
content-type: application/json
user-agent: Bot

{
    "link": "https://open.spotify.com/track/4TCvjlVlI2jpw9zr5PLl7u?si=39b35920c9d84918"
}

Response:

{
  "id": "b3Blbi5zcG90aWZ5LmNvbS90cmFjay80VEN2amxWbEkyanB3OXpyNVBMbDd1P3NpPTM5YjM1OTIwYzlkODQ5MTg%3D",
  "type": "song",
  "title": "падаю вниз",
  "description": "SATOR1 · падаю вниз · Song · 2024",
  "image": "https://i.scdn.co/image/ab67616d0000b27343f93f2f821f9217ec4ff964",
  "audio": "https://p.scdn.co/mp3-preview/981c2b6f4564bd356d9e267670b8f0083a8d20fa",
  "source": "https://open.spotify.com/track/4TCvjlVlI2jpw9zr5PLl7u?si=39b35920c9d84918",
  "universalLink": "https://bit.donado.co/u13Djw",
  "links": [
    {
      "type": "appleMusic",
      "url": "https://music.apple.com/ca/album/%D0%BF%D0%B0%D0%B4%D0%B0%D1%8E-%D0%B2%D0%BD%D0%B8%D0%B7/1733264579?i=1733264580",
      "isVerified": true
    },
    {
      "type": "deezer",
      "url": "https://www.deezer.com/track/2694411532",
      "isVerified": true
    },
    {
      "type": "soundCloud",
      "url": "https://soundcloud.com/n1theproducer/d-block-europe-dreads-in-plats-official-audio",
      "isVerified": true
    },
    {
      "type": "tidal",
      "url": "https://tidal.com/browse/track/349713406",
      "isVerified": true
    }
  ]
}

@aneesh1122
Copy link

The API is already here.

Request:

POST https://idonthavespotify.donado.co/api/search?v=1 HTTP/1.1
content-type: application/json
user-agent: Bot

{
    "link": "https://open.spotify.com/track/4TCvjlVlI2jpw9zr5PLl7u?si=39b35920c9d84918"
}

Response:

{
  "id": "b3Blbi5zcG90aWZ5LmNvbS90cmFjay80VEN2amxWbEkyanB3OXpyNVBMbDd1P3NpPTM5YjM1OTIwYzlkODQ5MTg%3D",
  "type": "song",
  "title": "падаю вниз",
  "description": "SATOR1 · падаю вниз · Song · 2024",
  "image": "https://i.scdn.co/image/ab67616d0000b27343f93f2f821f9217ec4ff964",
  "audio": "https://p.scdn.co/mp3-preview/981c2b6f4564bd356d9e267670b8f0083a8d20fa",
  "source": "https://open.spotify.com/track/4TCvjlVlI2jpw9zr5PLl7u?si=39b35920c9d84918",
  "universalLink": "https://bit.donado.co/u13Djw",
  "links": [
    {
      "type": "appleMusic",
      "url": "https://music.apple.com/ca/album/%D0%BF%D0%B0%D0%B4%D0%B0%D1%8E-%D0%B2%D0%BD%D0%B8%D0%B7/1733264579?i=1733264580",
      "isVerified": true
    },
    {
      "type": "deezer",
      "url": "https://www.deezer.com/track/2694411532",
      "isVerified": true
    },
    {
      "type": "soundCloud",
      "url": "https://soundcloud.com/n1theproducer/d-block-europe-dreads-in-plats-official-audio",
      "isVerified": true
    },
    {
      "type": "tidal",
      "url": "https://tidal.com/browse/track/349713406",
      "isVerified": true
    }
  ]
}

YouTube music link?

@goodness-from-me
Copy link

Try it yourself on different songs, it was just a random song which doesn't have YouTube link.

@sjdonado
Copy link
Owner

sjdonado commented Dec 8, 2024

The API is already here.
Request:

POST https://idonthavespotify.donado.co/api/search?v=1 HTTP/1.1
content-type: application/json
user-agent: Bot

{
    "link": "https://open.spotify.com/track/4TCvjlVlI2jpw9zr5PLl7u?si=39b35920c9d84918"
}

Response:

{
  "id": "b3Blbi5zcG90aWZ5LmNvbS90cmFjay80VEN2amxWbEkyanB3OXpyNVBMbDd1P3NpPTM5YjM1OTIwYzlkODQ5MTg%3D",
  "type": "song",
  "title": "падаю вниз",
  "description": "SATOR1 · падаю вниз · Song · 2024",
  "image": "https://i.scdn.co/image/ab67616d0000b27343f93f2f821f9217ec4ff964",
  "audio": "https://p.scdn.co/mp3-preview/981c2b6f4564bd356d9e267670b8f0083a8d20fa",
  "source": "https://open.spotify.com/track/4TCvjlVlI2jpw9zr5PLl7u?si=39b35920c9d84918",
  "universalLink": "https://bit.donado.co/u13Djw",
  "links": [
    {
      "type": "appleMusic",
      "url": "https://music.apple.com/ca/album/%D0%BF%D0%B0%D0%B4%D0%B0%D1%8E-%D0%B2%D0%BD%D0%B8%D0%B7/1733264579?i=1733264580",
      "isVerified": true
    },
    {
      "type": "deezer",
      "url": "https://www.deezer.com/track/2694411532",
      "isVerified": true
    },
    {
      "type": "soundCloud",
      "url": "https://soundcloud.com/n1theproducer/d-block-europe-dreads-in-plats-official-audio",
      "isVerified": true
    },
    {
      "type": "tidal",
      "url": "https://tidal.com/browse/track/349713406",
      "isVerified": true
    }
  ]
}

YouTube music link?

YouTube music was broken last week, the cookies approach is not longer available. Just fixed #40

image

@aneesh1122
Copy link

aneesh1122 commented Dec 8, 2024

The API is already here.
Request:

POST https://idonthavespotify.donado.co/api/search?v=1 HTTP/1.1
content-type: application/json
user-agent: Bot

{
    "link": "https://open.spotify.com/track/4TCvjlVlI2jpw9zr5PLl7u?si=39b35920c9d84918"
}

Response:

{
  "id": "b3Blbi5zcG90aWZ5LmNvbS90cmFjay80VEN2amxWbEkyanB3OXpyNVBMbDd1P3NpPTM5YjM1OTIwYzlkODQ5MTg%3D",
  "type": "song",
  "title": "падаю вниз",
  "description": "SATOR1 · падаю вниз · Song · 2024",
  "image": "https://i.scdn.co/image/ab67616d0000b27343f93f2f821f9217ec4ff964",
  "audio": "https://p.scdn.co/mp3-preview/981c2b6f4564bd356d9e267670b8f0083a8d20fa",
  "source": "https://open.spotify.com/track/4TCvjlVlI2jpw9zr5PLl7u?si=39b35920c9d84918",
  "universalLink": "https://bit.donado.co/u13Djw",
  "links": [
    {
      "type": "appleMusic",
      "url": "https://music.apple.com/ca/album/%D0%BF%D0%B0%D0%B4%D0%B0%D1%8E-%D0%B2%D0%BD%D0%B8%D0%B7/1733264579?i=1733264580",
      "isVerified": true
    },
    {
      "type": "deezer",
      "url": "https://www.deezer.com/track/2694411532",
      "isVerified": true
    },
    {
      "type": "soundCloud",
      "url": "https://soundcloud.com/n1theproducer/d-block-europe-dreads-in-plats-official-audio",
      "isVerified": true
    },
    {
      "type": "tidal",
      "url": "https://tidal.com/browse/track/349713406",
      "isVerified": true
    }
  ]
}

YouTube music link?

YouTube music was broken last week, the cookies approach is not longer available. Just fixed #40

image

In order to use this API do I have to use my client secret and client id from Spotify?

Will Spotify playlists be supported in the future?

@goodness-from-me
Copy link

No, this API does not require any auth.

@sjdonado
Copy link
Owner

sjdonado commented Dec 9, 2024

No auth for now is a side effect because Raycast plugins don’t have any client key mechanism in place. This isn’t ideal, as all requests are going through the same Spotify and Tidal client, which could lead to rate limits. In the future, the idonthavespotify public API will be refactored to ask for the corresponding oauth tokens

@sjdonado sjdonado linked a pull request Dec 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants