Quickstart
Get an API key and make your first TwitterAPIs request in under two minutes, with copy-paste curl, JavaScript, and Python.
This guide takes you from zero to your first live response. You need a terminal and an API key. Nothing else.
1. Get an API key
Sign up at twitterapis.com and open your dashboard. Your key is on the API Keys page. New accounts start with $0.50 in free credits, which is enough for hundreds of calls, so you can test before you add a card.
Keep your key secret
Treat the key like a password. Send it only from your backend, never from browser code, and store it in an environment variable rather than in source.
2. Set the base URL and auth
Every request goes to the same base URL and carries your key as a bearer token.
- Base URL:
https://api.twitterapis.com - Auth header:
Authorization: Bearer <API_KEY>
Export your key once so the examples below pick it up:
export TWITTERAPIS_KEY="your_api_key_here"3. Make your first request
This searches recent tweets from a single author. Pick your language.
curl "https://api.twitterapis.com/tweet/advanced_search?query=from%3Anaval" \
-H "Authorization: Bearer $TWITTERAPIS_KEY"const url = new URL("https://api.twitterapis.com/tweet/advanced_search");
url.searchParams.set("query", "from:naval");
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.TWITTERAPIS_KEY}` },
});
if (!res.ok) {
throw new Error(`Request failed: ${res.status}`);
}
const data = await res.json();
console.log(data.tweets);import os
import requests
resp = requests.get(
"https://api.twitterapis.com/tweet/advanced_search",
headers={"Authorization": f"Bearer {os.environ['TWITTERAPIS_KEY']}"},
params={"query": "from:naval"},
)
resp.raise_for_status()
data = resp.json()
print(data["tweets"])4. Read the response
A successful call returns JSON with the matching tweets, a pagination flag, and a cursor for the next page.
{
"tweets": [
{
"id": "1759123456789012345",
"text": "Build the input, the output takes care of itself.",
"created_at": "Tue Feb 20 14:02:11 +0000 2026",
"author": { "id": "745273", "username": "naval", "name": "Naval" },
"like_count": 4821
}
],
"has_next_page": true,
"next_cursor": "DAABCgABF...",
"status": "success"
}That is the whole loop: one URL, one header, JSON back. No OAuth handshake, no developer-account review, no per-endpoint scopes.