X / Twitter 搜索用户 API
按关键词搜索 X (Twitter) 账号,即 X 搜索中的“用户”标签页。匹配用户名、显示名称和主页简介,返回标准化的主页记录,包含粉丝数、关注数和帖子数,并支持游标分页。搜索帖子请用 twitter.search。
US$0.54/千次请求,按请求付费,无需订阅。
ai agents
Marcus Feld | AI Agents
@marcus_builds_ai
Building autonomous AI agents for support and sales. Ex-Stripe. Writing about agent orchestration weekly.
48.2K Followers
{"id": "1893004471820193024","username": "marcus_builds_ai","name": "Marcus Feld | AI Agents","profileUrl": "https://x.com/marcus_builds_ai","bio": "Building autonomous AI agents for support and sales. Ex-Stripe. Writing about agent orchestration weekly.","followers": 48200,"following": 612,"posts": 3840,... 还有 7 个字段}
价格与服务商
X / Twitter 搜索用户 API 价格:一个 API,3 个可互换的服务商
最便宜的服务商优先响应。如果它失败,下一个会在同一次调用中接手。
每次请求封顶 US$0.00211 条结果US$0.000210 条结果US$0.001120 条结果US$0.0021(封顶)按实际返回的内容计费。调低返回数量上限即可少付,而且无论返回多少,单次请求都不会超过封顶价。
试一试
一个请求获取 X / Twitter 搜索用户
这个示例展示了 20 个字段中的 19 个。查看全部字段
{
"found": true,
"data": {
"users": [
{
"id": "1893004471820193024",
"username": "marcus_builds_ai",
"name": "Marcus Feld | AI Agents",
"profileUrl": "https://x.com/marcus_builds_ai",
"bio": "Building autonomous AI agents for support and sales. Ex-Stripe. Writing about agent orchestration weekly.",
"followers": 48200,
"following": 612,
"posts": 3840,
"verified": true,
"location": "Austin, TX",
"avatarUrl": "https://pbs.twimg.com/profile_images/1893004471820193024/marcus_400x400.jpg",
"createdUtc": 1517443200,
"coverUrl": "https://pbs.twimg.com/profile_banners/1893004471820193024/1700000000",
"listedCount": 214,
"canDm": true
},
{
"id": "1560093221004840960",
"username": "agentstacknews",
"name": "Agent Stack",
"profileUrl": "https://x.com/agentstacknews",
"bio": "Daily news on AI agents, tool use, and multi-agent frameworks.",
"followers": 22900,
"following": 88,
"posts": 9120,
"verified": false,
"location": "",
"avatarUrl": "https://pbs.twimg.com/profile_images/1560093221004840960/stack_400x400.jpg",
"createdUtc": 1651363200,
"listedCount": 61,
"canDm": false
},
{
"id": "1401882093771280384",
"username": "priya_agentlabs",
"name": "Priya Raman",
"profileUrl": "https://x.com/priya_agentlabs",
"bio": "Founder @AgentLabsHQ. Previously ML eng at a11y startup. She/her.",
"followers": 15300,
"following": 940,
"posts": 2205,
"verified": true,
"location": "San Francisco, CA",
"avatarUrl": "https://pbs.twimg.com/profile_images/1401882093771280384/priya_400x400.jpg",
"createdUtc": 1622505600,
"coverUrl": "https://pbs.twimg.com/profile_banners/1401882093771280384/1690000000",
"listedCount": 47,
"canDm": true
}
],
"nextCursor": "DAABCgABGZ3xw5A2xVIKAAIY__users_page2"
}
}完整的参数与响应参考:这个接口的每个字段、类型和示例。
参考
一个请求,一种响应结构。
你发送的每个字段和收到的每个字段,都附有真实示例。
最近验证于 2026-11-14 · 可用率和延迟按 30d 统计
请求体
JSON,POST 到这个接口。
- querystring
ai agents
用于匹配 X (Twitter) 用户名、显示名称和主页简介的关键词。这是 X 搜索中的“用户”标签页:传入一个主题('ai agents')、一个名字('Elon Musk')或一个用户名('openai'),返回的是账号而不是帖子。搜索帖子请用 twitter.search。
- cursorstring
来自上一次响应 nextCursor 的不透明分页游标。第一页请省略;传入它以获取下一页账号。
- requireFieldsarray
可选;省略时路由不变,由最便宜的数据源处理。列出本次请求必须能返回的输出字段,例如 `location`,请求就只会由能返回全部这些字段的数据源处理。未列出的字段,只要处理请求的数据源有,仍会照常返回。这可能提高你的价格:最便宜的数据源无法返回某个列出的字段时,会改由更贵的数据源处理,并按它的价格报价和扣费。如果某个主页确实没有某个列出的字段,该字段仍可能缺失。如果列出的字段组合没有任何单一数据源能同时返回,请求会作为无效输入被拒绝,不扣费。在分页遍历中,它只作用于第一页;后续页面沿用该页选定的数据源,按当时的报价计费。
响应
JSON,每个字段一个示例值。
The page of matching accounts, or null when nothing was found.
- nextCursorstring
DAABCgABGZ3xw5A2xVIKAAIY__users_page2
Opaque cursor for the next page of accounts, or null when this lane has no more. Pass it back as cursor to continue.
Matching X (Twitter) accounts, normalized to a compact profile record. Populated whenever the provider has data for the entity.
- avatarUrlstring
https://pbs.twimg.com/profile_images/1893004471820193024/marcus_400x400.jpg
URL of the account's profile image. Populated whenever the provider has data for the entity.
- biostring
Building autonomous AI agents for support and sales. Ex-Stripe. Writing about agent orchestration weekly.
The account's profile bio/description (may be empty).
- canDmboolean可设为必填
true
Whether the account accepts direct messages; null when the serving source does not return it. Name it in requireFields to be served by a source that does.
- coverUrlstring
https://pbs.twimg.com/profile_banners/1893004471820193024/1700000000
Profile banner image URL of the account.
- createdUtcnumber
1517443200
UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.
- followersinteger
48200
How many followers this account has.
- followinginteger
612
How many accounts this account follows.
- idstring
1893004471820193024
The account's numeric X user id. Populated whenever the provider has data for the entity.
- listedCountinteger可设为必填
214
Number of public lists the account appears on; null when the serving source does not return it. Name it in requireFields to be served by a source that does.
- locationstring可设为必填
Austin, TX
The account's self-reported location (may be empty); null when the serving source does not return locations. Name it in requireFields to be served by a source that does.
- namestring
Marcus Feld | AI Agents
The account's display name. Populated whenever the provider has data for the entity.
- postsinteger
3840
How many posts this account has published.
- profileUrlstring
https://x.com/marcus_builds_ai
Canonical URL of the account's X profile. Populated whenever the provider has data for the entity.
- usernamestring
marcus_builds_ai
The account's @ handle, without the @ prefix. Populated whenever the provider has data for the entity.
- verifiedboolean
true
Whether the account carries the blue verification check.
- foundboolean
true
True when the search returned at least one account; false when nothing matched.
- reason"not_found"
Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.
常见问题
关于 X / Twitter 搜索用户 API
AnyAPI 的 X / Twitter 搜索用户 API 只需一次 POST 请求 /v1/run/twitter.search_users,就以统一格式的 JSON 返回 X / Twitter 数据。按关键词搜索 X (Twitter) 账号,即 X 搜索中的“用户”标签页。匹配用户名、显示名称和主页简介,返回标准化的主页记录,包含粉丝数、关注数和帖子数,并支持游标分页。搜索帖子请用 twitter.search。AnyAPI 会在 3 个数据源之间路由每个请求,某个数据源失败时自动切换。费用:每千次请求 US$0.54 起,以美元计价,无需订阅,也没有每月最低消费。过去 30 天,通过 AnyAPI 发起的 X / Twitter 搜索用户 API 调用中有 98.3% 成功,响应时间中位数为 1.2 秒,共测量 106,743 次调用。