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

# Translate a user's bio, X (Twitter) API docs

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

> For the complete documentation index, see [llms.txt](https://docs.xquik.com/llms.txt).

`GET https://xquik.com/api/v1/x/users/{id}/translation`

**1 credit per translation** · A profile without a bio is free

[All plans](https://xquik.com) from \$0.00012/credit · Supports [guest paid reads](https://docs.xquik.com/guides/guest-wallets.md)

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
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={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
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={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
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"]}')
```

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

| Path parameter | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | User ID, username with or without `@`, or URL-encoded profile URL, such as `x.com/nasa`. See [path IDs](https://docs.xquik.com/api-reference/overview.md#path-ids). |

## Query parameters

| Query parameter | Type | Required | Description |
| - | - | - | - |
| `language` | `string` | Yes | Language code to translate into, such as `es`, `tr`, `pt-br`, or `zh-tw`. Upper and lower case both work. |

### Choose fields

| Query parameter | Type | Required | Description |
| - | - | - | - |
| `fields` | `string` | No | Fields to keep in each row, comma-separated, such as `id,text,author.username`. Use dots for nested fields. Case & underscores do not matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics always stay. An unknown name returns `400 unknown_field` with the valid names, before any read. The price stays the same. |
| `omit` | `string` | No | Fields to drop from each row, comma-separated, such as `entities,media`. It takes the same names as `fields`. With `fields`, it drops from the kept fields. |

## Headers

| Header | Type | Required | Description |
| - | - | - | - |
| `x-api-key` | `string` | No | Full account key. Sessions and OAuth also work. |
| `Authorization` | `string` | No | `Bearer xq_your_guest_key_here` for `paid_reads`. |

## Response

### 200 OK

| Field | Type | Description |
| - | - | - |
| `translation` | `object \| null` | X's translation of the bio, or `null` when the profile has no bio. |
| `translation.userId` | `string` | ID of the account whose bio X translated. |
| `translation.userName` | `string` | Username of that account. |
| `translation.language` | `string` | Language code of the translated text, in lower case. |
| `translation.sourceLanguage` | `string` | Language code X detects in the bio. Omitted when X names none. |
| `translation.text` | `string` | Translated bio. |
| `translation.entities` | `object` | Links, mentions, and tags of the translated text, with their offsets. Empty when the text has none. |
| `message` | `string` | Says why `translation` is `null`. |

### 400 Invalid input

`{ "error": "invalid_language" }`




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

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

> [!NOTE]
>
> **Related.** [Get user](https://docs.xquik.com/api-reference/x/twitter-profile-lookup.md) · [Translate tweet](https://docs.xquik.com/api-reference/x/tweet-translation.md) · [Batch users](https://docs.xquik.com/api-reference/x/batch-users.md)

> [accordion] Related follower, list & community APIs
>
> * Profiles
>   * [Search users](https://docs.xquik.com/api-reference/x/search-users.md)
>   * [Search autocomplete](https://docs.xquik.com/api-reference/x/search-autocomplete.md)
>   * [Get user](https://docs.xquik.com/api-reference/x/twitter-profile-lookup.md)
>   * [Batch users](https://docs.xquik.com/api-reference/x/batch-users.md)
> * Followers
>   * [Followers](https://docs.xquik.com/api-reference/x/followers.md)
>   * [Following](https://docs.xquik.com/api-reference/x/following.md)
>   * [Follower IDs](https://docs.xquik.com/api-reference/x/follower-ids.md)
>   * [Following IDs](https://docs.xquik.com/api-reference/x/following-ids.md)
>   * [Creator subscriptions](https://docs.xquik.com/api-reference/x/user-subscriptions.md)
>   * [Affiliates](https://docs.xquik.com/api-reference/x/user-affiliates.md)
>   * [Similar accounts](https://docs.xquik.com/api-reference/x/user-similar.md)
>   * [Translate bio](https://docs.xquik.com/api-reference/x/user-bio-translation.md)
>   * [User insights](https://docs.xquik.com/api-reference/x/user-engagement-insights.md)
>   * [Verified followers](https://docs.xquik.com/api-reference/x/verified-followers.md)
>   * [Followers you know](https://docs.xquik.com/api-reference/x/followers-you-know.md)
>   * [Check follower](https://docs.xquik.com/api-reference/x/check-follower.md)
> * Lists
>   * [Search lists](https://docs.xquik.com/api-reference/x/search-lists.md)
>   * [User lists](https://docs.xquik.com/api-reference/x/user-lists.md)
>   * [List memberships](https://docs.xquik.com/api-reference/x/user-list-memberships.md)
>   * [List details](https://docs.xquik.com/api-reference/x/list-details.md)
>   * [List members](https://docs.xquik.com/api-reference/x/list-members.md)
>   * [List followers](https://docs.xquik.com/api-reference/x/list-followers.md)
> * Communities
>   * [Find](https://docs.xquik.com/api-reference/x/community-find.md)
>   * [Popular](https://docs.xquik.com/api-reference/x/community-popular.md)
>   * [Topics](https://docs.xquik.com/api-reference/x/community-topics.md)
>   * [Suggested](https://docs.xquik.com/api-reference/x/community-suggested.md)
>   * [Details](https://docs.xquik.com/api-reference/x/community-info.md)
>   * [Members](https://docs.xquik.com/api-reference/x/community-members.md)
>   * [Member search](https://docs.xquik.com/api-reference/x/community-member-search.md)
>   * [Moderators](https://docs.xquik.com/api-reference/x/community-moderators.md)
>   * [Timeline](https://docs.xquik.com/api-reference/x/community-tweets.md)
>   * [Media](https://docs.xquik.com/api-reference/x/community-media.md)
>   * [Keyword search](https://docs.xquik.com/api-reference/x/community-search.md)
>   * [Tweets search](https://docs.xquik.com/api-reference/x/community-tweets-search.md)

## Response examples

### 200 example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
{
  "translation": {
    "userId": "11348282",
    "userName": "NASA",
    "language": "es",
    "sourceLanguage": "en",
    "text": "Haciendo lo aparentemente imposible, posible. ✨"
  }
}
```

* **400** `{ "error": "invalid_input", "message": "Invalid input. Check the request body." }`
* **401** `{ "error": "unauthenticated", "message": "Authentication required." }`
* **402** `{ "error": "insufficient_credits", "message": "Insufficient credits. Top up or subscribe to continue." }`
* **403** `{ "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." }`
* **404** `{ "error": "user_not_found", "message": "X user not found. Check the username." }`
* **424** `{ "error": "x_api_unavailable", "message": "X data source temporarily unavailable. Try again later." }`
* **429** `{ "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }`
* **502** `{ "error": "x_api_unavailable", "message": "X data source temporarily unavailable. Try again later." }`
* **503** `{ "error": "x_api_unavailable", "message": "Xquik is busy right now. Retry shortly." }`


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