REST API Guide
@twitterhelp · Twitter HQ
Everything you need to integrate with the Twitter REST API v2. Access tweets, users, media, and more.
Getting Started
Endpoints
GET /2/tweets
Retrieve tweets by ID or query
GET /2/tweets?query=elon+musk
POST /2/users/me/tweets
Post a new tweet
POST with JSON body
GET /2/users/{id}/tweets
User's tweets
Get all tweets from a user
Code Examples
curl -H "Authorization: Bearer YOUR_TOKEN" \ "https://api.twitter.com/2/tweets?query=twitter+help"