1. Home
  2. Docs
  3. Linguix API
  4. REST API calls
Last updated 318 days ago

REST API calls

Grammar check API grammar categories available:

  • category_data_key
  • CASING
  • TYPOS
  • COMPOUNDING
  • GRAMMAR
  • STYLE
  • COLLOCATIONS
  • PUNCTUATION
  • CONFUSED_WORDS
  • NONSTANDARD_PHRASES
  • REDUNDANCY
  • SEMANTICS
  • PLAIN_ENGLISH
  • WIKIPEDIA
  • TYPOGRAPHY
  • CREATIVE_WRITING
  • REPETITIONS_STYLE
  • TON_ACADEMIC
  • AI

Paraphrashing call example:

const axios = require('axios');
async function makePostRequest() {
    const url = 'https://api.linguix.com/api/v2/rephrase';
    const data = {
        text: 'Let she do it!'
    };
    const authToken = 'token';
    try {
        const response = await axios.post(url, data, {
            headers: {
                'Authorization': `Bearer ${authToken}`
            }
        });
        console.log('Results:', response.data.results);
    } catch (error) {
        console.error('Error:', error.message);
    }
}
makePostRequest();

Word definitions call example:

const axios = require('axios');
async function makePostRequest() {
    const word = 'cat';
    const url = 'https://api.linguix.com/api/v1/define/' + word;
    
    const authToken = 'token';
    try {
        const response = await axios.get(url, null, {
            headers: {
                'Authorization': `Bearer ${authToken}`
            }
        });
        console.log('Info:', response.data.info);
    } catch (error) {
        console.error('Error:', error.message);
    }
}
makePostRequest();
Was this article helpful to you? Yes No

How can we help?

Looking for help ?
Contact Support

We’re here to help you with anything you need.

Contact us