{"uid":"cap__3L0gGbMkcFUJwJ-cGDrR","slug":"api-x402node-dev-9b2fed34","name":"x402node Language Detection","description":"Detect text language with rule-based unicode-script + Latin stopword matching. Returns ISO 639-1 code, detection method, confidence. Use ?text=Bonjour+le+monde. Built for AI agents routing inputs by language, content moderation, and analytics. Accepts payment on Base or Solana — either network works.","url":"https://api.x402node.dev/nlp/detect","method":"GET","headers":{},"bodySchema":{"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","required":["text"],"properties":{"text":{"type":"string","description":"Input text (required)"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"text":"Hello world"},"response":{"_hint":"x402 paid endpoints for AI agents — x402node.dev (utilities) · cn402.com (Chinese culture)","method":"stopword-matching","language":"en","confidence":"low","stopword_hits":{"de":0,"en":0,"es":0,"fr":0,"it":0,"nl":0,"pt":0,"ru":0,"sv":0},"words_analyzed":2}},"exampleRequest":{"text":"Hello world"},"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_QZWjeB-wXN09ECARiLs8I","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects the language of input text using rule-based unicode-script analysis and Latin stopword matching, returning ISO 639-1 code, detection method, and confidence score.","exampleAgentPrompt":"What language is this text written in: 'Bonjour le monde, comment ça va?' — give me the ISO 639-1 code and your confidence level.","exampleUseCases":null,"resultDescription":"Returns a JSON object with the detected ISO 639-1 language code (e.g. 'fr'), the detection method used (unicode-script or Latin stopword matching), and a confidence score indicating how certain the detection is.","failureModes":["Empty or whitespace-only text input returns no detectable language","Very short text (single word) may yield low confidence score","Mixed-language text may produce ambiguous or incorrect language code","Unsupported or rare scripts may fall back to low-confidence guess","Network timeout or payment validation failure returns error response"],"whenToPreferThis":"Choose this endpoint when you need lightweight, fast language detection without relying on a third-party ML API, especially for AI agent pipelines that need to route text by language, enforce language policies, or preprocess multilingual input. It is well-suited for high-volume analytics use cases given its low per-call cost and rule-based determinism.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:55:13.598Z","isFirstParty":false}