Skip to main content
GET
Twitter bio translation API for X profiles
1 credit per translation · A profile without a bio is free · All plans from $0.00012/credit · Supports guest paid reads

A bio in the language you pick

Use GET /x/users/{id}/translation to read a profile’s bio in another language. X translates it, as x.com does when it shows a translated bio. Name the profile by user ID, username, or profile URL. sourceLanguage is the language X detects in the bio, when it names one. entities holds the links, mentions, and tags of the translated text with their offsets. A profile without a bio returns translation: null & a message, free of charge.

Path parameters

string
required
User ID, username with or without @, or URL-encoded profile URL, such as x.com/nasa. See path IDs.

Query parameters

string
required
Language code to translate into, such as es, tr, pt-br, or zh-tw. Upper and lower case both work.

Headers

string
Full account key. Sessions and OAuth also work.
string
Bearer xq_your_guest_key_here for paid_reads.

Response

200 OK

object | null
X’s translation of the bio, or null when the profile has no bio.
string
ID of the account whose bio X translated.
string
Username of that account.
string
Language code of the translated text, in lower case.
string
Language code X detects in the bio. Omitted when X names none.
string
Translated bio.
object
Links, mentions, and tags of the translated text, with their offsets. Empty when the text has none.
string
Says why translation is null.

400 Invalid input

Send language as a language code, such as es. An empty or invalid profile name returns invalid_user_id.

404 User not found

401 Unauthenticated

Anonymous requests get WWW-Authenticate: Bearer and a guest wallet checkout action. This is not a Payment challenge.

402 Payment required

Account keys get account options. Guest keys get guest top-up only. No checkout starts automatically. Confirm any payment action.

502 X API unavailable

The read service returned an error. Retry after a short delay.