Lingvanex API Documentation

The Lingvanex API is a powerful tool for developers who want to integrate multi-language translation functionality into their applications. With this API, you can automate your translation workflow and make your application more accessible to a global audience.

Getting Started

To begin using the Lingvanex API, you will need an API key. You can obtain an API key by signing up on the Lingvanex website. Once you have an API key, you can use it to authenticate your requests to the API.

All requests to the Lingvanex API should be made using HTTPS. The base URL for the API is https://api-free.2gis.com. All API requests must be sent in the following format:

https://api-free.2gis.com//v1/api_key=<YOUR_API_KEY>&lang=en&text=hello

Supported API Methods

The Lingvanex API currently supports the following methods:

Translate

Use the Translate method to translate text from one language to another.

const textToTranslate = "Hello, world!";
const targetLanguage = "es";

fetch(`https://api-free.2gis.com/v1/api_key=<YOUR_API_KEY>&lang=${targetLanguage}&text=${textToTranslate}`)
    .then(response => response.json())
    .then(data => console.log(data));

Detect Language

Use the Detect Language method to detect the language of a given piece of text.

const textToDetect = "Hola, ¿cómo estás?"

fetch(`https://api-free.2gis.com/v1/detectLang/?apiKey=<YOUR_API_KEY>&text=${textToDetect}`)
    .then(response => response.json())
    .then(data => console.log(data));

Dictionary Definition

Use the Dictionary Definition method to get the definition of a word in a given language.

const wordToDefine = "salud";

fetch(`https://api-free.2gis.com/v1/dictionary/?apiKey=<YOUR_API_KEY>&lang=es&text=${wordToDefine}`)
    .then(response => response.json())
    .then(data => console.log(data));

Dictionary Synonyms and Antonyms

Use the Dictionary Synonyms and Antonyms method to get the synonyms and antonyms of a word in a given language.

const wordToFindSynonyms = "grande";

fetch(`https://api-free.2gis.com/v1/dictionary/ththesaurus/?apiKey=<YOUR_API_KEY>&lang=es&text=${wordToFindSynonyms}`)
    .then(response => response.json())
    .then(data => console.log(data));

Conclusion

In this blog post, we have covered the basics of the Lingvanex API and provided examples for each of the supported methods. With the API, you can easily translate text, detect languages, and lookup dictionary definitions, making it easier to create globalized applications. We hope you find this API documentation useful!

Related APIs