返回顶部
t

twtapi

Access 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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.2.0
安全检测
已通过
87
下载量
0
收藏
概述
安装方式
版本历史

twtapi

# TwtAPI - Twitter/X Data Access 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/. ## Setup 1. Install the public skill: ``` clawhub install twtapi ``` 2. Sign up and open the `Skill` tab in your TwtAPI dashboard. 3. Copy your dedicated `skill_key`. 4. Set the required environment variable: ``` 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`. ### Verify the skill connection 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. ## Usage ### Search tweets ``` 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" ``` ### Look up a user profile ``` python3 {baseDir}/scripts/twtapi.py user elonmusk python3 {baseDir}/scripts/twtapi.py user-by-id 44196397 ``` ### Get user tweets / replies / media 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 ``` ### Get a single tweet by ID ``` python3 {baseDir}/scripts/twtapi.py tweet 1897023456789012345 ``` ### List followers / following ``` python3 {baseDir}/scripts/twtapi.py followers 44196397 --count 50 python3 {baseDir}/scripts/twtapi.py following 44196397 ``` ### Get trending topics ``` python3 {baseDir}/scripts/twtapi.py trending ``` ## Workflow tips - **Username → user ID**: run `user <username>` first, then use the `rest_id` from the result for `tweets`, `followers`, etc. - **Pagination**: most list commands accept `--cursor` for the next page. The cursor value is included in the response when more results are available. - **Search operators**: the `search` command supports Twitter search syntax — `from:handle`, `to:handle`, `#hashtag`, `lang:en`, date ranges, etc. ## Notes - This skill uses TwtAPI's hosted public gateway plus your dedicated `skill_key`, not your main API key. - The hosted gateway is built in. Most end users only need `TWTAPI_SKILL_KEY`. - Each API call consumes credits from your TwtAPI account. - Returns raw Twitter JSON from the TwtAPI skill backend. Present results in a readable format with post content, author names, metrics, and timestamps. - Rate limits and credit balance are managed by your plan.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 twtapi-1776012423 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 twtapi-1776012423 技能

通过命令行安装

skillhub install twtapi-1776012423

下载 Zip 包

⬇ 下载 twtapi v1.2.0

文件大小: 4.86 KB | 发布时间: 2026-4-13 12:24

v1.2.0 最新 2026-4-13 12:24
**Big change: Improved setup process and clarified configuration for TwtAPI skill.**

- Default hosted gateway URL is now built in; most users only need to set `TWTAPI_SKILL_KEY`.
- Environment variable requirements simplified (no longer mandates `TWTAPI_SKILL_BASE_URL`).
- Installation and setup steps clarified for OpenClaw and compatible runners.
- Documentation updated for new onboarding flow and best practices.
- Metadata updated to reflect streamlined environment requirements.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部