'Is there is an OpenAPI specification for the Notion API?

The Notion API reference is obviously generated from an OpenAPI spec. However I can't find anywhere to download the YAML or JSON source doc (which would be useful).

Has anyone found it?



Solution 1:[1]

There doesn't seem to be anything so far. You could follow this discussion to keep yourself updated.

Solution 2:[2]

The discussion page @FruitVodka linked does not exists, but I managed to get an functioning OpenAPI YAML from Notion Postman Collection.

  1. First I exported it to a Postman JSON using the UI.

  2. Then you can use postman-to-openapi to convert it to a OpenAPI YAML as addressed here.

    npm i postman-to-openapi -g p2o ./path/to/PostmantoCollection.json -f ./path/to/result.yml

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 FruitVodka
Solution 2 athossampayo