The Text Spinner API is an API that exposes an endpoint which can spin text with the proper spinning expression syntax.
Using this API you can generate multiple variations of the same text.
POST spin - Spin text using the spin method.
To use this API, simple add some text that you wish to be spun with the proper spin expression.
A spin expression requires that you enclose the text or texts you want to spin with double brackets alongside with synonyms separated with the pipe ‘|’ delimiter.
{{A {{simple|basic}} example|An uncomplicated scenario|The {{simplest|trivial|fundamental|rudimentary}} case|My {{test|invest{{igative|igation}}}} case}} to illustrate the {{function|problem}}An optional parameter is to set the number of variations you want this API to generate.
By default, it will list out 5 spins generated.
unirest.post('https://pozzad-text-spinner.p.rapidapi.com/textspinner/spin') .header('X-Mashape-Key', '{Sign up to receive your API Key}') .header('X-Mashape-Host', 'pozzad-text-spinner.p.rapidapi.com') .header('Content-Type', 'application/x-www-form-urlencoded') .send('text={{A {{simple|basic}} example|An uncomplicated scenario|The {{simplest|trivial|fundamental|rudimentary}} case|My {{test|invest{{igative|igation}}}} case}} to illustrate the {{function|problem}}') .send('variationsNum=5') .end(function (result) { console.log(result.status, result.headers, result.body); });And here is a sample response:
{ 'body':{ 'variations':[ 'The simplest case to illustrate the problem', 'My investigative case to illustrate the function', 'An uncomplicated scenario to illustrate the problem', 'The trivial case to illustrate the function', 'An uncomplicated scenario to illustrate the problem' ] } }