diff --git a/api-reference/endpoint/communities/search-tweets-across-communities.mdx b/api-reference/endpoint/communities/search-tweets-across-communities.mdx index bd62415..a22d313 100644 --- a/api-reference/endpoint/communities/search-tweets-across-communities.mdx +++ b/api-reference/endpoint/communities/search-tweets-across-communities.mdx @@ -2,3 +2,64 @@ title: Search Tweets Across Communities openapi: get /v1/twitter/communities/search_tweets --- + +## 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`. + + + +```python Python +from scrapebadger import ScrapeBadger +from scrapebadger.twitter import CommunitySearchTweetType + +async with ScrapeBadger(api_key="YOUR_API_KEY") as client: + page = await client.twitter.communities.search_tweets_across_communities( + "web scraping", tweet_type=CommunitySearchTweetType.LATEST + ) + for tweet in page.data: + print(tweet.community_id, tweet.community_name, tweet.text) + + # Next page + if page.next_cursor: + page2 = await client.twitter.communities.search_tweets_across_communities( + "web scraping", + tweet_type=CommunitySearchTweetType.LATEST, + cursor=page.next_cursor, + ) +``` + +```typescript Node +import { ScrapeBadger } from "scrapebadger"; + +const client = new ScrapeBadger({ apiKey: "YOUR_API_KEY" }); + +const page = await client.twitter.communities.searchTweetsAcrossCommunities("web scraping", { + tweetType: "Latest", +}); +for (const tweet of page.data) { + console.log(tweet.community_id, tweet.community_name, tweet.text); +} + +// Next page +if (page.nextCursor) { + const page2 = await client.twitter.communities.searchTweetsAcrossCommunities("web scraping", { + tweetType: "Latest", + cursor: page.nextCursor, + }); +} +``` + +```bash CLI +# scrapebadger-cli 0.36.0 and later +scrapebadger twitter search-community-tweets "web scraping" --type Latest +``` + + + +`search_tweets_across_communities_all` (Python) and `searchTweetsAcrossCommunitiesAll` (Node) fetch the following pages for you. + +| Where | Name | +|-------|------| +| Hosted MCP server | `twitter_search_tweets_across_communities` | +| Local MCP server (`scrapebadger-mcp` 0.11.0 and later) | `search_twitter_community_tweets` | diff --git a/cli/commands.mdx b/cli/commands.mdx index 49e2532..9ed7394 100644 --- a/cli/commands.mdx +++ b/cli/commands.mdx @@ -42,6 +42,7 @@ scrapebadger twitter trends --place # Location trends scrapebadger twitter community # Community details scrapebadger twitter community-tweets # Community tweets scrapebadger twitter search-communities # Search communities +scrapebadger twitter search-community-tweets --type Latest # Tweets across all communities (Top or Latest) scrapebadger twitter list # List details scrapebadger twitter list-tweets # List tweets scrapebadger twitter space # Space details diff --git a/mcp/overview.mdx b/mcp/overview.mdx index a7805ac..56ebbdd 100644 --- a/mcp/overview.mdx +++ b/mcp/overview.mdx @@ -1,6 +1,6 @@ --- title: "MCP Server" -description: "Connect AI agents to ScrapeBadger via Model Context Protocol. 544 tools across 50 scraping APIs, including nine account and discovery helpers for Twitter/X, Instagram, Google, YouTube, TikTok, Amazon, eBay, Reddit, real estate, and web scraping. Latest MCP spec (2026-07-28), one-click OAuth for Claude." +description: "Connect AI agents to ScrapeBadger via Model Context Protocol. 545 tools across 50 scraping APIs, including nine account and discovery helpers for Twitter/X, Instagram, Google, YouTube, TikTok, Amazon, eBay, Reddit, real estate, and web scraping. Latest MCP spec (2026-07-28), one-click OAuth for Claude." --- # MCP Server @@ -14,7 +14,7 @@ ScrapeBadger provides a hosted MCP (Model Context Protocol) server at `mcp.scrap ## Key Features - + Every ScrapeBadger API endpoint is available as a typed MCP tool with structured parameters, annotations, and output schemas. @@ -46,7 +46,7 @@ ScrapeBadger provides a hosted MCP (Model Context Protocol) server at `mcp.scrap | **ASOS** | 7 | Search ASOS fashion products, retrieve rich product detail, monitor stock and prices, and browse navigation and search facets across storefronts. | | **Best Buy** | 10 | Search Best Buy US products, compare deals and specifications, read reviews and questions, and check ZIP-specific fulfillment. | | **GitHub** | 2 | `github_get_profile` and `github_get_repository`: public profiles and repository detail; 10 credits per successful call. | -| **Twitter/X** | 49 | Profiles, tweets, advanced search, trends, communities, lists, spaces, real-time stream monitors, filter rules | +| **Twitter/X** | 50 | Profiles, tweets, advanced search, trends, communities, lists, spaces, real-time stream monitors, filter rules | | **Instagram** | 39 | Profiles, posts, reels, stories, highlights, comments, followers, hashtags, locations, audio, search | | **Google** | 33 | Web search (SERP), Images, Videos, Lens, Maps, News, Trends, Jobs, Hotels, Shopping, Patents, Scholar, Finance, Flights | | **YouTube** | 27 | Search, video/Shorts detail, comments, transcripts, channels, playlists, trending, hashtags, community posts, music search |