Advanced tweet search
curl --request GET \
--url https://scrapebadger.com/v1/twitter/tweets/advanced_search \
--header 'x-api-key: <api-key>'import requests
url = "https://scrapebadger.com/v1/twitter/tweets/advanced_search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://scrapebadger.com/v1/twitter/tweets/advanced_search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/twitter/tweets/advanced_search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/twitter/tweets/advanced_search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/twitter/tweets/advanced_search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/twitter/tweets/advanced_search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "1234567890123456789",
"text": "Hello, world! This is a tweet.",
"created_at": "Wed Oct 10 20:19:24 +0000 2018",
"full_text": "<string>",
"lang": "en",
"user_id": "44196397",
"username": "elonmusk",
"user_name": "Elon Musk",
"favorite_count": 0,
"retweet_count": 0,
"reply_count": 0,
"quote_count": 0,
"view_count": 123,
"bookmark_count": 123,
"favorited": false,
"retweeted": false,
"bookmarked": false,
"possibly_sensitive": false,
"is_quote_status": false,
"is_retweet": false,
"conversation_id": "<string>",
"in_reply_to_status_id": "<string>",
"in_reply_to_user_id": "<string>",
"media": [
{
"media_key": "<string>",
"url": "<string>",
"preview_image_url": "<string>",
"width": 123,
"height": 123,
"duration_ms": 123,
"view_count": 123,
"alt_text": "<string>"
}
],
"urls": [
{
"url": "<string>",
"expanded_url": "<string>",
"display_url": "<string>",
"unwound_url": "<string>"
}
],
"hashtags": [
{
"text": "AI",
"indices": [
123
]
}
],
"user_mentions": [
{
"id": "<string>",
"username": "<string>",
"name": "<string>",
"indices": [
123
]
}
],
"poll": {
"id": "<string>",
"end_datetime": "<string>",
"duration_minutes": 123,
"options": [
{
"position": 123,
"label": "<string>",
"votes": 123
}
]
},
"place": {
"id": "<string>",
"full_name": "San Francisco, CA",
"name": "San Francisco",
"country": "United States",
"country_code": "US"
},
"quoted_status_id": "<string>",
"retweeted_status_id": "<string>",
"edit_tweet_ids": [
"<string>"
],
"editable_until_msecs": 123,
"edits_remaining": 123,
"is_edit_eligible": true,
"has_card": true,
"thumbnail_url": "<string>",
"thumbnail_title": "<string>",
"has_community_notes": true,
"source": "Twitter Web App"
}
],
"next_cursor": "<string>"
}{
"error": "Invalid or missing API key"
}{
"error": "Insufficient credits"
}{
"error": "Rate limit exceeded. Please retry after a short delay."
}Tweets
Advanced Tweet Search
Search for tweets using advanced query syntax. Supports filtering by Top, Latest, or Media results. Use Twitter’s advanced search operators in the query (e.g., from:username, since:2024-01-01, min_faves:100). Essential for monitoring, research, and content discovery.
GET
/
v1
/
twitter
/
tweets
/
advanced_search
Advanced tweet search
curl --request GET \
--url https://scrapebadger.com/v1/twitter/tweets/advanced_search \
--header 'x-api-key: <api-key>'import requests
url = "https://scrapebadger.com/v1/twitter/tweets/advanced_search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://scrapebadger.com/v1/twitter/tweets/advanced_search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/twitter/tweets/advanced_search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/twitter/tweets/advanced_search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/twitter/tweets/advanced_search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/twitter/tweets/advanced_search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "1234567890123456789",
"text": "Hello, world! This is a tweet.",
"created_at": "Wed Oct 10 20:19:24 +0000 2018",
"full_text": "<string>",
"lang": "en",
"user_id": "44196397",
"username": "elonmusk",
"user_name": "Elon Musk",
"favorite_count": 0,
"retweet_count": 0,
"reply_count": 0,
"quote_count": 0,
"view_count": 123,
"bookmark_count": 123,
"favorited": false,
"retweeted": false,
"bookmarked": false,
"possibly_sensitive": false,
"is_quote_status": false,
"is_retweet": false,
"conversation_id": "<string>",
"in_reply_to_status_id": "<string>",
"in_reply_to_user_id": "<string>",
"media": [
{
"media_key": "<string>",
"url": "<string>",
"preview_image_url": "<string>",
"width": 123,
"height": 123,
"duration_ms": 123,
"view_count": 123,
"alt_text": "<string>"
}
],
"urls": [
{
"url": "<string>",
"expanded_url": "<string>",
"display_url": "<string>",
"unwound_url": "<string>"
}
],
"hashtags": [
{
"text": "AI",
"indices": [
123
]
}
],
"user_mentions": [
{
"id": "<string>",
"username": "<string>",
"name": "<string>",
"indices": [
123
]
}
],
"poll": {
"id": "<string>",
"end_datetime": "<string>",
"duration_minutes": 123,
"options": [
{
"position": 123,
"label": "<string>",
"votes": 123
}
]
},
"place": {
"id": "<string>",
"full_name": "San Francisco, CA",
"name": "San Francisco",
"country": "United States",
"country_code": "US"
},
"quoted_status_id": "<string>",
"retweeted_status_id": "<string>",
"edit_tweet_ids": [
"<string>"
],
"editable_until_msecs": 123,
"edits_remaining": 123,
"is_edit_eligible": true,
"has_card": true,
"thumbnail_url": "<string>",
"thumbnail_title": "<string>",
"has_community_notes": true,
"source": "Twitter Web App"
}
],
"next_cursor": "<string>"
}{
"error": "Invalid or missing API key"
}{
"error": "Insufficient credits"
}{
"error": "Rate limit exceeded. Please retry after a short delay."
}Authorizations
Your ScrapeBadger API key. You can find this in your dashboard at https://scrapebadger.com/dashboard/api-keys.
Query Parameters
Search query string. Supports Twitter advanced search operators like from:, to:, since:, until:, min_faves:, min_retweets:, lang:, etc.
Example:
"from:elonmusk lang:en"
Type of search results to return.
Available options:
Top, Latest, Media Number of tweets to return per page.
Required range:
1 <= x <= 100Pagination cursor for fetching the next page of results.
⌘I

