API Clients

We have prepared API clients for following programming languages. Please follow the link and you will find the instructions how to setup API client.

If your programming language is not listed here, you can use JSON API directly.


Basic Detection

Simply submit HTTP request to http://ws.detectlanguage.com/0.2/detect
API produces results in JSON format.

HTTP POST method should be used to send request. GET method is deprecated and can cause errors with larger requests.

Request parameters

  • q - your text, mandatory (must be valid UTF-8 encoded string)
  • key - your API key, mandatory

Request example


Response format

API produces results in JSON format. Response contains array of language candidates.

Each object contains following values:

Response example

Batch Requests

It is possible to detect language of several texts using one query. This saves network bandwidth and increases performance.

Note: batch request detections are counted as separate requests, i.e. if 3 texts were passed they will be counted as 3 separate requests.

Batch request example

To make batch request just pass array of texts in q parameter.


Batch response example

Result is JSON array with detections listed in the same order as request texts.

Accessing Your Counters & Plan Details

User request and data counters can be accessed at http://ws.detectlanguage.com/0.2/user/status

Request parameters

  • key - your API key, mandatory


  • date - today's date (UTC timezone)
  • requests - requests sent today
  • bytes - text bytes sent today
  • plan - plan code
  • plan_expires - plan expiration date
  • daily_requests_limit - requests limit per day
  • daily_bytes_limit - bytes limit per day

Getting All Languages

List of all languages is accessible at http://ws.detectlanguage.com/0.2/languages

Secure Mode (SSL)

Texts submitted to the API are used by language detection engine only. Texts are not stored or used in any other way.

If you are passing sensitive information to the API, you can use HTTPS protocol to ensure secure network transfer.