Language Detection API Documentation

Complete reference for the Language Detection API

Authentication

Authorization: Bearer sk_live_your_key_here

GET POST /v1/language/detect

Parameters

Field Type Description
textstringText to analyze (required, max 10,000 chars)
topintegerNumber of top candidates to return (1-10, default 3)

Response Fields

Field Description
detected_languageTop detected language name
confidenceConfidence score (0-1)
is_reliableWhether confidence >= 0.5
detailsArray of candidate languages with codes and scores
scriptsDetected writing scripts with percentages

Example

curl -X POST "https://snapapis.com/api/v1/language/detect" \
  -d "api_key=KEY&text=Bonjour le monde, comment allez-vous?"