Currently undergoing maintenance - Some pages may not work as expected

Language Detection

Introduction

This is a simple language detection api that uses language-detection library.

Usage

The usage is very simple. Just send a GET request to the following endpoint:

https://api.jm26.net/language-detection/

For example, if you want to detect the language of the text This is an api, you can send a GET request to the following url:

curl -X GET "https://api.jm26.net/language-detection/?q=This%20is%20an%20api"

The response will be a JSON object with the following structure:

{
  "status": "success",
  "input": "This is an api",
  "result": "en",
  "probability": 0.6382647385984428,
  "languages": {
    "en": 0.6382647385984428,
    "ga": 0.6058954393770857,
    "gd": 0.603337041156841,
    "jv": 0.5913236929922135,
    "ay": 0.5872080088987764
  }
}

Parameters

The following parameters are available:

Parameter Description Default Required
q The text to detect the language of - ✔️
n The number of languages to return 5

Note

This api is only for testing purposes. It is not recommended to use it in production, as its results are not always accurate.