Announcements
The Spotify Stars Program: Celebrating Values Week!

Help Wizard

Step 1

NEXT STEP

OpenApi/Swagger description for the Web API

OpenApi/Swagger description for the Web API

As Spotify has not updated the RAML description for the Web API for 5 years, I started to write a parser for the Web API reference documentation to generate a machine-readable format of the documentation. From this machine-readable documentation, I am also generating an OpenAPI description for the Spotify Web API. You can find the code on GitHub: https://github.com/sonallux/spotify-web-api. The latest generated OpenAPI description can be found in the releases.

 

The parser also corrects errors currently present in the Web API reference documentation. So if any developer from Spotify is reading this, please check out 

this file for errors in the endpoint description and this file for errors in the object description and missing objects.

 

But nevertheless, I wanted to share my work with the Community because other developers might also find my work useful. And I am more than happy to hear your feedback.

 

------------------------------

 

Update: At the Developer Day, Spotify announced that an official OpenAPI description will be released in the future (see the recording on YouTube).

 

At the end of 2021, Spotify finally released its own official OpenAPI definition here: https://developer.spotify.com/_data/documentation/web-api/reference/open-api-schema.yml

 

Unfortunately, there are still some errors present in it. Therefore I will continue my project at https://github.com/sonallux/spotify-web-api and will provide fixes for these errors. So stay tuned for the next release!

Reply
4 Replies

Hi @sonallux!

Thank you for your work and researches on Spotify Web API's Open API definition.

This will definitely help me revamp my https://github.com/charlypoly/spotify-graphql project since, lacking some up-to-date Open API def, I started a few years ago to write the complete API JSON Schema def, which was cumbersome...

 

Thank you again for your work! 👏

I want to give everyone an update about my project.

 

At the end of 2021, Spotify released its own official OpenAPI definition here: https://developer.spotify.com/_data/documentation/web-api/reference/open-api-schema.yml

 

Unfortunately, there are still some errors present in it. Therefore I will continue my project at https://github.com/sonallux/spotify-web-api and will provide fixes for these errors. So stay tuned for the next release!

Hi @charlypoly!



having a GraphQL API for Spotify sounds really awesome! I will definitely have a look at your project.

Hi @sonallux! I tried to use your Spotify OpenAPI to build a GPT, but got lots of errors:

 

  1. Description Length Errors: Descriptions that exceed the specified length limit (300 characters). For example:

    • description has length 621 exceeding limit of 300
    • description has length 330 exceeding limit of 300
  2. Schema Errors: Errors related to missing properties in object schemas. For example:

    • object schema missing properties
  3. Reference Errors: Errors due to references to unknown components or missing non-string names. For example:

    • reference to unknown component PlaylistUserObject; using empty schema
    • parameter {'$ref': '#/components/parameters/QueryMarket'} is has missing or non-string name; skipping
  4. Duplicated Parameter Errors: Errors where a parameter is duplicated in a request. For example:

    • parameter uris is duplicated; skipping
    • parameter ids is duplicated; skipping
  5. Skipping Function Errors: Errors that cause the function to be skipped entirely due to the aforementioned issues. For example:

    • skipping function due to errors

I put my questions in this post and would be happy if you could respond. Thank you.

 

Suggested posts