{"uid":"cap_ioGmJe9c7YpKRiKHosgbV","slug":"language-detector-by-pdf-extract-api-4c7f16ff","name":"Language Detector by PDF Extract API","description":"Detect the language(s) of text, including multilingual text.","url":"https://language-detector.pdfextractapi.workers.dev/detect","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["text"],"properties":{"text":{"type":"string","description":"The text to detect the language of, max 10,000 characters."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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_0mb-tpZgZjAf2WRoWlLQR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects the language(s) of a given text, including identification of multilingual content, via a simple POST request.","exampleAgentPrompt":"Can you detect what language this text is written in: 'Bonjour, comment puis-je vous aider aujourd'hui?'","exampleUseCases":[{"title":"Route multilingual support tickets","prompt":"I'm getting support messages from users all over the world — can you detect what language each of these messages is written in so I can route them to the right support team? Here's the first one: 'Necesito ayuda con mi cuenta, no puedo iniciar sesión.'"},{"title":"Classify scraped web content by language","prompt":"I scraped a bunch of articles from international news sites — can you figure out what language each one is written in? Here's one to start: 'Die Bundesregierung hat heute neue Maßnahmen angekündigt.'"},{"title":"Verify expected language before translation","prompt":"Before I send this text to my translation API, can you confirm whether it's actually in Japanese? Here's the text: '本日はお越しいただきありがとうございます。'"}],"resultDescription":"Returns the detected language(s) of the submitted text, typically including the identified language name and/or ISO language code, along with confidence information. For multilingual text, multiple languages may be returned with their respective confidence scores or proportions.","failureModes":["Text exceeds 10,000 character limit — request rejected or truncated","Empty or whitespace-only text — unable to detect language","Very short text (single word or character) — low-confidence or ambiguous result","Highly ambiguous input (numbers, special characters only) — no language detected","API overload or Cloudflare Workers timeout — HTTP 5xx error","Malformed JSON body — HTTP 400 bad request"],"whenToPreferThis":"Choose this endpoint when you need lightweight, fast, per-call language detection at $0.01 USDC per request, especially for multilingual or mixed-language text. It is well-suited for agentic pipelines that need to identify language before routing, translating, or applying language-specific NLP. Prefer it when you want a pay-per-call model via x402 protocol without a subscription, and when input text fits within 10,000 characters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:35:48.288Z","isFirstParty":false}