apilayer languagelayer API

Text Analysis / OAuth Advanced HTTPS
Varies by plan (check documentation)

Overview

apilayer languagelayer is a language detection API that identifies the language of any text across 173 supported languages. It returns confidence scores and ISO language codes, making it easy to route multilingual content appropriately. It is well-suited for apps that process user input from around the world.

💡

Beginner Tip

Send your text as a query parameter called "query" and include your access key — the API returns the top detected language along with a confidence score from 0 to 1.

Available Data

translated text
source language
target language
confidence score

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from apilayer languagelayer",
    "description": "Language Detection JSON API supporting 173 languages",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

detected_languages List of detected language objects sorted by confidence score descending
language_code ISO 639-1 two-letter language code (e.g., "en" for English, "fr" for French)
language_name Human-readable name of the detected language
confidence Detection confidence between 0 and 1; values above 0.9 are highly reliable
success Whether the API request completed without errors

Implementation Example

const url = "https://languagelayer.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "Authorization": "Bearer YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

101 - No Access Key Supplied The access_key query parameter is missing from the request
Add ?access_key=YOUR_API_KEY to every request URL
102 - Invalid Access Key The provided API key does not match any active account
Log in to languagelayer.com to copy the correct access key from your dashboard
Low confidence score on short text Very short strings (1-2 words) do not provide enough signal for accurate detection
Submit longer text samples (at least one full sentence) for reliable language identification

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 3/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth OAuth
HTTPS REQUIRED
CORS UNKNOWN
Category Text Analysis
Difficulty Advanced
Verified: 2026-04-04

Alternatives to apilayer languagelayer

Technical alternatives for different use cases.

Language detection with 173 language support

Better For

Free tier (languagelayer requires paid plan)

Trade-off

Detecting more languages with confidence scores

Similar APIs

View All →