GETtweets

Twitter Advanced Search API

Search tweets using powerful query operators — keywords, hashtags, mentions, date ranges, language, and more. Get Top, Latest, or Media results programmatically.

Average response time: 130ms

Code Examples

const query = encodeURIComponent('web scraping API lang:en since:2025-01-01');
const response = await fetch(
  `https://scrapebadger.com/v1/twitter/tweets/advanced_search?query=${query}&query_type=Latest`,
  { headers: { 'x-api-key': 'YOUR_API_KEY' } }
);
const results = await response.json();
results.data.forEach(t => console.log(t.author.username, t.text));
Response
{
  "data": [
    {
      "id": "888",
      "text": "Just tried this web scraping API and it's incredible...",
      "author": { "username": "dev_user", "followers_count": 4500 },
      "favorite_count": 67,
      "created_at": "2025-01-20T09:15:00Z"
    }
  ],
  "next_cursor": "search_cursor_abc"
}

API Reference

GET/v1/twitter/tweets/advanced_search
ParameterTypeRequiredDescription
querystringRequiredSearch query with optional operators (from:, to:, since:, until:, lang:, etc.)
query_typestringOptionalResult type: "Top", "Latest", or "Media" (default: "Top")
countintegerOptionalNumber of results per page (default: 20)
cursorstringOptionalPagination cursor for next page

Use Cases

Social Listening

Monitor brand mentions, keywords, and conversations across Twitter in real time to understand public sentiment and emerging topics.

Trend Tracking

Detect emerging trends, viral content, and breaking news before they peak using real-time trending topic data.

Lead Generation

Find potential customers by monitoring purchase-intent keywords, industry discussions, and competitor dissatisfaction signals.

Academic Research

Collect large-scale Twitter datasets for computational social science, NLP research, political analysis, and network studies.

Brand Monitoring

Get alerts when your brand is mentioned, track share of voice, and respond quickly to customer feedback or PR crises.

Market Research

Analyze consumer conversations, product feedback, and market trends to inform product development and go-to-market strategies.

Frequently Asked Questions

All Twitter advanced search operators: from:, to:, since:, until:, lang:, min_faves:, min_retweets:, filter:media, -filter:replies, and more.

Yes. Use the lang: operator in your query (e.g., "lang:en" for English, "lang:ja" for Japanese).

Top returns tweets ranked by relevance and engagement. Latest returns tweets in reverse chronological order.

Twitter search covers approximately 7-10 days of tweets. For older content, use specific tweet or user endpoints.

Yes. Combine any number of operators: "from:elonmusk min_faves:1000 since:2025-01-01 lang:en".