> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Twitter bio translation API for X profiles

> Translate a Twitter or X profile's bio into the language you pick with X's own translation. Get the text, its source language, and links. 1 credit per call.

<Panel>
  <Tabs defaultTabIndex={0} sync={false}>
    <Tab title="200" id="response-x-user-bio-translation-200">
      ```json theme={null}
      {
        "translation": {
          "userId": "11348282",
          "userName": "NASA",
          "language": "es",
          "sourceLanguage": "en",
          "text": "Haciendo lo aparentemente imposible, posible. ✨"
        }
      }
      ```
    </Tab>

    <Tab title="400" id="response-x-user-bio-translation-400">
      ```json theme={null}
      {
        "error": "invalid_input",
        "message": "Invalid input. Check the request body."
      }
      ```
    </Tab>

    <Tab title="401" id="response-x-user-bio-translation-401">
      ```json theme={null}
      {
        "error": "unauthenticated",
        "message": "Authentication required."
      }
      ```
    </Tab>

    <Tab title="402" id="response-x-user-bio-translation-402">
      ```json theme={null}
      {
        "error": "insufficient_credits",
        "message": "Insufficient credits. Top up or subscribe to continue."
      }
      ```
    </Tab>

    <Tab title="404" id="response-x-user-bio-translation-404">
      ```json theme={null}
      {
        "error": "user_not_found",
        "message": "X user not found. Check the username."
      }
      ```
    </Tab>

    <Tab title="424" id="response-x-user-bio-translation-424">
      ```json theme={null}
      {
        "error": "x_api_unavailable",
        "message": "X data source temporarily unavailable. Try again later."
      }
      ```
    </Tab>

    <Tab title="429" id="response-x-user-bio-translation-429">
      ```json theme={null}
      {
        "error": "rate_limit_exceeded",
        "message": "Too many requests. Try again later.",
        "retryAfter": 60
      }
      ```
    </Tab>

    <Tab title="502" id="response-x-user-bio-translation-502">
      ```json theme={null}
      {
        "error": "x_api_unavailable",
        "message": "X data source temporarily unavailable. Try again later."
      }
      ```
    </Tab>

    <Tab title="503" id="response-x-user-bio-translation-503">
      ```json theme={null}
      {
        "error": "x_api_unavailable",
        "message": "Xquik is busy right now. Retry shortly."
      }
      ```
    </Tab>
  </Tabs>
</Panel>

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

<Callout icon="coins" color="#5c3327">
  **1 credit per translation** · A profile without a bio is free · [All plans](https://xquik.com/#pricing) from \$0.00012/credit · Supports [guest paid reads](/guides/guest-wallets)
</Callout>

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://xquik.com/api/v1/x/users/nasa/translation?language=es" \
    -H "x-api-key: xq_your_api_key_here" | jq
  ```

  ```javascript Node.js theme={null}
  const params = new URLSearchParams({ language: "es" });
  const response = await fetch(`https://xquik.com/api/v1/x/users/nasa/translation?${params}`, {
    headers: { "x-api-key": "xq_your_api_key_here" },
  });
  const body = await response.json();
  if (!response.ok) throw new Error(JSON.stringify(body));

  if (body.translation === null) {
    console.log(body.message);
  } else {
    console.log(
      `${body.translation.sourceLanguage} -> ${body.translation.language}: ${body.translation.text}`,
    );
  }
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://xquik.com/api/v1/x/users/nasa/translation",
      params={"language": "es"},
      headers={"x-api-key": "xq_your_api_key_here"},
  )
  body = response.json()
  if not response.ok:
      raise RuntimeError(body)

  translation = body["translation"]
  if translation is None:
      print(body["message"])
  else:
      print(f'{translation.get("sourceLanguage")} -> {translation["language"]}: {translation["text"]}')
  ```
</CodeGroup>

## 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

<ParamField path="id" type="string" required>
  User ID, username with or without `@`, or URL-encoded profile URL, such as `x.com/nasa`. See
  [path IDs](/api-reference/overview#path-ids).
</ParamField>

## Query parameters

<ParamField query="language" type="string" required>
  Language code to translate into, such as `es`, `tr`, `pt-br`, or `zh-tw`. Upper and lower case both work.
</ParamField>

## Headers

<ParamField header="x-api-key" type="string">
  Full account key. Sessions and OAuth also work.
</ParamField>

<ParamField header="Authorization" type="string">
  `Bearer xq_your_guest_key_here` for `paid_reads`.
</ParamField>

## Response

### 200 OK

<ResponseField name="translation" type="object | null">
  X's translation of the bio, or `null` when the profile has no bio.

  <ResponseField name="userId" type="string">
    ID of the account whose bio X translated.
  </ResponseField>

  <ResponseField name="userName" type="string">
    Username of that account.
  </ResponseField>

  <ResponseField name="language" type="string">
    Language code of the translated text, in lower case.
  </ResponseField>

  <ResponseField name="sourceLanguage" type="string">
    Language code X detects in the bio. Omitted when X names none.
  </ResponseField>

  <ResponseField name="text" type="string">
    Translated bio.
  </ResponseField>

  <ResponseField name="entities" type="object">
    Links, mentions, and tags of the translated text, with their offsets. Empty when the text has
    none.
  </ResponseField>
</ResponseField>

<ResponseField name="message" type="string">
  Says why `translation` is `null`.
</ResponseField>

### 400 Invalid input

```json theme={null}
{ "error": "invalid_language" }
```

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

### 404 User not found

```json theme={null}
{ "error": "user_not_found", "message": "X user not found. Check the username." }
```

### 401 Unauthenticated

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

```json theme={null}
{ "error": "unauthenticated" }
```

### 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

```json theme={null}
{ "error": "x_api_unavailable" }
```

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

<Note>
  **Related.** [Get user](/api-reference/x/twitter-profile-lookup) · [Translate tweet](/api-reference/x/tweet-translation) · [Batch users](/api-reference/x/batch-users)
</Note>

<div className="related-api-links">
  <Accordion title="Related follower, list & community APIs" icon="link">
    * Profiles: [Search users](/api-reference/x/search-users) · [Search autocomplete](/api-reference/x/search-autocomplete) · [Get user](/api-reference/x/twitter-profile-lookup) · [Batch users](/api-reference/x/batch-users)
    * Followers: [Followers](/api-reference/x/followers) · [Following](/api-reference/x/following) · [Follower IDs](/api-reference/x/follower-ids) · [Following IDs](/api-reference/x/following-ids) · [Creator subscriptions](/api-reference/x/user-subscriptions) · [Affiliates](/api-reference/x/user-affiliates) · [Similar accounts](/api-reference/x/user-similar) · [Translate bio](/api-reference/x/user-bio-translation) · [Verified followers](/api-reference/x/verified-followers) · [Followers you know](/api-reference/x/followers-you-know) · [Check follower](/api-reference/x/check-follower)
    * Lists: [Search lists](/api-reference/x/search-lists) · [User lists](/api-reference/x/user-lists) · [List memberships](/api-reference/x/user-list-memberships) · [List details](/api-reference/x/list-details) · [List members](/api-reference/x/list-members) · [List followers](/api-reference/x/list-followers)
    * Communities: [Find](/api-reference/x/community-find) · [Popular](/api-reference/x/community-popular) · [Topics](/api-reference/x/community-topics) · [Suggested](/api-reference/x/community-suggested) · [Details](/api-reference/x/community-info) · [Members](/api-reference/x/community-members) · [Member search](/api-reference/x/community-member-search) · [Moderators](/api-reference/x/community-moderators) · [Timeline](/api-reference/x/community-tweets) · [Media](/api-reference/x/community-media) · [Keyword search](/api-reference/x/community-search) · [Tweets search](/api-reference/x/community-tweets-search)
  </Accordion>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.