DetectLanguage · Example Payload

Detect Batch

Example of detecting languages for multiple texts in a single request using the POST /detect-batch endpoint. Each text in the input array produces a corresponding array of language candidates in the response.

Language DetectionNatural Language ProcessingText AnalysisMachine LearningMultilingual

Detect Batch is an example object payload from DetectLanguage, with 4 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

titledescriptionrequestresponse

Example Payload

Raw ↑
{
  "title": "Batch Language Detection",
  "description": "Example of detecting languages for multiple texts in a single request using the POST /detect-batch endpoint. Each text in the input array produces a corresponding array of language candidates in the response.",
  "request": {
    "method": "POST",
    "url": "https://ws.detectlanguage.com/v3/detect-batch",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    "body": {
      "q": [
        "Hello world",
        "Dolce far niente",
        "Labas rytas"
      ]
    }
  },
  "response": {
    "status": 200,
    "body": [
      [
        {
          "language": "en",
          "score": 0.9098
        }
      ],
      [
        {
          "language": "it",
          "score": 0.5074
        }
      ],
      [
        {
          "language": "lt",
          "score": 0.3063
        }
      ]
    ]
  }
}