Install
openclaw skills install @tonygjj/twtapiAccess live Twitter/X data through TwtAPI's hosted public skill gateway. Search tweets, look up users, read timelines, inspect followers and following, fetch tweet details, and check trends with structured JSON for OpenClaw and other compatible skill runners.
openclaw skills install @tonygjj/twtapiAccess live Twitter/X data through TwtAPI's hosted skill gateway. Search tweets, look up users, read timelines, browse followers, and check trends with structured JSON built for AI agents. Get your skill key at https://www.twtapi.com/en/.
clawhub install twtapi
Skill tab in your TwtAPI dashboard.skill_key.export TWTAPI_SKILL_KEY="tsk-your-skill-key"
The public hosted gateway https://skill.twtapi.com is built in by default, so most users do not need to set a base URL.
If you are overriding the gateway for a self-hosted or custom deployment, you can optionally set:
export TWTAPI_SKILL_BASE_URL="https://your-skill-host.example.com"
If you use OpenClaw, you can also set skills."twtapi".env.TWTAPI_SKILL_KEY in ~/.openclaw/openclaw.json. Other compatible skill runners only need an equivalent way to inject TWTAPI_SKILL_KEY.
Run this first after setup:
python3 {baseDir}/scripts/twtapi.py tools
If auth and routing are correct, you should get a JSON list of available skill tools.
python3 {baseDir}/scripts/twtapi.py search "AI agents"
python3 {baseDir}/scripts/twtapi.py search "#bitcoin" --type Top --count 10
python3 {baseDir}/scripts/twtapi.py search "from:elonmusk" --cursor "scroll_xxx"
python3 {baseDir}/scripts/twtapi.py user elonmusk
python3 {baseDir}/scripts/twtapi.py user-by-id 44196397
Requires a numeric user ID. Look up the user first if you only have a username.
python3 {baseDir}/scripts/twtapi.py tweets 44196397
python3 {baseDir}/scripts/twtapi.py tweets 44196397 --count 5
python3 {baseDir}/scripts/twtapi.py replies 44196397
python3 {baseDir}/scripts/twtapi.py media 44196397
python3 {baseDir}/scripts/twtapi.py tweet 1897023456789012345
python3 {baseDir}/scripts/twtapi.py followers 44196397 --count 50
python3 {baseDir}/scripts/twtapi.py following 44196397
python3 {baseDir}/scripts/twtapi.py trending
user <username> first, then use the rest_id from the result for tweets, followers, etc.--cursor for the next page. The cursor value is included in the response when more results are available.search command supports Twitter search syntax — from:handle, to:handle, #hashtag, lang:en, date ranges, etc.skill_key, not your main API key.TWTAPI_SKILL_KEY.