Skip to content

Detect language

POSThttps://api.curriculo.me/public/detect-language/
On this page

Stateless. Returns an ISO 639-1 code and a confidence for each text. Use it to route a résumé or message (assign the right recruiter, pick the right template) before anyone reads it.

Price: $0.001 per request.

Detection runs offline first. A text the offline detector cannot call confidently falls back to a model, which can return any two-letter code, including languages that /translate/ does not accept.

Request

application/json. Send text (one string) or texts (a list). List in, list out.

FieldTypeNotes
textstringA single text, up to 50,000 characters.
textsstring[]Up to 200 texts, each up to 50,000 characters. The response keeps your order.
default_languagestringReturned when a text cannot be called. Defaults to en.

Examples

One text:

curl -X POST https://api.curriculo.me/public/detect-language/ \
  -H 'Authorization: Bearer key_abc123_yoursecret' \
  -H 'Content-Type: application/json' \
  -d '{"text": "Ingeniera de software con diez años de experiencia"}'

Several texts:

curl -X POST https://api.curriculo.me/public/detect-language/ \
  -H 'Authorization: Bearer key_abc123_yoursecret' \
  -H 'Content-Type: application/json' \
  -d '{"texts": ["Ingénieur logiciel", "소프트웨어 엔지니어"], "default_language": "en"}'

Response

One text returns that text's result:

{ "language": "es", "confidence": 0.98 }
FieldMeaning
languageISO 639-1 code of the detected language, or your default_language when a text cannot be called.
confidenceConfidence from 0 to 1. It may be null when unavailable.

Several texts return results in input order. See Batching.

Timing

Under a second.

Errors

StatusTypical cause
400Blank text, or a duplicate JSON key.
413More than 200 texts, or a text over 50,000 characters.
503Processing capacity is busy. Retry after the Retry-After interval (30 seconds).

New to the Curriculo API? Start with the Quickstart.

Was this page helpful?

Updated