If you're trying to access Twitter data programmatically — pulling tweets, tracking mentions, monitoring accounts — you'll eventually hit the same question: how do I actually get API access?
The short answer: you apply through X's developer portal. The longer answer: depending on what you're trying to do, the official API may be overkill, overpriced, or both. This post walks through both paths.
How to Get the Official Twitter/X API
Step 1 — Create an X Developer Account
Go to developer.twitter.com and sign in with your X account. If you don't have one, you'll need to create one first.
Click "Sign up" to apply for a developer account. You'll be asked to describe what you intend to build — be specific and honest here. Vague answers slow down approval.
Step 2 — Create a Project and App
Once approved, you'll land in the developer portal. From there:
- Click "Projects & Apps" → "New Project"
- Give your project a name and select a use case
- Create an App within the project — this is what generates your API credentials
Step 3 — Generate Your Keys and Tokens
Inside your App settings, navigate to the "Keys and Tokens" tab. You'll find:
- API Key and API Key Secret — your app's identity
- Bearer Token — used for read-only requests (no user login required)
- Access Token and Access Token Secret — needed for actions on behalf of a user
For most read-only use cases (pulling tweets, searching, fetching user data), the Bearer Token is all you need.
Step 4 — Choose Your Access Tier
This is where it gets painful. X currently offers three tiers:
| Tier | Price | Tweet cap (per month) |
|---|---|---|
| Free | $0 | 1,500 tweets (write only) |
| Basic | $100/month | 10,000 tweets read |
| Pro | $5,000/month | 1,000,000 tweets read |
| Enterprise | Custom | Custom |
Note that the Free tier is essentially write-only now — you can post tweets but can barely read any. For any meaningful data access, you're looking at $100/month minimum.
Step 5 — Make Your First API Call
With your Bearer Token in hand, a basic request looks like this:
curl -X GET "https://api.twitter.com/2/tweets/search/recent?query=from:NASA" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"
The response will be a deeply nested JSON object. You'll need to parse data, includes, meta, and handle pagination via next_token parameters. It works, but it takes time to get right.
Is the Official API Worth It for Your Use Case?
Honest answer: it depends.
The official API makes sense if:
- You're building a production app that posts tweets or interacts with users on their behalf (OAuth user flows)
- You need the absolute highest rate limits and enterprise SLAs
- Your company has budget and a dedicated engineering team
It probably doesn't make sense if:
- You're an indie developer, researcher, or small team
- You need to pull tweet data but don't have $100–$5,000/month to spend
- You want clean, usable data without building a preprocessing layer around raw API responses
The Alternative: Pay-Per-Use, No Setup Required
If you fall into the second category, our Cheap & Simple Twitter/X API is worth looking at. It's an Apify actor that wraps Twitter's endpoints and returns clean, flattened tweet and user objects — no developer app setup, no OAuth tokens, no monthly commitment.
You call it with a simple JSON input:
{
"endpoint": "tweet/advanced_search",
"parameters": {
"query": "from:NASA",
"queryType": "Latest"
}
}
And get back clean, ready-to-use tweet objects:
{
"type": "tweet",
"text": "New images from the James Webb telescope are live.",
"likeCount": 48200,
"retweetCount": 9100,
"viewCount": 2100000,
"createdAt": "2026-04-18T14:22:00Z",
"author": {
"userName": "NASA",
"followers": 8200000
}
}
Pricing comparison for 10,000 tweets:
| Option | Monthly Cost |
|---|---|
| X Basic API | $100 |
| This actor (Bronze Apify tier) | ~$5.75 |
No approval process. No OAuth setup. No rate limit debugging. Just an endpoint name, some parameters, and clean data back.
Supported endpoints include advanced search, user tweets, mentions, replies, quotes, retweeters, followers, followings, and Twitter list feeds — enough to cover the vast majority of read use cases.
Which Path Should You Take?
- Go with the official API if you need to act on behalf of users (posting, liking, following) or need guaranteed enterprise-level access.
- Use the actor if you need to read Twitter data affordably and want to skip the setup entirely.
Both are legitimate tools. The right one depends on what you're actually trying to build.