Skip to main content
GET
cURL
Retrieve 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.

Authorizations

X-API-Key
string
header
required

Query Parameters

userId
string<string>

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.

userName
string<string>

screen name of the user.userId and userName are mutually exclusive. If both are provided, userId will be used.

cursor
string<string>

The cursor to paginate through the results. First page is "".

includeReplies
boolean
default:false

Whether to include replies in the results. Default is False.

Response

Tweets response

status
enum<string>
required

Status of the request: success or error

Available options:
success,
error
data
object
required
has_next_page
boolean
required

Indicates if there are more results available (top level, not inside data)

next_cursor
string
required

Cursor for fetching the next page of results (top level, not inside data)

code
integer

0 on success

msg
string

Message of the request (error message on failure)