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.
X의 포스트는 게시 후 30분 이내에 최대 5번까지 수정할 수 있습니다. X API는 편집 이력과 메타데이터 전체에 대한 액세스를 제공합니다.
규칙 세부사항 시간 제한 원본 게시 후 30분 이내 편집 횟수 제한 최대 5회까지 편집 가능 ID 처리 방식 각 편집마다 새로운 게시물 ID가 생성됨 삭제 어떤 버전을 삭제하더라도 전체 편집 기록이 삭제됨
일부 포스트 type은 편집할 수 없습니다:
프로모션 포스트(광고)
투표가 포함된 포스트
다른 사람에게 단 답글(자신의 스레드가 아님)
리포스트(인용 포스트는 편집할 수 있습니다 )
커뮤니티 포스트
협업 포스트
예약된 포스트
모든 게시물 응답에는 기본적으로 edit_history_tweet_ids가 포함됩니다.
{
"data" : {
"id" : "1234567891" ,
"text" : "Updated text (edited)" ,
"edit_history_tweet_ids" : [ "1234567890" , "1234567891" ]
}
}
단일 ID = 편집 이력 없음
여러 ID = 편집 이력(가장 오래된 것부터)
편집 상태를 가져오려면 edit_controls를 요청하세요:
curl "https://api.x.com/2/tweets/1234567891?tweet.fields=edit_controls" \
-H "Authorization: Bearer $TOKEN "
{
"data" : {
"id" : "1234567891" ,
"text" : "Updated text (edited)" ,
"edit_history_tweet_ids" : [ "1234567890" , "1234567891" ],
"edit_controls" : {
"is_edit_eligible" : true ,
"editable_until" : "2024-01-15T12:30:00.000Z" ,
"edits_remaining" : 3
}
}
}
Field Description is_edit_eligible게시물을 수정할 수 있는지 여부 editable_until수정 가능 기간이 끝나는 시각 edits_remaining남은 수정 횟수 (0-5)
모든 버전에 대한 전체 게시물 객체를 가져오려면 edit_history_tweet_ids 확장 필드를 사용하세요:
curl "https://api.x.com/2/tweets/1234567891? \
tweet.fields=edit_controls& \
expansions=edit_history_tweet_ids" \
-H "Authorization: Bearer $TOKEN "
{
"data" : {
"id" : "1234567891" ,
"text" : "Updated text (edited)" ,
"edit_history_tweet_ids" : [ "1234567890" , "1234567891" ],
"edit_controls" : {
"is_edit_eligible" : true ,
"editable_until" : "2024-01-15T12:30:00.000Z" ,
"edits_remaining" : 3
}
},
"includes" : {
"tweets" : [{
"id" : "1234567890" ,
"text" : "Original text (with typo)" ,
"edit_history_tweet_ids" : [ "1234567890" , "1234567891" ],
"edit_controls" : {
"is_edit_eligible" : true ,
"editable_until" : "2024-01-15T12:30:00.000Z" ,
"edits_remaining" : 3
}
}]
}
}
기본적으로 API는 수정된 게시물의 가장 최근 버전 을 반환합니다.
특정 버전을 가져오려면 해당 게시물 ID로 직접 요청하세요:
# 원본 버전 가져오기
curl "https://api.x.com/2/tweets/1234567890" -H "Authorization: Bearer $TOKEN "
# 편집된 버전 가져오기
curl "https://api.x.com/2/tweets/1234567891" -H "Authorization: Bearer $TOKEN "
수정된 포스트의 각 버전마다 고유한 참여 메트릭이 있습니다. 참여가 발생한 시점에 표시되고 있던 버전에 해당 메트릭이 귀속됩니다.
편집 메타데이터는 다음과 같이 제공됩니다:
2022년 9월 29일 이후에 생성된 모든 포스트
포스트를 반환하는 모든 v2 엔드포인트
검색, 타임라인, 스트림, 조회 엔드포인트 포함
이 날짜 이전에 생성된 포스트에는 편집 메타데이터가 없습니다.
변경 사항 추적
수정 배지 표시
원본 콘텐츠 가져오기
포스트의 수정 내역을 모니터링하고 변경 내용을 기록합니다: def check_for_edits ( post ):
history = post.get( "edit_history_tweet_ids" , [])
if len (history) > 1 :
print ( f "Post { post[ 'id' ] } has been edited { len (history) - 1 } times" )
UI에 “edited” 배지를 표시합니다: const isEdited = post . edit_history_tweet_ids ?. length > 1 ;
if ( isEdited ) {
showEditedBadge ();
}
수정된 게시물의 원본 버전을 가져옵니다: original_id = post[ "edit_history_tweet_ids" ][ 0 ]
original = api.get_tweet(original_id)
포스트 조회 수정 이력이 포함된 포스트를 조회합니다.
데이터 사전 포스트 객체에 대한 전체 참조입니다.