{"uid":"cap_xcL3AhTGsNt6vJi5y45c2","slug":"agent-data-tools-revmesh2074-workers-dev-language-detection-via-992573b8","name":"Language Detection via Trigram Statistics (franc-min)","description":"Detect which language a text is written in: the most likely language with its ISO 639-3 and 639-1 codes and English name, plus the next candidates with relative scores, using trigram statistics for 82 major languages (franc-min). Works best above about 20 characters; very short or mixed text returns und (undetermined). Local, no outside service. Use to route messages, pick a translation target or filter content by language.","url":"https://agent-data-tools.revmesh2074.workers.dev/text/language?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The text (up to 10,000 characters)"}}},"responseSchema":{"type":"object","properties":{"language":{"type":"object","properties":{"name":{"type":"string"},"iso6391":{"type":"string"},"iso6393":{"type":"string"}}},"confident":{"type":"boolean"},"candidates":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"score":{"type":"number"},"iso6393":{"type":"string"}}}},"characters":{"type":"number"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8QsfOjzXkfqz0NIUVa7ej","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agent-data-tools.revmesh2074.workers.dev","brandSlug":"agent-data-tools-revmesh2074-workers-dev-x402","brandBaseUrl":"https://agent-data-tools.revmesh2074.workers.dev","brandDocsUrl":null,"whatItDoes":"Detects the language of a given text using trigram statistics, returning the top language with ISO 639-1/639-3 codes and ranked candidate languages with confidence scores.","exampleAgentPrompt":"What language is this text written in: 'Bonjour, comment puis-je vous aider aujourd'hui?' — give me the language name, its ISO codes, and how confident you are.","exampleUseCases":[{"title":"Multilingual support ticket routing","prompt":"Before I forward this customer message to the right team, can you detect what language it's in: 'Necesito ayuda con mi pedido, no ha llegado todavía.' Tell me the language name and ISO code."},{"title":"Translation target selection","prompt":"I need to translate this user comment but I don't know its language yet — can you identify it? The text is: 'Diese Funktion ist wirklich nützlich, danke für das Update.'"},{"title":"Language-based content filtering","prompt":"I'm building a content filter that only allows English posts — can you check whether this text is English and how confident you are: 'The quick brown fox jumps over the lazy dog, and it was a good day.'"}],"resultDescription":"Returns a JSON object with the most likely language (name, ISO 639-1 code, ISO 639-3 code), a boolean confidence flag, an array of next-best candidate languages each with their name, ISO 639-3 code, and relative score, and the character count of the input. Short or ambiguous text may return 'und' (undetermined) as the language code.","failureModes":["Very short text (under ~20 characters) returns 'und' (undetermined) with low confidence","Mixed-language text may produce an incorrect or undetermined result","Rare or minority languages not among the 82 supported may be misidentified","Missing required 'text' parameter returns an error","Text over 10,000 characters may be rejected or truncated"],"whenToPreferThis":"Choose this endpoint when you need fast, local language detection with no external API dependency, covering 82 major languages with ISO code output. It is ideal for routing, filtering, or translation-target selection pipelines where sub-cent cost per call matters. Prefer alternatives if you need support for rare or minority languages beyond the 82 franc-min covers, or if extremely short (under 20 character) inputs are common.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T06:48:41.634Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-revmesh2074-workers-dev-language-detection-via-992573b8"}