Do you have any questions? Just write us an email or ask us through the feedback section.

Here you have simple examples of requests to the Language Identification API. You can use them to test a sample request and get an example response in a quick and easy way, right in your favorite programming language.

  CURL *curl;
  CURLcode res;
  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_URL, "https://api.meaningcloud.com/lang-2.0?key=<your_key>&txt=<text>");
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
    struct curl_slist *headers = NULL;
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    res = curl_easy_perform(curl);
  }
  curl_easy_cleanup(curl);
  var client = new RestClient("https://api.meaningcloud.com/lang-2.0?key=<your_key>&txt=<text>");
  client.Timeout = -1;
  var request = new RestRequest(Method.POST);
  IRestResponse response = client.Execute(request);
  Console.WriteLine(response.Content);
  curl --location --request POST 'https://api.meaningcloud.com/lang-2.0?key=<your_key>&txt=<text>'
  var settings = {
    "url": "https://api.meaningcloud.com/lang-2.0?key=<your_key>&txt=<text>",
    "method": "POST",
    "timeout": 0,
  };

  $.ajax(settings).done(function (response) {
    console.log(response);
  });
  var https = require('follow-redirects').https;
  var fs = require('fs');

  var options = {
    'method': 'POST',
    'hostname': 'api.meaningcloud.com',
    'path': '/lang-2.0?key=<your_key>&txt=<text>',
    'headers': {
    },
    'maxRedirects': 20
  };

  var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });

    res.on("error", function (error) {
      console.error(error);
    });
  });

  req.end();
  require "uri"
  require "net/http"

  url = URI("https://api.meaningcloud.com/lang-2.0?key=<your_key>&txt=<text>")

  https = Net::HTTP.new(url.host, url.port);
  https.use_ssl = true

  request = Net::HTTP::Post.new(url)

  response = https.request(request)
  puts response.read_body
  import Foundation

  var semaphore = DispatchSemaphore (value: 0)

  var request = URLRequest(url: URL(string: "https://api.meaningcloud.com/lang-2.0?key=<your_key>&txt=<text>")!,timeoutInterval: Double.infinity)
  request.httpMethod = "POST"

  let task = URLSession.shared.dataTask(with: request) { data, response, error in
    guard let data = data else {
      print(String(describing: error))
      return
    }
    print(String(data: data, encoding: .utf8)!)
    semaphore.signal()
  }

  task.resume()
  semaphore.wait()

If you work in Python, you can find our SDK in Pypi. You can also check it out in our Github account.