# SiteCheck Language Detection

> SiteCheck Language Detection is a paid API for AI agents from api.sitecheck-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-18).

Detects the natural language of a given text string, returning ISO 639-1 code, language name, script, and confidence score with alternatives.

## Facts

- Endpoint: GET https://api.sitecheck-api.workers.dev/api/lang?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sitecheck-language-detection-ee0a7375
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_e6pD7u48kA1eY7-y74Fpq

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sitecheck-language-detection-ee0a7375
```

Example prompt: What language is this text written in: 'Bonjour, comment puis-je vous aider aujourd'hui?' — give me the ISO code, language name, and how confident you are.

## When to prefer this

Use this endpoint when you need lightweight, pay-per-call language identification without signing up for a full NLP platform. Ideal for agents that occasionally need to route, validate, or tag content by language as part of a broader pipeline. At $0.001 per call it's cost-effective for sporadic use. Prefer this over full translation APIs when you only need to know the language, not translate the content.

## Known failure modes

- Missing or empty 'text' query parameter returns an error
- Text longer than 5,000 characters may be rejected or truncated
- Very short strings (1–3 characters) may return low confidence or ambiguous results
- Uncommon or constructed languages may not be recognized
- Mixed-language text may return incorrect primary detection
- Payment failure via x402/USDC blocks the request

## How this service works

The language of a text with franc-min: ISO 639-3 and ISO 639-1 codes, the English name, confidence from 0 to 1, the script (Latin, Cyrillic, Arabic...) and the three next most likely languages. Send texts= (a JSON array of up to 20 strings) for a batch. Under 20 characters the answer is und with a note. 61 languages.

## Output

A JSON object containing: the detected language name (e.g. 'English'), ISO 639-1 code (e.g. 'en'), ISO 639-3 language code, writing script (e.g. 'Latin'), confidence score (0–1), input text character length, timestamp, and an array of alternative language guesses each with their own code and confidence score.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "text": {
       "type": "string",
       "description": "Up to 5,000 characters"
      },
      "texts": {
       "type": "string",
       "description": "Alternative: a JSON array of up to 20 strings, e.g. [\"Hallo\",\"Merhaba\"]"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "length": 24,
  "script": "Latin",
  "iso639_1": "en",
  "language": "eng",
  "checkedAt": "2026-10-13T09:00:00.000Z",
  "confidence": 1,
  "alternatives": [
   {
    "iso639_1": "it",
    "language": "ita",
    "confidence": 0.86,
    "languageName": "Italian"
   }
  ],
  "languageName": "English"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sitecheck-language-detection-ee0a7375/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.sitecheck-api.workers.dev](https://www.zero.xyz/host/api.sitecheck-api.workers.dev/llms.txt)
