Documentation Index
Fetch the complete documentation index at: https://generaltranslation.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
このガイドでは、ユーザーを ID またはユーザー名で検索する方法を説明します。
curl "https://api.x.com/2/users/2244994945?\
user.fields=created_at,description,verified,public_metrics" \
-H "Authorization: Bearer $BEARER_TOKEN"
{
"data": {
"id": "2244994945",
"name": "X Developers",
"username": "XDevelopers",
"created_at": "2013-12-14T04:35:55.000Z",
"description": "The voice of the X developer community",
"verified": true,
"public_metrics": {
"followers_count": 583423,
"following_count": 2048,
"tweet_count": 14052,
"listed_count": 1672
}
}
}
一度に最大 100 ユーザーを取得できます:
curl "https://api.x.com/2/users?\
ids=2244994945,783214,6253282&\
user.fields=username,verified" \
-H "Authorization: Bearer $BEARER_TOKEN"
単一ユーザー
curl "https://api.x.com/2/users/by/username/XDevelopers?\
user.fields=created_at,description,verified" \
-H "Authorization: Bearer $BEARER_TOKEN"
curl "https://api.x.com/2/users/by?\
usernames=XDevelopers,X,elonmusk&\
user.fields=created_at,verified" \
-H "Authorization: Bearer $BEARER_TOKEN"
| フィールド | 説明 |
|---|
created_at | アカウント作成日 |
description | ユーザーの自己紹介 |
profile_image_url | プロフィール画像のURL |
verified | 認証状態 |
public_metrics | フォロー/フォロワー数 |
location | ユーザーが指定した位置情報 |
url | ユーザーのウェブサイト |
protected | 非公開アカウントかどうか |
pinned_tweet_id | ピン留めされたポストのID |
{
"errors": [
{
"resource_type": "user",
"title": "Not Found Error",
"detail": "Could not find user with username: [nonexistent_user]."
}
]
}
保護されたユーザーのデータも返されますが、そのユーザーをフォローしていない限り、そのユーザーのポストにはアクセスできません。
APIリファレンス
エンドポイントの詳細ドキュメント