# An API that searches X posts by keyword and returns them with their numbers

Send a keyword, phrase or hashtag and get back the newest public X posts that match, each with likes, replies, reposts, views, date and link. Use it to catch launches, complaints or questions about a topic the day they are posted.

HTML page: https://www.routergrowth.com/tools/x-twitter/search-tweets-api
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 5.1 s for $0.007. Personal fields are masked. Ten posts for product hunt launch from the same morning: makers announcing launches, advice on early traction and launch post mortems.

| text | likes | views | posted |
|---|---|---|---|
| 🚀 BlogToBook is LIVE on Product Hunt! Turn your favorite writers' blog archives into EPUB books for Kindle and Kobo. 📚 First complete expor… | 1 | 49 | 2026-10-19 |
| Product hunt can be a good way to get early tractions. Posting on X could be a good way to promote organically Targeting niche subReddits c… | 0 | 12 | 2026-10-19 |

## How to do it

1. **Write the query.** A phrase such as product hunt launch, a hashtag, or a brand name.
2. **Call social.search.** Platform x, the query and a limit. The response is a list of posts.
3. **Filter.** Drop replies (text starting with @) or keep only posts above a view count.
4. **Act.** Read the replies on a post with social.comments, or save the list to a table for outreach review.

## Ask it like this

- Search X for product hunt launch today and list the products launching, with a link to each post. (`social.search`)
- Find X posts asking for an alternative to our competitor and read the replies on the top three. (`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": "product hunt launch", "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": "product hunt launch", "limit": 10}}'
```

## Worth knowing

- **Newest first.** The search favours recent posts. Run it daily rather than asking for a long history.
- **Replies are mixed in.** Replies to other posts can match the keyword. They start with an @ handle in the text.
- **Not X's search API.** RouterGrowth is independent of X. It searches public posts through its own providers.

## Questions

### Can I search by hashtag?

Yes. Put the hashtag in the query.

### Can I filter by date?

Results lean to the newest. Sort on created_at or run the search on a schedule.

### How many tweets can one call return?

Set the limit you need; the quote scales with it.

### Does it include views?

Yes, when X shows them, along with likes, replies and reposts.

## Related

- [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)
- [Scrape X (Twitter) posts that match a keyword, in one call](https://www.routergrowth.com/tools/x-twitter/scraper.md)
- [Read any public X account's recent posts through one independent API](https://www.routergrowth.com/tools/x-twitter/api.md)
