Getting Synonyms only

Hello, is there an API available which I can use to get the related synonyms for a specific word for a language. For example I pass the following param to an API : api_url/{word}/{lang} and it fetches the synonyms in that language.

There isn’t afaik. Though it shouldn’t be too hard write one.