# Scrape X (Twitter) posts that match a keyword, in one call

Ask for a keyword and get the latest public X posts that use it, each with likes, replies, reposts, views, date and link. Scraping runs on hosted providers, so there are no burner accounts, session cookies or proxy pools to keep alive when X changes.

HTML page: https://www.routergrowth.com/tools/x-twitter/scraper
Part of: [X (Twitter) tools](https://www.routergrowth.com/tools/x-twitter.md)

## The call

[`social.search`](https://www.routergrowth.com/catalog/social.search): Public posts matching a keyword on X, LinkedIn, Reddit, YouTube, TikTok, Instagram or Facebook: brand mentions, category conversations, competitor chatter.

Price on this network: $0.0007 per post, $0.002 minimum a call. The exact quote is shown before every run.

## What a real run returned

Run on 2026-10-19: 10 records in 4.6 s for $0.007. Personal fields are masked. Ten of the newest public posts for customer onboarding, from fintech news to compliance and customer success accounts, with their view counts.

| text | likes | views | posted |
|---|---|---|---|
| Government Welcomes Revolut’s Resumption Of Customer Onboarding In Gibraltar https://t.co/70eOiYmKAU | 0 | 90 | 2026-10-19 |
| Know-your-customer is moving from onboarding to every transaction. Expect more checks on who, or what, is behind a payment, including AI ag… | 0 | 1 | 2026-10-19 |

## How to do it

1. **Say what to look for.** A keyword, a phrase in quotes or a hashtag. The agent calls social.search with platform x.
2. **Get the newest posts.** The call returns the latest public posts that match, up to your limit.
3. **Read the numbers.** Each post has likes, replies, reposts and views, so you can spot the ones people reacted to.
4. **Follow up.** Look up a brand account with social.profile, or read the replies to a post with social.comments.

## Ask it like this

- Scrape the last 50 X posts about customer onboarding and tell me which software names come up. (`social.search`)
- Find X posts complaining about onboarding at our competitors, then read the replies on the top one. (`social.search`, `social.comments`)

## Connect

MCP server: `https://api.routergrowth.com/mcp`

```bash
claude mcp add --transport http routergrowth https://api.routergrowth.com/mcp
```

```bash
npm install -g routergrowth && routergrowth setup
routergrowth run -c social.search -i '{"platform": "x", "query": "customer onboarding", "limit": 10}'
```

```bash
curl -X POST https://api.routergrowth.com/v1/run \
  -H "Authorization: Bearer $ROUTERGROWTH_API_KEY" \
  -d '{"capability": "social.search", "input": {"platform": "x", "query": "customer onboarding", "limit": 10}}'
```

## Worth knowing

- **No X login.** Nothing runs on your X account, so nothing on your account can be limited or suspended.
- **Latest first.** Results lean to the newest posts. For a fixed past window, add dates to the query.
- **Read only.** The call does not like, repost, follow or reply.

## Questions

### Do I need an X developer account?

No. Only a RouterGrowth key or the MCP connector.

### Can I scrape replies too?

Yes, with social.comments on a post URL.

### Does it scrape protected accounts?

No. Only public posts are returned.

### Can I export to a sheet?

Ask the agent to write the rows to CSV, Google Sheets or a workspace table.

## Related

- [An API that searches X posts by keyword and returns them with their numbers](https://www.routergrowth.com/tools/x-twitter/search-tweets-api.md)
- [Scrape a public X (Twitter) profile: followers, bio, website and category](https://www.routergrowth.com/tools/x-twitter/profile-scraper.md)
- [How X (Twitter) data is priced on RouterGrowth: per post, no plan](https://www.routergrowth.com/tools/x-twitter/api-prices.md)
- [Search X (Twitter) from Python with one HTTP request and one key](https://www.routergrowth.com/tools/x-twitter/api-python.md)
- [Read any public X account's recent posts through one independent API](https://www.routergrowth.com/tools/x-twitter/api.md)
