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.
이 가이드는 특정 사용자를 언급한 포스트를 가져오는 방법을 단계별로 안내합니다.
사전 준비 사항시작하기 전에 다음이 필요합니다:
- 승인된 App이 있는 개발자 계정
- App의 Bearer 토큰(공개 데이터용) 또는 사용자 액세스 토큰(비공개 지표용)
멘션 타임라인 요청하기
curl "https://api.x.com/2/users/2244994945/mentions?\
tweet.fields=created_at,public_metrics,author_id&\
expansions=author_id&\
user.fields=username,verified&\
max_results=10" \
-H "Authorization: Bearer $BEARER_TOKEN"
응답 확인하기
{
"data": [
{
"id": "1301573587187331074",
"text": "Hey @XDevelopers, 새로운 API 정말 마음에 들어요!",
"author_id": "1234567890",
"created_at": "2024-01-15T10:30:00.000Z",
"public_metrics": {
"retweet_count": 5,
"reply_count": 2,
"like_count": 42,
"quote_count": 1
}
}
],
"includes": {
"users": [
{
"id": "1234567890",
"username": "developer",
"name": "Dev Person",
"verified": false
}
]
},
"meta": {
"newest_id": "1301573587187331074",
"oldest_id": "1301573587187331074",
"result_count": 1,
"next_token": "t3buvdr5pujq9g7bggsnf3ep2ha28"
}
}
사용자를 멘션한 원본 포스트만 가져오려면:
curl "https://api.x.com/2/users/2244994945/mentions?\
exclude=replies&\
max_results=10" \
-H "Authorization: Bearer $BEARER_TOKEN"
curl "https://api.x.com/2/users/2244994945/mentions?\
start_time=2024-01-01T00%3A00%3A00Z&\
end_time=2024-01-31T23%3A59%3A59Z" \
-H "Authorization: Bearer $BEARER_TOKEN"
| 매개변수 | 설명 | 기본값 |
|---|
max_results | 페이지당 결과 수 (1-100) | 10 |
start_time | 가장 오래된 게시물의 타임스탬프 (ISO 8601) | — |
end_time | 가장 최신 게시물의 타임스탬프 (ISO 8601) | — |
since_id | 이 id 이후의 포스트를 반환 | — |
until_id | 이 id 이전의 포스트를 반환 | — |
exclude | retweets, replies 또는 둘 다를 제외 | — |
pagination_token | 다음 페이지에 대한 토큰 | — |