Tweets

Returns X's own translation of 1 public tweet into the language you pick, with the links, mentions, and tags X places in the translated text.

get/api/v1/x/tweets/{id}/translation

Request

  • Base URL: https://xquik.com
  • URL: https://xquik.com/api/v1/x/tweets/{id}/translation
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer
    • none

Path parameters

idstring required

Tweet ID or URL-encoded tweet URL, such as x.com/nasa/status/20. Takes x.com & twitter.com links with or without https://, www., mobile., a query or a fragment, & /i/status or /i/web/status links. Anything else gets 400 invalid_tweet_id.

Query parameters

languagestring required
Example:tr

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

fieldsstring
Example:id,text,author.username

Fields to keep in each row, comma-separated. Use dots for nested fields, such as author.username. A list keeps the field in each item. Case & underscores do not matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics always stay. An unknown name answers 400 unknown_field with the valid names, before any read. The price stays the same. SDK row types then hold only the named fields. A longer URL fails at the edge before Xquik reads it.

omitstring
Example:entities,media

Fields to drop from each row, comma-separated. It takes the same names as fields. With fields, it drops from the kept fields. A longer URL fails at the edge before Xquik reads it.

Response

Translated tweet text

Example response

{
  "translation": {
    "tweetId": "2102882545427714266",
    "language": "tr",
    "sourceLanguage": "en",
    "text": "Artemis Anlaşmaları’na Hoş Geldiniz, Hırvatistan https://t.co/Xe1nm2pkSX",
    "entities": {
      "urls": [
        {
          "url": "https://t.co/Xe1nm2pkSX",
          "expanded_url": "https://go.nasa.gov/3VcvAQn",
          "display_url": "go.nasa.gov/3VcvAQn",
          "indices": [
            49,
            72
          ]
        }
      ]
    }
  }
}

Changes

    • warning

      added the new topup_in_progress enum value to the ///// response property for the response status

    • warning

      added the new topup_in_progress enum value to the ////// response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the ////// response property for the response status

    • warning

      added the new topup_in_progress enum value to the /////// response property for the response status