Translate
POST
/tw-v2/tweet/translateDescription
Translate tweet text to a target language using Twitter's translation service.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| tweetId | string | required | The ID of the tweet to translate |
| dstLang | string | required | Target language code (e.g., "en", "es", "fr", "de", "ja", "zh-CN") |
Code Examples
const body = {
tweetId: '1234567890',
dstLang: 'es'
};
const response = await fetch('https://api.tweetapi.com/tw-v2/tweet/translate', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
});
const data = await response.json();
console.log(data);
Response
Success Response (200 OK)
200
{
"data": "{\"result\":{\"content_type\":\"POST\",\"text\":\" 😂\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\"😂\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\" Esto\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\" es\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\" famoso\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\" en\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\" todas\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\" partes\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\" \"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\" J\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\"aja\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\" \"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\" J\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\"aj\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\"aj\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\"aj\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\"aj\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\"aj\"}}\n{\"result\":{\"content_type\":\"POST\",\"text\":\"aja\"}}\n"
}API Playground
POST
/tw-v2/tweet/translatePress ⌘ + Enter to execute
curl -X POST "https://api.tweetapi.com/tw-v2/tweet/translate" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Click "Try It!" to see the response