X (Twitter) Trends API について
X (Twitter) Trends APIは、Xのトピックデータを必要とするアプリやエージェント向けのホスト型トレンドサービスです。週次履歴、成長率、リアルタイムランキングをリモートMCPサーバー経由で提供します。
主な機能
- 01トピックの週次履歴取得
- 02トピック成長率の計算
- 03リアルタイムランキング取得
- 04REST APIの提供
活用シーン
- 01Xの議論量の推移を追跡
- 02期間別のトピック成長率を比較
- 03現在のトレンドトピックを確認
MCP 対応
`https://api.trendsapi.ai/mcp` のリモートMCPサーバーは、履歴、成長率、リアルタイムランキングを取得する `get_trends`、`get_growth`、`get_top_trends` ツールを提供します。
設定
リモートサーバーはインストール不要です。クライアントを選んで設定をコピーするか、ワンクリックで導入できます。
https://x-twitter.api.trendsapi.ai/mcpclaude mcp add --transport http ai-trendsapi-x-twitter https://x-twitter.api.trendsapi.ai/mcp{"mcpServers":{"ai-trendsapi-x-twitter":{"type":"http","url":"https://x-twitter.api.trendsapi.ai/mcp"}}}Cursor で開く{"servers":{"ai-trendsapi-x-twitter":{"type":"http","url":"https://x-twitter.api.trendsapi.ai/mcp"}}}VS Code で開く{"mcpServers":{"ai-trendsapi-x-twitter":{"type":"http","url":"https://x-twitter.api.trendsapi.ai/mcp"}}}{"mcpServers":{"ai-trendsapi-x-twitter":{"serverUrl":"https://x-twitter.api.trendsapi.ai/mcp"}}}コマンドはターミナルで実行し、JSON は各クライアントの MCP 設定に貼り付けて再起動します。認可が必要なサーバーは初回接続時にログインを求めます。
https://x-twitter.api.trendsapi.ai/mcp認証が必要ツール
詳細
リモート MCP サーバー
https://api.trendsapi.ai/mcp でホストされている MCP です。REST と同じ 3 つの操作とカタログを提供します。トークン:trendsapi.ai/#get-key。
REST の仕様:trendsapi-ai/trendsapi。
ツール
| MCP ツール | REST の mode | 必須項目 | 戻り値 |
|---|---|---|---|
get_trends | get_time_series | source、keyword | 週ごとの履歴 |
get_growth | get_growth | source、keyword | 増減率 |
get_top_trends | get_top_trends | type | ライブランキングフィード |
ソース、フィード、キーワードの形式については、ハブのキーワードソースとライブフィードをご覧ください。
app downloads / app rankings には引き続き Android のバンドル ID(com.openai.chatgpt)が必要です。
Cursor
~/.cursor/mcp.json:
{
"mcpServers": {
"trend-feeds": {
"url": "https://api.trendsapi.ai/mcp",
"transport": "http",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}
VS Code
.vscode/mcp.json:
{
"servers": {
"trend-feeds": {
"type": "http",
"url": "https://api.trendsapi.ai/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}
Claude Desktop
{
"mcpServers": {
"trend-feeds": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.trendsapi.ai/mcp", "--header", "Authorization:${AUTH_HEADER}"],
"env": { "AUTH_HEADER": "Bearer YOUR_TOKEN" }
}
}
}
Claude.ai:設定 → コネクター → カスタムコネクターを追加 → https://api.trendsapi.ai/mcp。
このリポジトリにローカルの本番サーバーはありません。
ライセンス
MIT。LICENSEをご覧ください。
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。