Skip to main content
GET
Search tweets across communities

SDKs, CLI and MCP

Python and Node SDK 0.85.0 and later have a typed method. Each tweet is a regular tweet with two more fields, community_id and community_name.
search_tweets_across_communities_all (Python) and searchTweetsAcrossCommunitiesAll (Node) fetch the following pages for you.

Authorizations

x-api-key
string
header
required

Your ScrapeBadger API key. You can find this in your dashboard at https://scrapebadger.com/dashboard/api-keys?utm_source=docs&utm_medium=referral.

Query Parameters

query
string
required

Search query. Search operators such as lang:en or from:username are supported.

Example:

"web scraping"

tweet_type
enum<string>
default:Top

The tab to read: Top (ranked by X) or Latest (newest first).

Available options:
Top,
Latest
count
integer
default:20

Number of tweets to ask X for (1-100). X decides the actual page size.

Required range: 1 <= x <= 100
cursor
string

Pagination cursor: the next_cursor of the previous response of the same query, unchanged.

Response

Successfully retrieved tweets.

Paginated list of tweets found across communities.

data
object[] | null

Array of tweet objects, each naming its community.

next_cursor
string | null

Cursor for fetching the next page. Null if no more results.