Skip to main content
GET
Tweet translation API for X posts in any language
1 credit per call · All plans from $0.00012/credit · Direct MPP: USD 0.00015 per call
Translate tweet returns X’s own translation of one public tweet. You pick the language. The endpoint is GET /api/v1/x/tweets/{id}/translation.
Use GET /x/tweets/{id}/translation when a reader needs a tweet in another language. The text is X’s own translation, as x.com shows it under the post. Each call costs 1 credit. A refused request costs nothing.

Translate tweets for a multilingual feed

Read tweets with Search Tweets or Get tweet. Most tweets carry lang, the language code X detects. Call this endpoint only for tweets whose lang differs from your reader’s language. Store tweetId, language, and text together. A stored translation saves a second call for the same tweet and language. entities holds the links, mentions, and tags of the translated text. Their indices point into text, so you can link them without parsing.

Path parameters

string
required
Post ID or URL-encoded post URL, such as x.com/nasa/status/20. See path IDs.

Query parameters

string
required
Language code to translate into, such as en, tr, pt-br, or zh-tw. Any letter case works, and pt_BR reads as pt-br. A language name, such as turkish, returns 400 invalid_language.

Headers

string
Full account key. Sessions and OAuth also work.
string
Bearer xq_your_guest_key_here authenticates paid_reads guest keys. Direct MPP uses the Payment ... credential. Get it from the WWW-Authenticate: Payment challenge.

Response

200 OK

object
X’s translation of the tweet. Translation object fields.
string
ID of the translated tweet.
string
Language code of the translated text, in lower case.
string
Language code X detects in the tweet. Omitted when X names none.
string
Translated tweet text.
object
Links, mentions, and tags with their offsets in the translated text. Empty when the text has none.

400 Invalid language

language is missing or is not a language code. Send a code, not a language name.

400 Invalid tweet ID

The provided tweet ID is empty or not a valid format.

401 Unauthenticated

Missing or invalid API key. Check the x-api-key header value.

402 Payment required

Account keys get account options. Guest keys get guest top-up only. Anonymous calls receive a direct MPP WWW-Authenticate: Payment challenge plus a guest wallet creation action. No checkout starts automatically. Confirm any payment action.

404 Tweet not found

The tweet does not exist. The author may have deleted it, or the ID is invalid.

502 X API unavailable

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

503 Service busy

X returned no translation, or Xquik is busy. Retry after a short delay. The request costs nothing.

429 Rate limit exceeded

You exceeded your tier rate limit. Wait for the Retry-After header before retrying.

424 Dependency failed

The normalized v1 response contract can return 424 when the read service is unavailable.

Tweet translation API questions

How do I translate a tweet with an API?

Call GET /x/tweets/{id}/translation with the tweet ID and a language code. The response holds the translated text in translation.text.

Which languages can I translate a tweet into?

Send any language code X translates into, such as en, es, tr, ja, or pt-br. A code that names no language returns 400 invalid_language and costs nothing.

How do I know the tweet’s original language?

Read translation.sourceLanguage. It holds the language code X detects in the tweet. The field is absent when X names no language.

How much does a tweet translation cost?

Each call costs 1 credit. A refused or failed request costs nothing.

Does this replace X’s official API?

No. This page documents Xquik, an independent third-party service. It does not document X’s official API.
Next steps. Get tweet reads the original text and its lang, or Search Tweets finds tweets to translate.