Tools / X (Twitter) / API
In Python, POST to the RouterGrowth run endpoint with social.search, platform x and your keyword, and read the posts from the JSON. There is no tweepy install, no X developer app or bearer token from X, and the same request works for Reddit and LinkedIn by changing one field.
Ask your agent
Write a Python script that searches X for python automation every hour and appends new posts to a CSV.
Connect RouterGrowth once, then ask in plain words. New workspaces start with $1 of credit. Get a key or read the setup guide.
A real run
One call to social.search (social post search), run through RouterGrowth on October 19, 2026. These are the first rows it returned; fields that name a person are masked.
| text | likes | views | posted |
|---|---|---|---|
| Stop building AI that just answers questions. Build AI that does the work with these automation projects. https://t.co/XINeHtUgDg | 8 | 428 | 2026-10-19 |
| Mastering Python Network Automation by GitforGits | Asian Publishing House is on sale on Leanpub! Its suggested price is $29.99; get it for… | 0 | 52 | 2026-10-19 |
Ten of the newest posts for python automation: course offers, job posts and learning threads, all from the same morning.
Step by step
Put the RouterGrowth key in an environment variable and send it as a Bearer header.
Body: capability social.search, input with platform x, query and limit. requests, httpx or aiohttp all work.
Each item has text, engagement, created_at, url and author_url.
Run the script from cron or a notebook and append new posts by URL to your dataset.
Price
List prices on X, read from the catalog when this page was built. The exact figure is quoted before every run, and a monthly plan lowers it.
In practice
You describe the job; the agent picks the calls, shows the price and runs them.
Write a Python script that searches X for python automation every hour and appends new posts to a CSV.
In Python, search X for a keyword, then pull the last ten posts from the three accounts that posted most.
Connect
One MCP server for Claude, ChatGPT, Claude Code, Codex and Cursor, or the same call over the CLI and REST with the input above.
claude mcp add --transport http routergrowth https://api.routergrowth.com/mcp
npm install -g routergrowth && routergrowth setup
routergrowth run -c social.search -i '{"platform": "x", "query": "python automation", "limit": 10}'curl -X POST https://api.routergrowth.com/v1/run \
-H "Authorization: Bearer $ROUTERGROWTH_API_KEY" \
-d '{"capability": "social.search", "input": {"platform": "x", "query": "python automation", "limit": 10}}'Worth knowing
tweepy wraps X's own API and its credentials. This is a plain JSON API, independent of X.
Keyword search returns posts in any language. Add language words or filter on text if you need English only.
Nothing in the call posts or likes on X.
FAQ
None is needed. The REST API takes JSON, and the routergrowth CLI covers shell use.
Yes. Any async HTTP client can send the same request.
The search returns the newest public posts it finds at call time.
Yes. Set platform to reddit in the same request.
More on X (Twitter)
Reading this as an agent? This page as markdown: /tools/x-twitter/api-python.md
Connect your agent once. The first calls run on the $1 that comes with signup.