GET /twitter/user/last_tweets
Changed onRetrieve tweets by user name.Sort by created_at. Results are paginated, with each page returning up to 20 tweets.If you only need to fetch the latest tweets from a single user very frequently, do not use this API—it will cost you a lot. Instead, please refer to https://twitterapi.io/blog/how-to-monitor-twitter-accounts-for-new-tweets-in-real-time. If you have more than 20 Twitter accounts requiring real-time tweet updates, use https://twitterapi.io/twitter-stream which is the most cost-effective solution. This endpoint is built on X search. If X hides an account from search results (this happens to some accounts, for example ones that mostly retweet promotional content), it returns an empty list even though the profile has tweets. In that case use /twitter/user/tweet_timeline, which reads the profile timeline directly.
Request
- Base URLhttps://api.twitterapi.io
- URLhttps://api.twitterapi.io/twitter/user/last_tweets
- AuthAPI key in header X-API-Key
Query parameters
user id of the user.userId is recommended, could be more stable and faster than userName.userId and userName are mutually exclusive. If both are provided, userId will be used.
screen name of the user.userId and userName are mutually exclusive. If both are provided, userId will be used.
The cursor to paginate through the results. First page is "".
Whether to include replies in the results. Default is False.
Response
Tweets response
Changes
- breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the required property
to the response with the status
- breaking