Tweets

Returns a paginated list of tweets posted by a specific user. Up to 20 tweets per page. type selects the timeline: posts (default) returns the user's posts (with replies when with_replies is true), replies returns the user's replies, retweets returns the user's retweets; with_replies is ignored for replies and retweets. Each tweet includes text, creation date, engagement metrics, view count, and nested data for replies, quotes, and retweets when available. Provide either link (profile URL) or user_id.

post/user-tweets

Request

Request body

next_cursorstring

Pagination cursor from a previous response.

type'posts' | 'replies' | 'retweets'

Timeline type: posts (default), replies or retweets.

user_idstring

Numeric Twitter/X user ID. Provide either link or user_id.

user_linkstring

Full URL of the user's profile. Provide either link or user_id.

usernamestring

Twitter/X handle of the user. Provide either link or username.

with_repliesboolean

Return users tweets and replies. Applies only to type posts.

Example request

{
  "next_cursor": "ASDJKHFJWQE123Q",
  "type": "posts",
  "user_id": "123",
  "user_link": "https://twitter.com/username",
  "username": "username"
}

Response

OK

next_cursorstring

Cursor for fetching the next page of results. Null or absent if no more pages.

Example response

{
  "tweets": [
    {
      "bookmark_count": 15,
      "conversation_id_str": "1782368585664626774",
      "created_at": "2024-01-15T10:30:00Z",
      "entities": [
        {
          "link": "https://t.co/example",
          "preview": "https://pbs.twimg.com/preview",
          "type": "photo"
        }
      ],
      "full_text": "Hello world",
      "id": "1782368585664626774",
      "in_reply_to_tweet_id": "1782368585664626000",
      "in_reply_to_username": "username",
      "lang": "en",
      "likes_count": 200,
      "quote_count": 5,
      "reply_count": 10,
      "retweet_count": 50,
      "user": {
        "created_at": "2009-06-02T20:12:29Z",
        "description": "Bio text",
        "display_name": "Elon Musk",
        "favourites_count": 1200,
        "followers_count": 100000,
        "followings_count": 500,
        "id": "44196397",
        "location": "Austin, TX",
        "media_count": 300,
        "profile_background_image_url": "https://pbs.twimg.com/profile_banners/44196397/123",
        "profile_image_url": "https://pbs.twimg.com/profile_images/123/photo.jpg",
        "tweets_count": 5000,
        "username": "elonmusk",
        "verified": true
      },
      "view_count": 10000
    }
  ]
}

Changes