How to Find AI Influencers on X with TwexAPI
AI conversations on X move through many account types: researchers, startup founders, independent builders, product operators, prompt engineers, newsletter writers, and investors. If you start from manual search, the workflow gets repetitive quickly. You search a phrase, open profile after profile, copy handles into a sheet, and still have no consistent way to compare them.
TwexAPI's Search User endpoint gives you a cleaner first step. Search for a keyword such as AI founder, LLM engineer, or AI product manager, request a target count, and turn the returned user profiles into a shortlist your team can review.
What This Workflow Does
This workflow uses GET /twitter/search-user/{keyword}/{target_count} to discover X accounts whose profile information matches an AI-related keyword.
It is useful when you need to:
- Build an AI influencer list before a launch or partnership campaign.
- Find founders and builders discussing LLM products, agents, copilots, or AI infrastructure.
- Create a seed list for monitoring, newsletter sourcing, or analyst review.
- Compare candidate accounts by profile fit, follower count, verification status, and list membership.
The endpoint returns profile objects. It does not tell you whether a person is trustworthy, safe to contact, or a good brand fit. Use it to create a candidate list, then review the accounts before outreach or spend.
Endpoint
Send a GET request to:
https://api.twexapi.io/twitter/search-user/{keyword}/{target_count}| Path parameter | Type | Purpose |
|---|---|---|
keyword | string | Search phrase to match against X users. Use specific phrases such as AI founder, LLM researcher, or AI agents. |
target_count | integer | Number of users to return. Start small while tuning keywords, then increase when the results look useful. |
Authenticate with your TwexAPI bearer token.
curl --request GET \
--url 'https://api.twexapi.io/twitter/search-user/AI%20founder/50' \
--header 'Authorization: Bearer <token>'A successful response contains code, msg, and data. The data array contains user profile objects.
Common fields include 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, and 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}Pick Better AI Keywords
Broad queries like AI return mixed accounts. Start with phrases that describe the role, topic, or buyer segment you care about.
| Goal | Example keywords |
|---|---|
| Startup and product voices | AI founder, AI startup, AI product manager, AI operator |
| Technical accounts | LLM engineer, AI researcher, machine learning engineer, AI infrastructure |
| Agent ecosystem | AI agents, agentic AI, AI workflow automation, coding agent |
| Marketing and growth | AI marketer, AI newsletter, AI creator, AI tools |
| Investors and analysts | AI investor, AI analyst, venture AI, AI fund |
Run several narrow searches instead of one broad search. This gives you better control over why an account entered the shortlist.
Python Client
Keep the API client small. Return raw users first, then let separate functions normalize, score, and save the profiles.
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 )Normalize Profiles for Review
The first useful output is a stable review row. Keep the raw profile, but expose the fields a marketer, analyst, or partnerships lead can scan quickly.
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 followers_count = user.get("followers_count") or 0
22 listed_count = user.get("listed_count") or 0
23 verified = user.get("is_verified") is True
24 blue_verified = user.get("is_blue_verified") is True
25 profile_match = text_contains_ai_signal(description)
26
27 return {
28 "keyword": keyword,
29 "user_id": user.get("id"),
30 "screen_name": user.get("screen_name"),
31 "name": user.get("name"),
32 "description": description,
33 "location": user.get("location"),
34 "followers_count": followers_count,
35 "listed_count": listed_count,
36 "is_verified": verified,
37 "is_blue_verified": blue_verified,
38 "verified_type": user.get("verified_type"),
39 "can_dm": user.get("can_dm"),
40 "profile_match": profile_match,
41 "profile_url": f"https://x.com/{user.get('screen_name')}",
42 "raw": user,
43 }Score the Shortlist
Follower count is visible, but it is a weak signal by itself. A better triage score combines profile relevance, list membership, verification signals, and audience size.
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"])This score is only a review queue. It should help humans decide what to inspect first, not automatically approve sponsorships or outreach.
Save a Review CSV
Most teams want the first pass in a spreadsheet. Export a compact CSV with the review fields, then keep the raw JSON separately for audits and future enrichment.
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")Where Search User Fits in the Influencer Stack
Search User is the discovery step. After you find candidate accounts, combine it with other workflows:
- Use Search User to create the candidate list.
- Use profile fields to remove obvious mismatches and duplicates.
- Use timeline or search endpoints to inspect recent content.
- Use follower or following data when audience overlap matters.
- Move only reviewed accounts into a CRM, monitoring list, or partnership workflow.
This keeps the process explainable. You can always trace an account back to the keyword that found it and the fields that made it worth reviewing.
Common Pitfalls
- Do not search only
AI. Use role- and topic-specific keywords. - Do not treat
can_dm: trueas guaranteed delivery. It is a profile signal, not a send confirmation. - Do not rank by followers alone. Many useful AI accounts are smaller but highly relevant.
- Keep accounts with unclear bios in manual review instead of auto-removing them.
- Store the fetch time because profile metadata can change.
- Deduplicate by
id, not justscreen_name, because handles can change.
Wrap-up
TwexAPI's Search User endpoint is a practical way to turn AI-related keywords into a reviewable influencer shortlist. Search several narrow phrases, normalize the returned profile objects, score candidates conservatively, and send the top accounts to human review.
That gives your team a repeatable discovery workflow without pretending that profile metadata alone can decide who is influential.