Felo X Search Skill
When to Use
Trigger this skill when the user wants to:
- - Look up X (Twitter) user profiles by username
- Search for X users by keyword
- Get tweets from a specific X user
- Search tweets by keyword or advanced query
- Get replies to specific tweets
Trigger keywords (examples):
- - English: twitter, tweet, X user, X search, tweets from, replies to, trending on X
- 简体中文: 推特, 推文, X用户, X搜索, 推文回复
- 日本語: ツイッター, ツイート, Xユーザー, X検索
Explicit commands: /felo-x-search, "search X", "search twitter"
Do NOT use for:
- - General web search (use
felo-search) - Webpage extraction (use
felo-web-extract) - Generating slides (use
felo-slides)
Setup
1. Get API key
- 1. Visit felo.ai
- Open Settings -> API Keys
- Create and copy your API key
2. Configure environment variable
Linux/macOS:
CODEBLOCK0
Windows PowerShell:
CODEBLOCK1
How to Execute
Option A: Use the bundled script or packaged CLI
Packaged CLI (after npm install -g felo-ai):
CODEBLOCK2
Script (from repo):
CODEBLOCK3
Usage Pattern
The x command uses parameter combinations to infer intent — no subcommands needed.
With query (search mode):
| Usage | Behavior |
|---|
| INLINECODE6 | Search tweets (default) |
| INLINECODE7 |
Same as above |
|
felo x "OpenAI" --user | Search users |
With --id (lookup mode):
| Usage | Behavior |
|---|
| INLINECODE9 | Get tweet replies (default) |
| INLINECODE10 |
Get user info |
|
felo x --id "elonmusk" --user --tweets | Get user tweets |
Options
| Option | Description |
|---|
| INLINECODE12 | Positional arg, search keyword (equivalent to -q) |
| INLINECODE13 |
Search keyword |
|
--id <values> | Tweet IDs or usernames (comma-separated) |
|
--user | Switch to user mode |
|
--tweets | Get user tweets (with --id --user) |
|
-l, --limit <n> | Number of results |
|
--cursor <str> | Pagination cursor |
|
--include-replies | Include replies (with --tweets) |
|
--query-type <type> | Query type filter (tweet search) |
|
--since-time <val> | Start time filter |
|
--until-time <val> | End time filter |
|
-j, --json | Output raw JSON |
|
-t, --timeout <seconds> | Timeout in seconds (default: 30) |
Option B: Call API with curl
CODEBLOCK4
Output Format
User Info (default, non-JSON)
CODEBLOCK5
Tweet (default, non-JSON)
CODEBLOCK6
Error Handling
Common Error Codes
- -
INVALID_API_KEY — API Key is invalid or revoked - INLINECODE26 — X search request failed (check parameters or downstream error)
Missing API Key
If FELO_API_KEY is not set, display setup instructions and stop.
API Reference (summary)
- - Base URL:
https://openapi.felo.ai. Override with FELO_API_BASE env if needed. - Auth: INLINECODE30
- Endpoints:
-
POST /v2/x/user/info — Batch get user profiles
-
POST /v2/x/user/search — Search users
-
POST /v2/x/user/tweets — Get user tweets
-
POST /v2/x/tweet/search — Search tweets
-
POST /v2/x/tweet/replies — Get tweet replies
Important Notes
- - Always check
FELO_API_KEY before calling; if missing, return setup instructions. - Format output as readable Markdown by default; use
--json for raw API response. - Use pagination cursors (
next_cursor) for fetching more results. - For tweet search, advanced query syntax is supported (same as X advanced search).
References
Felo X 搜索技能
使用场景
当用户需要以下操作时触发此技能:
- - 通过用户名查找X(推特)用户资料
- 通过关键词搜索X用户
- 获取特定X用户的推文
- 通过关键词或高级查询搜索推文
- 获取特定推文的回复
触发关键词(示例):
- - 英文:twitter, tweet, X用户, X搜索, 来自...的推文, 回复..., X趋势
- 简体中文:推特, 推文, X用户, X搜索, 推文回复
- 日本語:ツイッター, ツイート, Xユーザー, X検索
显式命令:/felo-x-search、搜索X、搜索推特
不适用于以下场景:
- - 通用网页搜索(请使用felo-search)
- 网页内容提取(请使用felo-web-extract)
- 生成幻灯片(请使用felo-slides)
配置
1. 获取API密钥
- 1. 访问 felo.ai
- 打开设置 -> API密钥
- 创建并复制您的API密钥
2. 配置环境变量
Linux/macOS:
bash
export FELOAPIKEY=您的API密钥
Windows PowerShell:
powershell
$env:FELOAPIKEY=您的API密钥
执行方式
方式A:使用捆绑脚本或打包的CLI
打包的CLI(执行npm install -g felo-ai后):
bash
felo x [查询内容] [选项]
脚本(从仓库中):
bash
node felo-x-search/scripts/runxsearch.mjs [查询内容] [选项]
使用模式
x命令通过参数组合推断意图——无需子命令。
带查询内容(搜索模式):
| 用法 | 行为 |
|---|
| felo x AI新闻 | 搜索推文(默认) |
| felo x -q AI新闻 |
同上 |
| felo x OpenAI --user | 搜索用户 |
带--id(查找模式):
| 用法 | 行为 |
|---|
| felo x --id 1234567890 | 获取推文回复(默认) |
| felo x --id elonmusk --user |
获取用户信息 |
| felo x --id elonmusk --user --tweets | 获取用户推文 |
选项
| 选项 | 描述 |
|---|
| [查询内容] | 位置参数,搜索关键词(等同于-q) |
| -q, --query <文本> |
搜索关键词 |
| --id <值> | 推文ID或用户名(逗号分隔) |
| --user | 切换到用户模式 |
| --tweets | 获取用户推文(与--id --user配合使用) |
| -l, --limit
| 结果数量 |
| --cursor <字符串> | 分页游标 |
| --include-replies | 包含回复(与--tweets配合使用) |
| --query-type <类型> | 查询类型筛选(推文搜索) |
| --since-time <值> | 起始时间筛选 |
| --until-time <值> | 结束时间筛选 |
| -j, --json | 输出原始JSON |
| -t, --timeout <秒> | 超时时间(秒,默认:30) |
方式B:使用curl调用API
bash
搜索推文
curl -X POST https://openapi.felo.ai/v2/x/tweet/search \
-H Authorization: Bearer $FELOAPIKEY \
-H Content-Type: application/json \
-d {query: AI新闻, limit: 20}
搜索用户
curl -X POST https://openapi.felo.ai/v2/x/user/search \
-H Authorization: Bearer $FELOAPIKEY \
-H Content-Type: application/json \
-d {query: 人工智能}
获取用户信息
curl -X POST https://openapi.felo.ai/v2/x/user/info \
-H Authorization: Bearer $FELOAPIKEY \
-H Content-Type: application/json \
-d {usernames: [elonmusk, OpenAI]}
获取用户推文
curl -X POST https://openapi.felo.ai/v2/x/user/tweets \
-H Authorization: Bearer $FELOAPIKEY \
-H Content-Type: application/json \
-d {username: elonmusk, limit: 20}
获取推文回复
curl -X POST https://openapi.felo.ai/v2/x/tweet/replies \
-H Authorization: Bearer $FELOAPIKEY \
-H Content-Type: application/json \
-d {tweet_ids: [1234567890]}
输出格式
用户信息(默认,非JSON)
markdown
@elonmusk (埃隆·马斯克 🔵)
- - 用户ID:44196397
- 关注者:100.0M
- 关注中:500
- 总推文数:30.0K
- 简介:...
- 位置:火星
- 账号创建时间:2009-06-02T00:00:00Z
推文(默认,非JSON)
markdown
@elonmusk(埃隆·马斯克 ✓)
- - 发布时间:2026-03-09T12:00:00Z | 推文ID:1234567890
推文内容...
互动数据:5.0K 点赞 | 1.0K 转发 | 200 回复
错误处理
常见错误码
- - INVALIDAPIKEY — API密钥无效或已被撤销
- XSEARCHFAILED — X搜索请求失败(检查参数或下游错误)
缺少API密钥
如果未设置FELOAPIKEY,则显示配置说明并停止执行。
API参考(摘要)
- - 基础URL:https://openapi.felo.ai。如需覆盖,可使用FELOAPIBASE环境变量。
- 认证方式:Authorization: Bearer 您的API密钥
- 接口端点:
- POST /v2/x/user/info — 批量获取用户资料
- POST /v2/x/user/search — 搜索用户
- POST /v2/x/user/tweets — 获取用户推文
- POST /v2/x/tweet/search — 搜索推文
- POST /v2/x/tweet/replies — 获取推文回复
重要说明
- - 调用前务必检查FELOAPIKEY;如果缺失,返回配置说明。
- 默认以可读的Markdown格式输出;使用--json获取原始API响应。
- 使用分页游标(next_cursor)获取更多结果。
- 推文搜索支持高级查询语法(与X高级搜索相同)。
参考资料