TwexAPI で X 上の AI インフルエンサーを見つける方法
AI 関連の会話は X 上のさまざまなアカウントに分散しています。研究者、スタートアップ創業者、個人開発者、プロダクト担当者、prompt engineer、ニュースレター運営者、投資家などです。手作業で探すと、キーワードを検索し、プロフィールを開き、handle をスプレッドシートに貼り付け、また次の候補を探す作業が続きます。
TwexAPI の Search User endpoint を使うと、この最初の発見ステップを構造化できます。AI founder、LLM engineer、AI product manager のようなキーワードで検索し、返ってきたプロフィールを bio、フォロワー数、認証状態、list 数などで整理します。
このワークフローでできること
このワークフローは GET /twitter/search-user/{keyword}/{target_count} を使い、AI 関連キーワードに一致する X アカウントを見つけます。
用途は次のようなものです。
- ローンチやパートナー施策の前に AI influencer リストを作る。
- LLM、AI agents、copilot、AI infrastructure を語る founder や builder を見つける。
- 監視リスト、ニュースレターの情報源、アナリストレビュー用の seed list を作る。
- profile fit、followers、verification、listed_count を使って候補を比較する。
このエンドポイントは user profile オブジェクトを返します。人物の信頼性、ブランド適合性、連絡してよいかどうかを自動判定するものではありません。候補リストを作り、その後に人間がレビューするための入口として使います。
Endpoint
GET リクエストを送ります。
https://api.twexapi.io/twitter/search-user/{keyword}/{target_count}| Path parameter | Type | Purpose |
|---|---|---|
keyword | string | X ユーザーに対する検索語句。AI founder、LLM researcher、AI agents のように具体的な語句を使います。 |
target_count | integer | 返すユーザー数。最初は小さめにして、結果が良ければ増やします。 |
TwexAPI の Bearer Token で認証します。
curl --request GET \
--url 'https://api.twexapi.io/twitter/search-user/AI%20founder/50' \
--header 'Authorization: Bearer <token>'成功レスポンスには code、msg、data が含まれます。data は user profile オブジェクトの配列です。
よく使うフィールドは id、name、screen_name、description、location、followers_count、following_count、listed_count、statuses_count、is_blue_verified、is_verified、verified_type、can_dm、profile_image_url、profile_banner_url、created_at、created_at_datetime です。
1{
2 "code": 200,
3 "msg": "success",
4 "data": [
5 {
6 "id": "1717001045992251392",
7 "name": "Example AI Founder",
8 "screen_name": "example_ai",
9 "description": "Building AI agents for support teams",
10 "followers_count": 42000,
11 "listed_count": 310,
12 "is_verified": true,
13 "is_blue_verified": true,
14 "verified_type": "blue",
15 "can_dm": false
16 }
17 ]
18}AI キーワードの選び方
AI だけで検索すると結果が広すぎます。役割、トピック、ターゲット市場に合わせて複数の狭いキーワードを使います。
| 目的 | キーワード例 |
|---|---|
| Startup と product の発信者 | AI founder, AI startup, AI product manager, AI operator |
| 技術系アカウント | LLM engineer, AI researcher, machine learning engineer, AI infrastructure |
| Agent エコシステム | AI agents, agentic AI, AI workflow automation, coding agent |
| マーケティングと成長 | AI marketer, AI newsletter, AI creator, AI tools |
| 投資家とアナリスト | AI investor, AI analyst, venture AI, AI fund |
1 つの広い検索より、複数の狭い検索を回す方が、後で「なぜこのアカウントが候補に入ったか」を説明しやすくなります。
Python Client
API client は小さく保ちます。まず raw users を返し、normalize、score、save は別の関数で行います。
1import os
2from typing import Any
3from urllib.parse import quote
4
5import requests
6
7TOKEN = os.environ["TWEXAPI_BEARER_TOKEN"]
8BASE_URL = "https://api.twexapi.io/twitter/search-user"
9
10def search_users(keyword: str, *, target_count: int = 50) -> list[dict[str, Any]]:
11 encoded_keyword = quote(keyword)
12 url = f"{BASE_URL}/{encoded_keyword}/{target_count}"
13
14 response = requests.get(
15 url,
16 headers={"Authorization": f"Bearer {TOKEN}"},
17 timeout=30,
18 )
19 response.raise_for_status()
20 return response.json().get("data", [])
21
22if __name__ == "__main__":
23 users = search_users("AI founder", target_count=25)
24 for user in users[:10]:
25 print(
26 user.get("screen_name"),
27 user.get("followers_count"),
28 user.get("description"),
29 )レビュー用の候補行を作る
最初から複雑な dashboard を作る必要はありません。まず、マーケター、アナリスト、BD 担当者が確認しやすい review row に整えます。
1from typing import Any
2
3AI_TERMS = [
4 "ai",
5 "artificial intelligence",
6 "llm",
7 "agent",
8 "agents",
9 "machine learning",
10 "ml",
11 "copilot",
12 "automation",
13]
14
15def text_contains_ai_signal(text: str) -> bool:
16 lowered = text.lower()
17 return any(term in lowered for term in AI_TERMS)
18
19def to_candidate_row(user: dict[str, Any], keyword: str) -> dict[str, Any]:
20 description = user.get("description") or ""
21 return {
22 "keyword": keyword,
23 "user_id": user.get("id"),
24 "screen_name": user.get("screen_name"),
25 "name": user.get("name"),
26 "description": description,
27 "location": user.get("location"),
28 "followers_count": user.get("followers_count") or 0,
29 "listed_count": user.get("listed_count") or 0,
30 "is_verified": user.get("is_verified") is True,
31 "is_blue_verified": user.get("is_blue_verified") is True,
32 "verified_type": user.get("verified_type"),
33 "can_dm": user.get("can_dm"),
34 "profile_match": text_contains_ai_signal(description),
35 "profile_url": f"https://x.com/{user.get('screen_name')}",
36 "raw": user,
37 }候補リストをスコアリングする
フォロワー数は見やすい指標ですが、それだけでは弱いです。プロフィールの関連性、list 登録数、認証シグナル、オーディエンス規模を組み合わせて triage score を作ります。
1import math
2
3def candidate_score(row: dict[str, Any]) -> float:
4 score = 0.0
5
6 if row["profile_match"]:
7 score += 40
8 if row["is_verified"]:
9 score += 10
10 if row["is_blue_verified"]:
11 score += 5
12 if row["verified_type"] in {"business", "government"}:
13 score += 10
14
15 followers = row["followers_count"] or 0
16 listed = row["listed_count"] or 0
17 score += min(math.log10(followers + 1) * 10, 45)
18 score += min(math.log10(listed + 1) * 6, 20)
19
20 return round(score, 2)
21
22keywords = [
23 "AI founder",
24 "LLM engineer",
25 "AI agents",
26 "AI product manager",
27]
28
29candidates = []
30seen_user_ids = set()
31
32for keyword in keywords:
33 for user in search_users(keyword, target_count=50):
34 user_id = user.get("id")
35 if not user_id or user_id in seen_user_ids:
36 continue
37 seen_user_ids.add(user_id)
38
39 row = to_candidate_row(user, keyword)
40 row["score"] = candidate_score(row)
41 candidates.append(row)
42
43candidates.sort(key=lambda row: row["score"], reverse=True)
44
45for row in candidates[:25]:
46 print(row["score"], row["screen_name"], row["followers_count"], row["profile_url"])このスコアはレビュー順を決めるためのものです。スポンサー、提携、アウトリーチを自動承認するためのものではありません。
CSV と raw JSONL を保存する
最初のレビューは spreadsheet で十分です。CSV は人間のレビュー用、JSONL は後から enrichment や audit を行うための raw profile 保存用です。
1import csv
2import json
3from datetime import datetime, timezone
4from pathlib import Path
5
6timestamp = datetime.now(timezone.utc).isoformat()
7csv_path = Path("ai-influencer-candidates.csv")
8jsonl_path = Path("ai-influencer-candidates.raw.jsonl")
9
10fieldnames = [
11 "score",
12 "keyword",
13 "screen_name",
14 "name",
15 "description",
16 "location",
17 "followers_count",
18 "listed_count",
19 "is_verified",
20 "is_blue_verified",
21 "verified_type",
22 "can_dm",
23 "profile_url",
24]
25
26with csv_path.open("w", newline="", encoding="utf-8") as f:
27 writer = csv.DictWriter(f, fieldnames=fieldnames)
28 writer.writeheader()
29 for row in candidates:
30 writer.writerow({field: row.get(field) for field in fieldnames})
31
32with jsonl_path.open("w", encoding="utf-8") as f:
33 for row in candidates:
34 f.write(json.dumps({
35 "fetched_at": timestamp,
36 "candidate": row,
37 }, ensure_ascii=False) + "\n")
38
39print(f"Saved {len(candidates)} candidates")Influencer stack の中での位置づけ
Search User は discovery step です。実運用では次のように組み合わせます。
- Search User で候補アカウントを作る。
- profile metadata で明らかなミスマッチと重複を除く。
- timeline や search endpoints で最近の投稿を確認する。
- audience overlap が重要なら followers/following を見る。
- 人間がレビューしたアカウントだけを CRM、監視リスト、提携ワークフローに移す。
この形にすると、各アカウントがどのキーワードで見つかり、どのフィールドでレビュー対象になったかを追跡できます。
よくある落とし穴
AIだけで検索しない。役割やトピックで絞る。can_dm: trueを配信保証とみなさない。- フォロワー数だけでランキングしない。
- bio が曖昧なアカウントは自動削除せず、まず manual review に入れる。
- profile metadata は変わるため、fetch time を保存する。
- handle は変わることがあるため、
screen_nameだけでなくidで重複排除する。
まとめ
TwexAPI の Search User エンドポイントを使うと、AI 関連キーワードからレビュー可能な influencer shortlist を作れます。複数の狭いキーワードで検索し、profile fields を整理し、保守的にスコアリングして、人間のレビューに回します。
これにより、プロフィールを手作業で探し回る作業を、説明可能で再利用しやすい発見プロセスに変えられます。