메인 콘텐츠로 건너뛰기

소개

X API의 v2 버전 출시와 함께 새로운 데이터 응답 형식과 서로 다른 객체 및 필드를 요청하는 새로운 방식을 도입했고, 이를 통틀어 X API v2 형식이라고 부르고 있습니다.  이 일반적인 차이점 섹션에서는 Standard 및 Enterprise 사용자와 관련된 일부 변경 사항을 확인할 수 있습니다. 또한 Standard v1.1 Native format, Enterprise용 Native Enriched format, 그리고 Enterprise용 Activity Streams format에 대한 별도의 가이드를 제공하여 필드 매핑을 도와주고, 새로운 v2 필드를 요청하기 위해 어떤 필드와 expansions를 사용해야 하는지 설명합니다.  또한 시각적 데이터 형식 마이그레이션 도구를 사용하면 X API v1.1 데이터 형식X API v2 형식 간의 차이점을 빠르게 확인할 수 있습니다.

전반적인 차이점

객체와 필드 요청

pre-v2 엔드포인트와 v2 사이의 가장 큰 변화 중 하나는, 새로운 버전은 기본적으로 소수의 필드만 반환하는 반면 스탠다드, 프리미엄, 엔터프라이즈 엔드포인트는 대부분의 필드를 기본적으로 제공한다는 점입니다. 새로운 버전은 fieldsexpansions라는 파라미터를 사용해 기본값을 넘어서는 추가 데이터를 명시적으로 요청하도록 하며, 이를 통해 필요한 데이터만 요청하고 중요하지 않은 필드는 수집하지 않을 수 있습니다.  기본 데이터 객체와 관련된 필드를 요청하면, 해당 필드들은 기본값과 함께 그 기본 데이터 객체 안에 반환됩니다. 하지만 expansions 파라미터를 사용해 확장 객체를 요청하는 경우, 보조 객체들은 새로운 includes 객체에 반환됩니다. includes 객체 안의 확장 객체는, 두 객체 모두에 포함되어 반환되는 id 필드를 사용해서 기본 객체와 매칭할 수 있습니다. 예를 들어, v2 Post lookup 엔드포인트를 사용하면서 요청에 expansions=author_id 파라미터를 포함하면, 기본 게시물 객체 안에서 author_id 필드를 받게 되며, 추가로 includes 객체 안에서 게시물당 하나의 user 객체를 받게 됩니다. 각 user 객체에는 기본 id 필드가 포함되어 있으며, 이를 사용해 user 객체를 다시 게시물 객체와 매칭할 수 있습니다. 아래는 그 예시입니다:
{
  "data": [
    {
      "author_id": "2244994945",
      "id": "1397568983931392004",
      "text": "The Twitter Developer Platform. Ooh la la! https://t.co/iGTdPXBfOv https://t.co/Ze8z8EODdg"
    }
  ],
  "includes": {
    "users": [
      {
        "id": "2244994945",
        "name": "Twitter Dev",
        "username": "TwitterDev"
      }
    ]
  }
}

업데이트된 JSON 설계

특정 필드를 요청하는 방식의 변경 사항 외에도 X API v2에서는 API가 반환하는 객체(예: 게시물user 객체)에 대해 새로운 JSON 설계를 도입합니다.
  • JSON 루트 수준에서 기존 표준 엔드포인트는 Post 객체를 statuses 배열에 담아 반환하는 반면, X API v2는 data 배열에 담아 반환합니다. 
  • 리트윗(Retweeted) 및 인용(Quoted) “statuses”를 사용하던 대신, X API v2 JSON은 리트윗된 Tweet과 인용된 Tweet을 참조합니다. contributors, user.translator_type와 같은 많은 레거시 및 사용 중단된 필드는 제거되고 있습니다. 
  • Post 객체의 favorites와 user 객체의 favourites를 모두 사용하던 것과 달리, X API v2는 like라는 용어만 사용합니다. 
  • X는 값이 없는 JSON 값(예: null)은 페이로드에 포함하지 않는 규칙을 채택하고 있습니다. Post 및 user 속성은 null이 아닌 값을 가질 때에만 포함됩니다.   

새로운 v2 필드

또한 다음을 포함하는 게시물 객체의 새로운 필드 집합을 도입했습니다.
  • conversation_id 필드
  • context 및 entities를 포함하는 두 개의 새로운 annotations 필드
  • 여러 개의 새로운 metrics 필드
  • 해당 게시물에 누가 답글을 달 수 있는지 보여주는 새로운 reply_setting 필드

표준 v1.1 데이터 형식에서 v2로 마이그레이션하기

아직 읽지 않았다면, 먼저 데이터 형식 마이그레이션 소개 문서를 읽어 보시기를 권장합니다. 또한 시각적 데이터 형식 마이그레이션 도구를 사용해 X API v1.1 데이터 형식X API v2 형식의 차이를 빠르게 확인해 볼 수도 있습니다. 네이티브 형식이라고도 불리는 표준 v1.1 데이터 형식은 standard v1.1 엔드포인트에서 기본적으로 제공되는 주된 형식입니다. 프리미엄 제품을 사용 중이라면 네이티브 enriched 데이터 형식에서 v2로 마이그레이션하기 가이드를 참조하세요. 엔터프라이즈 클라이언트는 Gnip 콘솔에서 설정된 방식에 따라 네이티브 enriched 형식 또는 activity streams를 사용 중일 수 있습니다. 

표준 v1.1 vs v2 페이로드 구조

다음 표는 v1.1 형식과 비교했을 때 v2에서 수신하게 될 상위 레벨 객체와 구조를 보여줍니다.
v1.1 구조v2 구조
기본값{
모든 Tweet 객체 필드,
“entities”: {
“hashtags”: [],
“symbols”: [],
“user_mentions”: [],
“urls”: [],
“media”: []
},
“extended_entities”: ,
“user”: ,
“place”: ,
“retweeted_status/quoted_status”
}
{
“data”: [{
“id”,
“text”,

“edit_history_tweet_ids”
}]
}
정의된 field 및 expansions 매개변수 포함 시{
“data”: [{
Tweet 객체 필드,
“entities”: {
“hashtags”: [],
“cashtags”: [],
“mentions”: [],
“urls”: [],
},
“attachments”: {

“media_keys”: [],

“poll_ids”: []

}
}],
“includes”: [
“tweets”: [Tweet 객체],
“users”: [user 객체],
“media”: [media 객체],
“places”: [place 객체],

“polls”: [poll 객체]
],

“matching_rules”: []
}
필드 매핑 다음 섹션에서는 각 v1.1 필드가 어떤 v2 필드에 매핑되는지, 그리고 새 필드를 수신하기 위해 어떤 v2 매개변수가 필요한지를 설명합니다.  

Tweet 객체

Twitter 1.1 형식Twitter v2 형식필수 v2 매개변수
created_atdata.created_attweet.fields=created_at
id해당 없음 — id는 문자열입니다
id_strdata.id기본값
textdata.text기본값
full_text해당 없음 — text에 전체 텍스트가 포함됩니다
truncated해당 없음 — text에 전체 텍스트가 포함됩니다
display_text_range해당 없음 — text에 전체 텍스트가 포함됩니다
edit_historydata.edit_history_tweet_ids기본값
edit_controlsdata.edit_controlstweet.fields=edit_controls
editabledata.edit_controls.is_edit_eligibletweet.fields=edit_controls
entitiesdata.entitiestweet.fields=entities
entities.user_mentionsdata.entities.mentionstweet.fields=entities
entities.symbolsdata.entities.cashtagstweet.fields=entities
entities.hashtagsdata.entities.hashtagstweet.fields=entities
entities.urlsdata.entities.urlstweet.fields=entities
entities.mediaincludes.mediaexpansions=attachments.media_keys
extended_entitiesdata.attachmentstweet_fields=attachments
in_reply_to_status_id해당 없음 — referenced_tweets.id는 문자열입니다
in_reply_to_status_id_strdata.referenced_tweets.id (if type=replied_to)expansions=referenced_tweets.id
in_reply_to_user_id해당 없음 — in_reply_to_user_id는 문자열입니다
in_reply_to_user_id_strdata.in_reply_to_user_idtweet.fields=in_reply_to_user_id
in_reply_to_screen_nameincludes.users..usernametweet.fields=in_reply_to_user_id&expansions=entities.mentions.username
userincludes.usersexpansions=author_id
geodata.geo.place_idtweet.fields=geo
coordinatesdata.geo.place_idexpansions=geo.place_id
placedata.geo.place_idexpansions=geo.place_id
retweeted_statusdata.referenced_tweets.id (if type=retweeted)expansions=referenced_tweets.id
is_quoted_status지원되지 않음
quoted_status_id해당 없음 — referenced_tweets.id는 문자열입니다
quoted_status_id_strdata.referenced_tweets.id (if type=quoted)expansions=referenced_tweets.id
quoted_status_permalink지원되지 않음
quoted_statusdata.referenced_tweets (if type=quoted)expansions=referenced_tweets.id
retweet_countdata.public_metrics.retweet_counttweet.fields=public_metrics
favorite_countdata.public_metrics.like_counttweet.fields=public_metrics
favorited지원되지 않음
retweeted지원되지 않음
possibly_sensitivedata.possibly_sensitivetweet.fields=possibly_sensitive
langdata.langtweet.fields=lang
scopes지원되지 않음
withhelddata.withheldtweet.fields=withheld
예시
v1.1의 Tweet 객체

예제 URI (매개변수 포함):

https://api.x.com/1.1/statuses/lookup.json?id=1359554366051504129&tweet_mode=extended
Tweet 객체 및 v2 요청

매개변수 포함 예시 URI:

https://api.x.com/2/tweets?ids=1359554366051504129&tweet.fields=attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,possibly_sensitive,public_metrics,referenced_tweets,reply_settings,text,withheld
{
“created_at”: “Wed Feb 10 17:26:34 +0000 2021”,
“id”: 1359554366051504129,
“id_str”: “1359554366051504129”,
“text”: “마음껏 강아지 계정을 하나 더 팔로우하세요. 우리는 평가하지 않을게요. \n\n새로운 …에 대한 manage follows 엔드포인트를 소개합니다 https://t.co/3cBZKZUevF”,
“truncated”: true,
“entities”: {
“hashtags”: [],
“symbols”: [],
“user_mentions”: [],
“urls”: [{
“url”: “https://t.co/3cBZKZUevF”,
“expanded_url”: “https://twitter.com/i/web/status/1359554366051504129”,
“display_url”: “twitter.com/i/web/status/1…”,
“indices”: [
111,
134
]
}]
},

“in_reply_to_status_id”: null,
“in_reply_to_status_id_str”: null,
“in_reply_to_user_id”: null,
“in_reply_to_user_id_str”: null,
“in_reply_to_screen_name”: null,
“user”: {

},
“geo”: null,
“coordinates”: null,
“place”: null,
“contributors”: null,
“is_quote_status”: false,
“retweet_count”: 18,
“favorite_count”: 98,
“favorited”: false,
“retweeted”: false,
“possibly_sensitive”: false,
“possibly_sensitive_appealable”: false,
“lang”: “en”
}
{
“data”: [{
“id”:“1359554366051504129”,
“텍스트”:“다른 강아지 계정을 팔로우해도 괜찮습니다. 우리는 판단하지 않습니다. \n\n새로운 #TwitterAPI에 팔로우 관리 엔드포인트를 소개합니다. 이제 v2 API를 사용하여 계정을 팔로우하고 언팔로우할 수 있습니다. 자세히 알아보기 https://t.co/mtpd9VIMDa”,
“lang”:“en”,
“conversation_id”:“1359554366051504129”,
“possibly_sensitive”: false,
“답글_설정”:“everyone”,
“생성일_at”:“2021-02-10T17:26:34.000Z”,
“author_id”:“2244994945”,
“public_메트릭”:{
“retweet_count”: 18,
“답글_count”: 11,
“like_count”: 98,
“인용 트윗_count”: 7
},
“entities”:{
“hashtags”: [{
“시작”: 110,
“end”: 121,
“태그”:“TwitterAPI”
}],
“urls”: [{
“시작”: 194,
“end”: 217,
“url”:“https://t.co/mtpd9VIMDa”,
“확장된_url”:“https://devcommunity.x.com/t/introducing-the-new-manage-follows-endpoints-to-the-twitter-api-v2/149465”,
“display_url”:“devcommunity.com/t/introducing-…”,
“images”: [{
“url”:“https://pbs.twimg.com/news_img/1359554367905427457/DczC72__?format=jpg&name=orig”,
“width”: 1200,
“height”: 630
},
{
“url”:“https://pbs.twimg.com/news_img/1359554367905427457/DczC72__?format=jpg&name=150x150”,
“width”: 150,
“height”: 150
}
],
“status”: 200,
“title”:“X API v2의 새로운 팔로우 관리 엔드포인트 소개”,
“설명”:“팔로우할까, 말까? 이제 X API v2를 사용하여 원하는 대로 이 질문에 답할 수 있습니다. 오늘 새로운 팔로우 관리 엔드포인트가 새로운 Twitter API에 출시되었음을 발표하게 되어 기쁩니다. 한 달 조금 전에 팔로우 조회 엔드포인트를 출시하면서 예고했듯이, 팔로우 관계를 관리하는 기능이 드디어 제공됩니다. 이는 v1.1 API에서 가장 인기 있는 엔드포인트 중 일부이므로, X API v2에서 다양한 사용 사례를 지원하게 되어 기쁩니다. W…”,
“unwound_url”:“https://devcommunity.x.com/t/introducing-the-new-manage-follows-endpoints-to-the-twitter-api-v2/149465
}]
},
“context_어노테이션”: [{
“domain”:{
“id”:“46”,
“name”:“브랜드 카테고리”,
“설명”:“브랜드 버티컬 내에서 브랜드 범위를 세분화하는 카테고리”
},
“entity”:{
“id”:“781974596752842752”,
“name”:“서비스”
}
},
{
“domain”:{
“id”:“47”,
“name”:“브랜드”,
“설명”:“브랜드 및 회사”
},
“entity”:{
“id”:“10045225402”,
“name”:“Twitter”
}
}
]
}]
}

User 객체

Twitter 1.1 형식Twitter v2 형식필수 v2 매개변수
user_iddata.author_idtweet.fields=author_id
user.idN/A - includes.users.id 사용
user.id_strincludes.users.idexpansions=author_id
user.nameincludes.users.nameexpansions=author_id
user.screen_nameincludes.user.usernameexpansions=author_id
user.locationincludes.users.locationexpansions=author_id&user.fields=location
user.descriptionincludes.users.descriptionexpansions=author_id&user.fields=description
user.urlincludes.users.urlexpansions=author_id&user.fields=entities
user.entitiesincludes.users.entities
user.entities.url.urls.urlincludes.users.entities.url.urls.url
user.entities.url.urls.expanded_urlincludes.users.entities.url.urls.expanded_urlexpansions=author_id&user.fields=entities
user.entities.url.urls.display_urlincludes.users.entities.url.urls.display_urlexpansions=author_id&user.fields=entities
user.entities.url.urls.display_url.indicies[0]includes.users.entities.url.urls.startexpansions=author_id&user.fields=entities
user.entities.url.urls.display_url.indicies[1]includes.users.entities.url.urls.endexpansions=author_id&user.fields=entities
user.protectedincludes.users.protectedexpansions=author_id&user.fields=protected
user.followers_countincludes.users.public_metrics.followers_countexpansions=author_id&user.fields=public_metrics
user.friends_countincludes.users.public_metrics.following_countexpansions=author_id&user.fields=public_metrics
user.listed_countincludes.users.public_metrics.listed_countexpansions=author_id&user.fields=public_metrics
user.created_atincludes.users.created_atexpansions=author_id&user.fields=created_at
user.favourites_count
user.verifiedincludes.users.verifiedexpansions=author_id&user.fields=verified
user.statuses_countincludes.users.public_metrics.tweet_countexpansions=author_id&user.fields=public_metrics
user.profile_image_url_httpsincludes.users.profile_image_urlexpansions=author_id&user.fields=profile_image_url
예시
v1.1의 사용자 객체v2에서의 User 객체 및 요청 방법
”user”:{
“id”: 2244994945,
“id_str”:“2244994945”,
“name”:“Twitter Dev”,
“화면_name”:“TwitterDev”,
“location”:“127.0.0.1”,
“description”:“#TwitterDev 팀의 목소리이자 #TwitterAPI 관련 업데이트, 뉴스 및 이벤트에 대한 공식 소스입니다.”,
“url”:“https://t.co/3ZX3TNiZCY”,
“entities”:{
“url”:{
“urls”: [{
“url”:“https://t.co/3ZX3TNiZCY”,
“확장된_url”:“https://developer.x.com/ko/community”,
“display_url”:“developer.x.com/ko/community”,
“indices”: [
0,
23
]
}]
},
“description”:{
“urls”: []
}
},
“protected”: false,
“팔로워_count”: 517232,
“친구들_count”: 2032,
“리스트 등록됨_count”: 1722,
“생성일_at”:“Sat Dec 14 04:35:55 +0000 2013”,
“favourites_count”: 2134,
“utc_offset”: null,
“time_zone”: null,
“geo_enabled”: true,
“verified”: true,
“statuses_count”: 3677,
“lang”: null,
“기여자_enabled”: false,
“이_번역기”: false,
“이_번역_enabled”: false,
“profile_배경_color”:“FFFFFF”,
“profile_배경_이미지_url”:“http://abs.twimg.com/images/themes/theme1/bg.png”,
“profile_배경_이미지_url_https”:“https://abs.twimg.com/images/themes/theme1/bg.png”,
“profile_배경_타일”: false,
“profile_이미지_url”:“http://pbs.twimg.com/profile_images/1354494203451961345/d8HkZl6p_normal.jpg”,
“profile_이미지_url_https”:“https://pbs.twimg.com/profile_images/1354494203451961345/d8HkZl6p_normal.jpg”,
“profile_banner_url”:“https://pbs.twimg.com/profile_banners/2244994945/1611792896”,
“profile_링크_color”:“0084B4”,
“profile_sidebar_border_color”:“FFFFFF”,
“profile_sidebar_fill_color”:“DDEEF6”,
“profile_텍스트_color”:“333333”,
“profile_사용_배경_이미지”: false,
“has_extended_profile”: true,
“기본값_profile”: false,
“기본값_profile_이미지”: false,
“following”: null,
“follow_요청_발송됨”: null,
“notifications”: null,
“번역기_type”:“regular”
}
{
“data”: [{
“author_id”: “2244994945”,
“id”: “1362876655061073928”,
“text”: “우리 거실에서 여러분의 거실까지 🐱‍💻🛋️ 우리 개발자 옹호 담당자들이 새로운 #TwitterAPI를 시작하는 데 도움이 될 흥미로운 Twitch 스트림과 온라인 이벤트를 준비해 두었습니다. 자세한 내용은 일정을 확인하시고, 더 보고 싶으신 것이 있다면 알려 주세요!\n👇\nhttps://t.co/cixDY9qkvH”
}],
“includes”: {
“users”: [{
“public_metrics”: {
“followers_count”: 517233,
“following_count”: 2034,
“tweet_count”: 3677,
“listed_count”: 1727
},
“username”: “TwitterDev”,
“entities”: {
“url”: {
“urls”: [{
“start”: 0,
“end”: 23,
“url”: “https://t.co/3ZX3TNiZCY”,
“expanded_url”: “https://developer.x.com/en/community”,
“display_url”: “developer.x.com/en/community”
}]
},
“description”: {
“hashtags”: [{
“start”: 17,
“end”: 28,
“tag”: “TwitterDev”
},
{
“start”: 105,
“end”: 116,
“tag”: “TwitterAPI”
}
]
}
},
“description”: “#TwitterDev 팀의 목소리이자 #TwitterAPI 관련 업데이트, 뉴스 및 이벤트에 대한 공식 정보 출처입니다.”,
“name”: “Twitter Dev”,
“verified”: true,
“location”: “127.0.0.1”,
“id”: “2244994945”,
“protected”: false,
“url”: “https://t.co/3ZX3TNiZCY”,
“profile_image_url”: “https://pbs.twimg.com/profile_images/1354494203451961345/d8HkZl6p_normal.jpg”,
“created_at”: “2013-12-14T04:35:55.000Z”
}]
}
}

엔티티 및 확장 엔티티 객체

Twitter 1.1 formatTwitter v2 formatRequired v2 parametersType in v2
entitiesdata.entitiestweet.fields=entitiesobject
entities.hashtagsdata.entities.hashtagstweet.fields=entitiesarray of objects
entities.hashtags.indices[0]data.entities.hashtags.starttweet.fields=entitiesnumber
entities.hashtags.indices[1]data.entities.hashtags.endtweet.fields=entitiesnumber
entities.hashtags.textdata.entities.hashtags.tagtweet.fields=entitiesstring
entities.urlsdata.entities.urlstweet.fields=entitiesarray of objects
entities.urls.indices[0]data.entities.urls.starttweet.fields=entitiesnumber
entities.urls.indices[1]data.entities.urls.endtweet.fields=entitiesnumber
entities.urls.urldata.entities.urls.urltweet.fields=entitiesstring
entities.user_mentionsdata.entities.mentionstweet.fields=entitiesarray of objects
entities.user_mentions.indicies[0]data.entities.mentions.starttweet.fields=entitiesnumber
entities.user_mentions.indicies[1]data.entities.mentions.endtweet.fields=entitiesnumber
entities.user_mentions.screen_namedata.entities.mentions.usernametweet.fields=entitiesstring
entities.symbolsdata.entities.cashtagstweet.fields=entitiesarray of objects
entities.symbols.indices[0]data.entities.cashtags.starttweet.fields=entitiesnumber
entities.symbols.indices[1]data.entities.cashtags.endtweet.fields=entitiesnumber
entities.symbols.textdata.entities.cashtags.tagtweet.fields=entitiesstring
entities.mediaincludes.mediaexpansions=attachments.media_keysarray of objects
entities.media.id_strincludes.media.media_keyexpansions=attachments.media_keysstring
entities.media.typeincludes.media.media.typeexpansions=attachments.media_keysstring
entities.media.media_url해당 없음. includes.media.url 사용string
entities.media.media_url_httpsincludes.media.urlexpansions=attachments.media_keys&media.fields=urlstring
entities.media.url
entities.media.display_url
entities.media.expanded_url
entities.media.media_url_httpsincludes.media.preview_image_urlexpansions=attachments.media_keys&media.fields=preview_image_urlstring
extended_entitiesdata.attachmentstweet_fields=attachmentsobject
extended_entitiesdata.attachments.media_keystweet.fields=attachmentsarray of objects
extended_entities.mediaincludes.mediaexpansions=attachments.media_keysarray of objects
extended_entities.media.id_strincludes.media.media_keyexpansions=attachments.media_keysstring
extended_entities.media.typeincludes.media.media.typeexpansions=attachments.media_keysstring
extended_entities.media.sizes.thumb.w지원되지 않음
extended_entities.media.sizes.thumb.h지원되지 않음
extended_entities.media.sizes.thumb.resize지원되지 않음
extended_entities.media.sizes.large.wincludes.media.heightexpansions=attachments.media_keys&media.fields=height
extended_entities.media.sizes.large.hincludes.media.widthexpansions=attachments.media_keys&media.fields=width
extended_entities.media.sizes.large.resize지원되지 않음
extended_entities.media.sizes.small.w지원되지 않음
extended_entities.media.sizes.small.h지원되지 않음
extended_entities.media.sizes.small.resize지원되지 않음
extended_entities.media.sizes.medium.w지원되지 않음
extended_entities.media.sizes.medium.h지원되지 않음
extended_entities.media.sizes.medium.resize지원되지 않음
extended_entities.media.media_url_httpsincludes.media.urlexpansions=attachments.media_keys&media.fields=urlstring
extended_entities.media.media_url_httpsincludes.media.preview_image_urlexpansions=attachments.media_keys&media.fields=preview_image_urlstring
extended_entities.media.video_info.duration_millisincludes.media.duration_msexpansions=attachments.media_keys&media.fields=duration_msnumber
예시
v1.1의 엔티티 및 확장 엔티티 (비디오 포함)v2의 entities, attachments 및 includes

https://api.x.com/2/tweets?ids=1370161532013735937&expansions=attachments.media_keys,entities.mentions.username&tweet.fields=entities&user.fields=created_at,description,entities,location,name,profile_image_url,protected,public_metrics,url,username,verified,withheld&media.fields=duration_ms,height,media_key,preview_image_url,public_metrics,type,url,width
”entities”:{
“hashtags”: [{
“text”:“test”,
“indices”: [
8,
13
]
}],
“symbols”: [],
“user_mentions”: [{
“화면_name”:“TwitterDev”,
“name”:“Twitter Dev”,
“id”: 2244994945,
“id_str”:“2244994945”,
“indices”: [
31,
42
]
}],
“urls”: [{
“url”:“https://t.co/XVLZ3uwikc”,
“확장됨_url”:“https://developer.x.com/en”,
“display_url”:“developer.x.com/en”,
“indices”: [
91,
114
]
}],
“media”: [{
“id”: 1370161464028196868,
“id_str”:“1370161464028196868”,
“indices”: [
115,
138
],
“media_url”:“http://pbs.twimg.com/ext_tw_video_thumb/1370161464028196868/pu/img/cGLCoXBHVktkwlC5.jpg”,
“media_url_https”:“https://pbs.twimg.com/ext_tw_video_thumb/1370161464028196868/pu/img/cGLCoXBHVktkwlC5.jpg”,
“url”:“https://t.co/dz4oByygWA”,
“display_url”:“pic.x.com/dz4oByygWA”,
“expanded_url”:“https://twitter.com/furiouscamper/status/1370161532013735937/video/1”,
“type”:“photo”,
“sizes”:{
“thumb”:{
“w”: 150,
“h”: 150,
“resize”:“crop”
},
“small”:{
“w”: 383,
“h”: 680,
“resize”:“fit”
},
“large”:{
“w”: 720,
“h”: 1280,
“resize”:“fit”
},
“medium”:{
“w”: 675,
“h”: 1200,
“resize”:“fit”
}
}
}]
},
“extended_entities”:{
“media”: [{
“id”: 1370161464028196868,
“id_str”:“1370161464028196868”,
“indices”: [
115,
138
],
“media_url”:“http://pbs.twimg.com/ext_tw_video_thumb/1370161464028196868/pu/img/cGLCoXBHVktkwlC5.jpg”,
“media_url_https”:“https://pbs.twimg.com/ext_tw_video_thumb/1370161464028196868/pu/img/cGLCoXBHVktkwlC5.jpg”,
“url”:“https://t.co/dz4oByygWA”,
“display_url”:“pic.x.com/dz4oByygWA”,
“확장_url”:“https://twitter.com/furiouscamper/status/1370161532013735937/video/1”,
“type”:“video”,
“sizes”:{
“thumb”:{
“w”: 150,
“h”: 150,
“resize”:“crop”
},
“small”:{
“w”: 383,
“h”: 680,
“resize”:“fit”
},
“large”:{
“w”: 720,
“h”: 1280,
“resize”:“fit”
},
“medium”:{
“w”: 675,
“h”: 1200,
“resize”:“fit”
}
},
“video_참고”:{
“가로세로 비율_비율”: [
9,
16
],
“duration_밀리초”: 5140,
“variants”: [{
“비트레이트”: 950000,
“내용_type”:“video/mp4”,
“url”:“https://video.twimg.com/ext_tw_video/1370161464028196868/pu/vid/480x852/rAuFVMEqs0MeP4P4.mp4?tag=12
},
{
“비트레이트”: 2176000,
“content_type”:“video/mp4”,
“url”:“https://video.twimg.com/ext_tw_video/1370161464028196868/pu/vid/720x1280/ZxVL5qYO-DNVuSyq.mp4?tag=12
},
{
“content_type”:“application/x-mpegURL”,
“url”:“https://video.twimg.com/ext_tw_video/1370161464028196868/pu/pl/EGVpuZpo-wYxTNCq.m3u8?tag=12
},
{
“비트레이트”: 632000,
“content_type”:“video/mp4”,
“url”:“https://video.twimg.com/ext_tw_video/1370161464028196868/pu/vid/320x568/M7VtocAwKPFdkqzF.mp4?tag=12
}
]
},
“추가적인_media_참고”:{
“수익화 가능 여부”: false
}
}]
}
{
“data”: [{
“entities”:{
“hashtags”: [{
“start”: 8,
“end”: 13,
“태그”:“test”
}],
“mentions”: [{
“start”: 31,
“end”: 42,
“username”:“TwitterDev”
}],
“urls”: [{
“start”: 91,
“end”: 114,
“url”:“https://t.co/XVLZ3uwikc”,
“확장됨_url”:“https://developer.x.com/en”,
“display_url”:“developer.x.com/ko”,
“status”: 200,
“title”:“사용 사례, 튜토리얼,&문서화”,
“설명”:“게시하기&Tweet 분석, 광고 최적화,&Twitter API, Twitter Ads API를 사용하여 고유한 고객 경험을 만들고,&Twitter for Websites. Let’구축을 시작하세요.”,
“전개된_url”:“https://developer.x.com/en
},
{
“start”: 115,
“종료”: 138,
“url”:“https://t.co/dz4oByygWA”,
“확장됨_url”:“https://x.com/furiouscamper/status/1370161532013735937/video/1”,
“display_url”:“pic.x.com/dz4oByygWA”
}
]
},
“id”:“1370161532013735937”,
“텍스트”:“비디오와 @TwitterDev 멘션이 포함된 또 다른 #test입니다. 새로운 형식 마이그레이션 문서가 기대됩니다! https://t.co/XVLZ3uwikc https://t.co/dz4oByygWA”,
“attachments”:{
“media_키(keys)”: [
“7_1370161464028196868”
]
}
}],
“includes”:{
“media”: [{
“type”:“video”,
“height”: 1280,
“public_metrics”:{
“보기_count”: 37
},
“width”: 720,
“media_key”:“7_1370161464028196868”,
“duration_ms”: 5140,
“미리보기_image_url”:“https://pbs.twimg.com/ext_tw_video_thumb/1370161464028196868/pu/img/cGLCoXBHVktkwlC5.jpg
}],
“users”: [{
“public_metrics”:{
“팔로워_count”: 517233,
“팔로우_count”: 2034,
“tweet_count”: 3677,
“리스트에 등록됨_count”: 1727
},
“생성일_at”:“2013-12-14T04:35:55.000Z”,
“프로필_image_url”:“https://pbs.twimg.com/profile_images/1354494203451961345/d8HkZl6p_normal.jpg”,
“설명”:“#TwitterDev 팀의 목소리이자 #TwitterAPI 관련 업데이트, 뉴스 및 이벤트에 대한 공식 소스입니다.”,
“verified”: true,
“id”:“2244994945”,
“username”:“TwitterDev”,
“protected”: false,
“entities”:{
“url”:{
“urls”: [{
“시작”: 0,
“end”: 23,
“url”:“https://t.co/3ZX3TNiZCY”,
“확장됨_url”:“https://developer.x.com/en/community”,
“display_url”:“developer.x.com/en/community”
}]
},
“설명”:{
“hashtags”: [{
“시작”: 17,
“end”: 28,
“태그”:“TwitterDev”
},
{
“시작”: 105,
“끝”: 116,
“태그”:“TwitterAPI”
}
]
}
},
“url”:“https://t.co/3ZX3TNiZCY”,
“name”:“Twitter Dev”,
“location”:“127.0.0.1”
}]
}
}

장소 객체

Twitter 1.1 형식Twitter v2 형식필수 v2 파라미터
placedata.geo.place_idtweet.fields=geo
place.idincludes.places.idexpansions=geo.place_id
place.id.place_typeincludes.places.place_typeexpansions=geo.place_id&place.fields=place_type
place.id.nameincludes.places.nameexpansions=geo.place_id&place.fields=name
place.id.full_nameincludes.places.full_nameexpansions=geo.place_id
place.id.country_codeincludes.places.country_codeexpansions=geo.place_id&place.fields=country_code
place.id.countryincludes.places.countryexpansions=geo.place_id&place.fields=country
place.id.contained_withinincludes.places.contained_withinexpansions=geo.place_id&place.fields=contained_within
place.id.bounding_box.typeincludes.places.geo.typeexpansions=geo.place_id&place.fields=place_type
place.id.bounding_box.coordinatesincludes.places.geo.bboxexpansions=geo.place_id&place.fields=geo
place.id.attributesincludes.places.propertiesexpansions=geo.place_id&place.fields=geo
예시
v1.1의 Place 객체v2의 Place 객체

https://api.x.com/2/tweets?ids=1370161532013735937&expansions=geo.place_id&tweet.fields=geo&place.fields=contained_within,country,country_code,full_name,geo,id,name,place_type
”place”: {
“id”: “f7eb2fa2fea288b1”,
“url”: “https://api.x.com/1.1/geo/id/f7eb2fa2fea288b1.json”,
“place_type”: “city”,
“name”: “Lakewood”,
“full_name”: “Lakewood, CO”,
“country_code”: “US”,
“country”: “United States”,
“contained_within”: [],
“bounding_box”: {
“type”: “Polygon”,
“coordinates”: [
[
[
-105.193475,
39.60973
],
[
-105.053164,
39.60973
],
[
-105.053164,
39.761974
],
[
-105.193475,
39.761974
]
]
]
},
“attributes”:
}
{
“data”: [{
“id”: “1370161532013735937”,
“text”: “Another #test with a video and @TwitterDev mention. Excited for new format migration docs! https://t.co/XVLZ3uwikc https://t.co/dz4oByygWA”,
“geo”: {
“place_id”: “f7eb2fa2fea288b1”
}
}],
“includes”: {
“places”: [{
“name”: “Lakewood”,
“place_type”: “city”,
“full_name”: “Lakewood, CO”,
“id”: “f7eb2fa2fea288b1”,
“geo”: {
“type”: “Feature”,
“bbox”: [
-105.193475,
39.60973,
-105.053164,
39.761974
],
“properties”:
},
“country_code”: “US”,
“country”: “United States”
}]
}
다음 단계

Native Enriched 데이터 포맷에서 v2로 마이그레이션

Native Enriched 데이터 포맷은 당사의 enterprise 제품에서 사용됩니다. Native Enriched 데이터 포맷은 편집된 Tweet 메타데이터를 제공하도록 업데이트되었습니다. Edit Tweet 메타데이터에 대해 더 알아보려면 Edit Tweets fundamentals 페이지를 참조하세요. 표준 v1.1 엔드포인트를 사용 중이라면 standard v1.1 to v2 guide를 참조하세요. Activity Streams를 사용하는 enterprise 제품을 사용 중이라면 Activity Streams to v2 가이드도 준비되어 있습니다. X API v2는 Tweetuser 객체에 대해 새로운 JSON 설계를 도입했습니다.
  • JSON 루트 레벨에서 Native Enriched 포맷은 Tweet 객체를 results 배열로 반환하는 반면, X API v2는 data 배열로 반환합니다. 
  • Tweet 객체의 favorites와 user 객체의 favourites를 모두 사용하는 대신, X API v2는 like라는 용어만 사용합니다. 
  • X는 값이 없는 JSON 값(예: null)은 payload에 기록하지 않는 규칙을 채택하고 있습니다. Tweet 및 user 속성은 null이 아닌 값을 가질 때만 포함됩니다. 
  • v2의 모든 id 필드는 문자열(string) 형식입니다.  
새 JSON 포맷 변경 사항 외에도, Tweet 객체에 다음을 포함한 새로운 필드 세트도 도입했습니다:
  • conversation_id
  • reply_settings
  • 미디어의 alt_text
  • context 및 entities를 포함한 두 개의 새로운 annotations 필드
  • 여러 개의 새로운 metrics 필드
  • 여러 개의 새로운 polls 필드  
많은 레거시 및 사용 중단(deprecated) 필드가 제거됩니다:
  • contributors
  • 특정 entities.media 및 extended_entities.media 필드
  • filter_level
  • timestamp_ms
  • truncated

Native Enriched vs v2 페이로드 구조

다음 표는 Native Enriched 포맷과 비교했을 때 v2에서 받게 될 상위 수준 객체와 형식을 보여 줍니다.
Native Enriched 구조v2 구조
기본값{
tweet object fields,

“user”: ,
“place”: ,
“entities”: {
“hashtags”: [],
“urls”: [],
“user_mentions”: [],
“symbols”: [],
“annotations”: [],
“media”: []
},
“extended_entities”: ,
“matching_rules”: []
}
{
“data”: [{
“id”,
“text”,

“edit_history_tweet_ids”
}]
}
정의된 field and expansion 매개변수가 있는 경우{
“data”: [{
tweet object fields,
“entities”: {
“hashtags”: [],
“cashtags”: [],
“mentions”: [],
“urls”: [],
},
“attachments”: {
“media_keys”: [],
“poll_ids”: []
}
}],
“includes”: [
“tweets”: [user objects],
“users”: [user objects],
“media”: [media objects],
“places”: [place object],
“polls”: [poll object]
],
“matching_rules”: []
}
필드 매핑 다음 섹션에서는 어떤 Native Enriched 필드가 어떤 v2 필드에 매핑되는지와, 새 필드를 받기 위해 필요한 v2 매개변수가 무엇인지 설명합니다.  

Tweet 객체

Native Enriched 형식Twitter v2 형식필수 v2 파라미터v2에서의 type
created_atdata.created_attweet.fields=created_at문자열
id해당 없음 - id를 참조
id_strdata.id기본값문자열
textdata.text기본값문자열
edit_historydata.edit_history_tweet_ids기본값배열
edit_controlsdata.edit_controlstweet.fields=edit_controls객체
editabledata.edit_controls.is_edit_eligibletweet.fields=edit_controls불리언
display_text_range해당 없음 - 전체 텍스트가 text에 포함됨
sourcedata.sourcetweet.fields=source문자열
truncated해당 없음 - 전체 텍스트가 text에 포함됨
지원되지 않음data.conversation_idtweet.fields=conversation_id문자열
지원되지 않음data.reply_settingstweet.fields=reply_settingsString
in_reply_to_status_id해당 없음 - referenced_tweets.id를 참조하세요
in_reply_to_status_id_strdata.referenced_tweets.id (type=replied_to 인 경우)expansions=referenced_tweets.idString
in_reply_to_user_id해당 없음 - in_reply_to_user_id_str를 참조하세요
in_reply_to_user_id_strdata.in_reply_to_user_idtweet.fields=in_reply_to_user_idString
in_reply_to_screen_nameincludes.users..usernametweet.fields=in_reply_to_user_id&expansions=entities.mentions.usernameString
userincludes.usersexpansions=author_idObject
user.id_strdata.author_idtweet.fields=author_idString
geodata.geo.place_idtweet.fields=geo
coordinatesdata.geo.place_idtweet.fields=geo
placedata.geo.place_idtweet.fields=geo
is_quoted_statusdata.referenced_tweets.id (type=quoted 인 경우)tweet.fields=referenced_tweetsString
extended_tweet.full_text해당 없음 - text에는 전체 텍스트가 포함됩니다
해당 없음data.public_metricstweet.fields=public_metrics객체(Object)
quote_countdata.public_metrics.quote_counttweet.fields=public_metrics정수(Int)
reply_countdata.public_metrics.reply_counttweet.fields=public_metrics정수(Int)
retweet_countdata.public_metrics.retweet_counttweet.fields=public_metrics정수(Int)
favorite_countdata.public_metrics.like_counttweet.fields=public_metrics정수(Int)
해당 없음data.non_public_metricstweet.fields=non_public_metrics객체(Object)
해당 없음data.non_public_metrics.impression_counttweet.fields=non_public_metrics정수(Int)
해당 없음data.non_public_metrics.url_link_counttweet.fields=non_public_metrics정수(Int)
해당 없음data.non_public_metrics.user_profile_counttweet.fields=non_public_metrics정수(Int)
해당 없음data.organic_metricstweet.fields=organic_metrics객체
제공되지 않음data.organic_metrics.like_counttweet.fields=organic_metricsInt
제공되지 않음data.organic_metrics.retweet_counttweet.fields=organic_metricsInt
제공되지 않음data.organic_metrics.reply_counttweet.fields=organic_metricsInt
제공되지 않음data.organic_metrics.impression_counttweet.fields=organic_metricsInt
제공되지 않음data.organic_metrics.url_link_counttweet.fields=organic_metricsInt
제공되지 않음data.organic_metrics.user_profile_counttweet.fields=organic_metricsInt
제공되지 않음data.promoted_metricstweet.fields=promoted_metrics객체
제공되지 않음data.promoted_metrics.like_counttweet.fields=promoted_metricsInt
제공되지 않음data.promoted_metrics.retweet_counttweet.fields=promoted_metricsInt
제공되지 않음data.promoted_metrics.reply_counttweet.fields=promoted_metricsInt
해당 없음data.promoted_metrics.impression_counttweet.fields=promoted_metricsInt
해당 없음data.promoted_metrics.url_link_counttweet.fields=promoted_metricsInt
해당 없음data.promoted_metrics.user_profile_counttweet.fields=promoted_metricsInt
기여자해당 없음해당 없음
엔터티data.entitiestweet.fields=entitiesObject
entities.user_mentionsdata.entities.mentionstweet.fields=entities객체 배열
entities.symbolsdata.entities.cashtagstweet.fields=entities객체 배열
entities.hashtagsdata.entities.hashtagstweet.fields=entities객체 배열
entities.urlsdata.entities.urlstweet.fields=entities객체 배열
entities.mediaincludes.mediaexpansions=attachments.media_keys객체 배열
entities.annotationstweet.fields=entities,context_annotations객체
entities.annotations.contextdata.context_annotationstweet.fields=entities,context_annotations객체 배열
해당 없음data.context_annotations.domaintweet.fields=context_annotations객체
entities.annotations.context.context_domain_id_strdata.context_annotations.domain.idtweet.fields=context_annotations문자열
entities.annotations.context.context_domain_id제공되지 않습니다제공되지 않습니다. 문자열 형식은 data.context_annotations.domain.id를 참조하세요
entities.annotations.context.context_domain_namedata.context_annotations.domain.nametweet.fields=context_annotations문자열
entities.annotations.context.context_domain_descriptiondata.context_annotations.domain.descriptiontweet.fields=context_annotations문자열
해당 없음data.context_annotations.entitytweet.fields=context_annotations객체
entities.annotations.context.context_entity_id_strdata.context_annotations.entity.idtweet.fields=context_annotations문자열
entities.annotations.context.context_entity_id제공되지 않습니다제공되지 않습니다. 문자열 형식은 data.context_annotations.entity.id를 참조하세요
entities.annotations.context.context_entity_namedata.context_annotations.entity.nametweet.fields=context_annotations문자열
entities.annotations.context.context_entity_descriptiondata.context_annotations.entity.descriptiontweet.fields=context_annotations문자열
entities.annotations.entitydata.entities.annotationstweet.fields=entities,context_annotations객체 배열
extended_entitiesdata.attachmentstweet.fields=attachments객체
favorited제공되지 않음제공되지 않음
retweeted제공되지 않음제공되지 않음
retweeted_status
possibly_sensitivedata.possibly_sensitivetweet.fields=possibly_sensitive불리언 값
langdata.langtweet.fields=lang문자열
filter_level제공되지 않음제공되지 않음
scopes제공되지 않음제공되지 않음
timestamp_ms제공되지 않음제공되지 않음
withhelddata.withheldtweet.fields=withheld객체 배열
matching_rulesmatching_rules객체 배열
matching_rules.id제공되지 않음제공되지 않음
matching_rules.id_strmatching_rules.id필터 스트림의 기본값문자열
matching_rules.tagmatching_rules.tag필터 스트림의 기본값문자열

User 객체

네이티브 Enriched 데이터 형식Twitter v2 포맷필수 v2 파라미터v2의 type
userincludes.usersexpansions=author_id객체 배열
user.id제공되지 않음해당 없음 - includes.users.id 참조문자열
user.id_strincludes.users.idexpansions=author_id문자열
user.nameincludes.users.nameexpansions=author_id문자열
user.screen_nameincludes.users.usernameexpansions=author_id문자열
user.locationincludes.users.locationexpansions=author_id&user.fields=location객체
user.descriptionincludes.users.descriptionexpansions=author_id&user.fields=description문자열
제공되지 않음includes.users.urlexpansions=author_id&user.fields=url문자열
user.followers_countincludes.users.public_metrics.followers_countexpansions=author_id&user.fields=public_metrics정수
user.friends_countincludes.users.public_metrics.following_countexpansions=author_id&user.fields=public_metrics정수
user.listed_countincludes.users.public_metrics.listed_countexpansions=author_id&user.fields=public_metricsInt
user.created_atincludes.users.created_atexpansions=author_id&user.fields=created_atString
user.favourites_count제공되지 않음
user.verifiedincludes.users.verifiedexpansions=author_id&user.fields=verifiedBoolean
user.pinned_tweet_idincludes.users.pinned_tweet_idexpansions=author_id&user.fields=pinned_tweet_idString
user.statuses_countincludes.users.public_metrics.tweet_countexpansions=author_id&user.fields=public_metricsInt
user.profile_image_url_httpsincludes.users.profile_image_urlexpansions=author_id&user.fields=profile_image_urlString
user.translator_type제공되지 않음제공되지 않음
user.utc_offset제공되지 않음제공되지 않음
user.time_zone제공되지 않음제공되지 않음
user.geo_enabled제공되지 않음제공되지 않음
user.lang제공되지 않음제공되지 않음 - Tweet 언어를 기준으로 추론됨
user.contributors_enabled제공되지 않음제공되지 않음
user.is_translator제공되지 않음제공되지 않음
user.profile_background_color제공되지 않음제공되지 않음
user.profile_background_image_url제공되지 않음제공되지 않음
user.profile_background_image_url_https제공되지 않음제공되지 않음
user.profile_background_title제공되지 않음제공되지 않음
user.profile_sidebar_border_color제공되지 않음제공되지 않음
user.profile_sidebar_fill_color제공되지 않음제공되지 않음
user.profile_text_color제공되지 않음제공되지 않음
user.profile_user_background_image제공되지 않음제공되지 않음
user.profile_image_urlincludes.user.profile_image_url을 참조
user.default_profile제공되지 않음제공되지 않음
user.default_profile_image제공되지 않음제공되지 않음
user.following제공되지 않음제공되지 않음
user.follow_request_sent제공되지 않음제공되지 않음
user.notifications제공되지 않음제공되지 않음
user.withheld_in_countriesincludes.users.withheldexpansions=author_id&user.fields=withheld객체
user.protectedincludes.users.protectedexpansions=author_id&user.fields=protected부울 값
제공되지 않음includes.users.entitiesexpansions=author_id&user.fields=entities객체
제공되지 않음includes.users.entities.urlexpansions=author_id&user.fields=entities객체
제공되지 않음includes.users.entities.url.urlsexpansions=author_id&user.fields=entities객체 배열
제공되지 않음includes.users.entities.url.urls.startexpansions=author_id&user.fields=entities정수
제공되지 않음includes.users.entities.url.urls.endexpansions=author_id&user.fields=entities정수
제공되지 않음includes.users.entities.url.urls.urlexpansions=author_id&user.fields=entities문자열
user.urlincludes.users.entities.url.urls.expanded_urlexpansions=author_id&user.fields=entitiesString
해당 없음includes.users.entities.url.urls.display_urlexpansions=author_id&user.fields=entitiesString
해당 없음includes.users.entities.descriptionsexpansions=author_id&user.fields=entities객체
해당 없음includes.users.entities.descriptions.hashtagsexpansions=author_id&user.fields=entities객체 배열
해당 없음includes.users.entities.descriptions.hashtags.startexpansions=author_id&user.fields=entitiesInt
해당 없음includes.users.entities.descriptions.hashtags.endexpansions=author_id&user.fields=entitiesInt
user.description에 포함됨includes.users.entities.descriptions.hashtags.tagexpansions=author_id&user.fields=entitiesString
해당 없음includes.users.entities.descriptions.mentionsexpansions=author_id&user.fields=entities객체 배열
해당 없음includes.users.entities.descriptions.mentions.startexpansions=author_id&user.fields=entitiesInt
해당 없음includes.users.entities.descriptions.mentions.endexpansions=author_id&user.fields=entitiesInt
user.description에 포함되어 있음includes.users.entities.descriptions.mentions.usernameexpansions=author_id&user.fields=entities문자열
제공되지 않음includes.users.entities.descriptions.cashtagsexpansions=author_id&user.fields=entities객체 배열
제공되지 않음includes.users.entities.descriptions.cashtags.startexpansions=author_id&user.fields=entities정수
제공되지 않음includes.users.entities.descriptions.cashtags.endexpansions=author_id&user.fields=entities정수
user.description에 포함되어 있음includes.users.entities.descriptions.cashtags.tagexpansions=author_id&user.fields=entities문자열

Entities 및 Expanded entities 객체

Native Enriched 포맷Twitter v2 포맷v2 필수 매개변수v2에서의 type
entitiesdata.entitiestweet.fields=entities객체
entities.hashtagsdata.entities.hashtagstweet.fields=entities객체 배열
entities.hashtags.indices[0]data.entities.hashtags.starttweet.fields=entities정수
entities.hashtags.indices[1]data.entities.hashtags.endtweet.fields=entities정수
entities.hashtags.textdata.entities.hashtags.tagtweet.fields=entities문자열
entities.urlsdata.entities.urlstweet.fields=entities객체 배열
entities.urls.indices[0]data.entities.urls.starttweet.fields=entities정수
entities.urls.indices[1]data.entities.urls.endtweet.fields=entities정수
entities.urls.urldata.entities.urls.urltweet.fields=entities문자열
entities.urls.expanded_urldata.entities.urls.expanded_urltweet.fields=entities문자열
entities.urls.display_urldata.entities.urls.display_urltweet.fields=entities문자열
entities.urls.unwound.urldata.entities.urls.unwound_urltweet.fields=entities문자열
entities.urls.unwound.statusdata.entities.urls.statustweet.fields=entities문자열
entities.urls.unwound.titledata.entities.urls.titletweet.fields=entities문자열
entities.urls.unwound.descriptiondata.entities.urls.descriptiontweet.fields=entities문자열
해당 없음data.entities.urls.imagestweet.fields=entities객체 배열
해당 없음data.entities.urls.images.urltweet.fields=entities문자열
해당 없음data.entities.urls.images.widthtweet.fields=entities정수
해당 없음data.entities.urls.images.heighttweet.fields=entities정수
entities.user_mentionsdata.entities.mentionstweet.fields=entities객체 배열
entities.user_mentions.indicies[0]data.entities.mentions.starttweet.fields=entities정수
entities.user_mentions.indicies[1]data.entities.mentions.endtweet.fields=entities정수
entities.user_mentions.screen_namedata.entities.mentions.usernametweet.fields=entities문자열
entities.symbolsdata.entities.cashtagstweet.fields=entities객체 배열
entities.symbols.indices[0]data.entities.cashtags.starttweet.fields=entities정수
entities.symbols.indices[1]data.entities.cashtags.endtweet.fields=entities정수
entities.symbols.textdata.entities.cashtags.tagtweet.fields=entities문자열
entities.media OR extended_entities.mediaincludes.mediaexpansions=attachments.media_keys객체 배열
entities.media.id_str OR extended_entities.media.id_strincludes.media.media_keyexpansions=attachments.media_keys문자열
entities.media.id OR extended_entities.media.id사용할 수 없음 - id는 문자열입니다.
entities.media.type OR extended_entities.media.typeincludes.media.media.typeexpansions=attachments.media_keys문자열
entities.media.indices OR extended_entities.media.indices제공되지 않음제공되지 않음
제공되지 않음includes.media.alt_textexpansions=attachments.media_keys&media.fields=alt_text문자열
entities.media.additional_media_info OR extended_entities.media.additional_media_info제공되지 않음제공되지 않음
entities.media.additional_media_info.monetizable OR extended_entities.media.additional_media_info.monetizable제공되지 않음제공되지 않음
entities.media.media_url OR extended_entities.media.media_url해당 없음 - includes.media.url 참조문자열
entities.media.media_url_https OR extended_entities.media.media_url_httpsincludes.media.urlexpansions=attachments.media_keys&media.fields=url문자열
entities.media.url OR extended_entities.media.url
entities.media.display_url OR extended_entities.media.expanded_url
entities.media.expanded_url
entities.media.media_url_httpsincludes.media.preview_image_urlexpansions=attachments.media_keys&media.fields=preview_image_url문자열
extended_entitiesdata.attachmentstweet_fields=attachments객체
extended_entitiesdata.attachments.media_keystweet.fields=attachments객체 배열
제공되지 않음data.attachments.poll_idstweet.fields=attachments객체 배열
extended_entities.media.sizes.thumb.w제공되지 않음
extended_entities.media.sizes.thumb.h제공되지 않음
extended_entities.media.sizes.thumb.resize제공되지 않음
extended_entities.media.sizes.large.wincludes.media.heightexpansions=attachments.media_keys&media.fields=height
extended_entities.media.sizes.large.hincludes.media.widthexpansions=attachments.media_keys&media.fields=width
extended_entities.media.sizes.large.resize제공되지 않음제공되지 않음
extended_entities.media.sizes.small.w제공되지 않음제공되지 않음
extended_entities.media.sizes.small.h제공되지 않음제공되지 않음
extended_entities.media.sizes.small.resize제공되지 않음제공되지 않음
extended_entities.media.sizes.medium.w제공되지 않음제공되지 않음
extended_entities.media.sizes.medium.h제공되지 않음제공되지 않음
extended_entities.media.sizes.medium.resize제공되지 않음제공되지 않음
extended_entities.media.media_url_httpsincludes.media.preview_image_urlexpansions=attachments.media_keys&media.fields=preview_image_url문자열
extended_entities.media.video_info.aspect_ratio제공되지 않음정의되지 않음
extended_entities.media.variants정의되지 않음정의되지 않음
extended_entities.media.variants.bitrate정의되지 않음정의되지 않음
extended_entities.media.variants.content_type정의되지 않음정의되지 않음
extended_entities.media.variants.url정의되지 않음정의되지 않음
extended_entities.media.video_info.duration_millisincludes.media.duration_msexpansions=attachments.media_keys&media.fields=duration_msInt
정의되지 않음includes.media.public_metricsexpansions=attachments.media_keys&media.fields=public_metricsObject
정의되지 않음includes.media.public_metrics.view_countexpansions=attachments.media_keys&media.fields=public_metricsInt
정의되지 않음includes.media.non_public_metricsexpansions=attachments.media_keys&media.fields=non_public_metricsObject
정의되지 않음includes.media.non_public_metrics.playback_0_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
정의되지 않음includes.media.non_public_metrics.playback_25_countexpansions=attachments.media_keys&media.fields=non_public_metricsInt
정의되지 않음includes.media.non_public_metrics.playback_50_countexpansions=attachments.media_keys&media.fields=non_public_metrics정수
제공되지 않음includes.media.non_public_metrics.playback_75_countexpansions=attachments.media_keys&media.fields=non_public_metrics정수
제공되지 않음includes.media.non_public_metrics.playback_100_countexpansions=attachments.media_keys&media.fields=non_public_metrics정수
제공되지 않음includes.media.organic_metricsexpansions=attachments.media_keys&media.fields=organic_metrics객체
제공되지 않음includes.media.organic_metrics.playback_0_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.organic_metrics.playback_25_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.organic_metrics.playback_50_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.organic_metrics.playback_75_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.organic_metrics.playback_100_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.organic_metrics.view_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.promoted_metricexpansions=attachments.media_keys&media.fields=promoted_metrics객체
제공되지 않음includes.media.promoted_metric.playback_0_countexpansions=attachments.media_keys&media.fields=promoted_metrics정수형
제공되지 않음includes.media.promoted_metric.playback_25_countexpansions=attachments.media_keys&media.fields=promoted_metrics정수형
제공되지 않음includes.media.promoted_metric.playback_50_countexpansions=attachments.media_keys&media.fields=promoted_metrics정수형
제공되지 않음includes.media.promoted_metric.playback_75_countexpansions=attachments.media_keys&media.fields=promoted_metrics정수형
제공되지 않음includes.media.promoted_metric.playback_100_countexpansions=attachments.media_keys&media.fields=promoted_metrics정수형
제공되지 않음includes.media.promoted_metrics.view_countexpansions=attachments.media_keys&media.fields=promoted_metrics정수형

Place 객체

Native Enriched 형식Twitter v2 형식필수 v2 매개변수v2의 type
placeincludes.placesexpansions=geo.place_id객체 배열
place.idincludes.places.idexpansions=geo.place_id문자열
place.url제공되지 않음제공되지 않음
place.id.place_typeincludes.places.place_typeexpansions=geo.place_id&place.fields=place_type문자열
place.id.nameincludes.places.nameexpansions=geo.place_id&place.fields=name문자열
place.id.full_nameincludes.places.full_nameexpansions=geo.place_id문자열
place.id.country_codeincludes.places.country_codeexpansions=geo.place_id&place.fields=country_code문자열
place.id.countryincludes.places.countryexpansions=geo.place_id&place.fields=country문자열
place.id.contained_withinincludes.places.contained_withinexpansions=geo.place_id&place.fields=contained_within배열
place.id.bounding_box.typeincludes.places.geo.typeexpansions=geo.place_id&place.fields=place_type문자열
place.id.bounding_box.coordinatesincludes.places.geo.bboxexpansions=geo.place_id&place.fields=geo배열
place.id.attributesincludes.places.propertiesexpansions=geo.place_id&place.fields=geo객체

Poll 객체

네이티브 Enriched 형식Twitter v2 형식필수 v2 매개변수v2 타입
entities.pollsincludes.pollsexpansions=attachments.poll_ids객체 배열
사용 불가includes.polls.idexpansions=attachments.poll_ids문자열
entities.poll.optionsincludes.polls.optionsexpansions=attachments.poll_ids객체 배열
entities.polls.options.positionincludes.polls.options.positionexpansions=attachments.poll_idsInt
entities.polls.options.textincludes.polls.options.labelexpansions=attachments.poll_ids문자열
사용 불가includes.polls.options.votesexpansions=attachments.poll_idsInt
사용 불가includes.polls.voting_statusexpansions=attachments.poll_ids&poll.fields=voting_status문자열
entities.polls.duration_minutesincludes.polls.duration_minutesexpansions=attachments.poll_ids&poll.fields=duration_minutesInt
entities.polls.end_datetimeincludes.polls.end_datetimeexpansions=attachments.poll_ids&poll.fields=end_datetime날짜(ISO 8601)

Activity Streams 데이터 형식에서 v2로 마이그레이션

Activity Streams 데이터 형식은 당사의 enterprise 제품에서 사용할 수 있습니다. Activity Streams 데이터 형식은 편집된 Tweet 메타데이터를 제공하도록 업데이트되었습니다. Edit Tweet 메타데이터에 대해 더 알아보려면 Edit Tweets 기본 사항 페이지를 확인하세요. 표준 v1.1 엔드포인트를 사용 중이라면 standard v1.1 to v2 가이드를 참조하세요. 프리미엄 엔드포인트나 enterprise용 Native Enriched 형식을 사용 중이라면 Native Enriched to v2 가이드를 참조하세요. X API v2는 게시물user 오브젝트에 대해 새로운 JSON 설계를 도입합니다.
  • JSON 루트 레벨에서 Activity Streams 형식은 results 배열에 Tweet 오브젝트를 반환하는 반면, X API v2는 data 배열을 반환합니다. 
  • 리트윗 및 인용 “activities”를 참조하는 대신, X API v2 JSON은 리트윗된 Tweet과 인용된 Tweet을 참조합니다. 
  • Tweet 오브젝트의 favorites 및 user 오브젝트의 favourites를 모두 사용하는 대신, X API v2는 like라는 용어를 사용합니다. 
  • X는 값이 없는 JSON 필드(예: 값이 null인 경우)는 페이로드에 기록하지 않는 관례를 채택하고 있습니다. Tweet 및 user 오브젝트의 속성은 null이 아닌 값을 가진 경우에만 포함됩니다. 
  • v2의 모든 id 필드는 문자열 형식입니다.  
새 JSON 형식 변경 사항 외에도, Tweet 오브젝트에 다음을 포함한 새로운 필드 집합이 도입되었습니다:
  • conversation_id
  • reply_settings
  • 미디어의 alt_text
  • context 및 entities를 포함한 두 개의 새로운 annotations 필드
  • 여러 새로운 metrics 필드
  • 여러 새로운 polls 필드  
많은 레거시 및 사용 중단(deprecated) 필드가 제거되거나 대체됩니다:
  • display_text_range
  • generator
  • gnip
  • link
  • objectType
  • provider
  • twitter_entities.symbols는 data.entities.cashtags로 대체됨
  • 특정 twitter_extended_entities.media 및 twitter_entities.media 필드
  • twitter_filter_level
  • twitterTimeZone
  • verb

Tweet 객체

Activity Streams 데이터 형식Twitter v2 포맷필수 v2 매개변수v2에서의 type
postedTimedata.created_attweet.fields=created_at날짜(ISO 8601)
generator제공되지 않음제공되지 않음
generator.link제공되지 않음제공되지 않음
generator.displayNamedata.sourcetweet.fields=source문자열
twitter_langdata.langtweet.fields=lang문자열
제공되지 않음data.conversation_idtweet.fields=conversation_id문자열
제공되지 않음data.reply_settingstweet.fields=reply_settings문자열
제공되지 않음data.possibly_sensitivetweet.fields=possibly_sensitive불리언
제공되지 않음data.withheldtweet.fields=withheld객체
objectType제공되지 않음제공되지 않음
verb제공되지 않음제공되지 않음
provider제공되지 않음제공되지 않음
provider.objectType제공되지 않음제공되지 않음
provider.displayName제공되지 않음제공되지 않음
provider.link제공되지 않음제공되지 않음
link제공되지 않음제공되지 않음
display_text_range제공되지 않음제공되지 않음
object제공되지 않음제공되지 않음
object.objectType제공되지 않음제공되지 않음
object.id제공되지 않음제공되지 않음
object.summarydata.text기본값String
object.edit_historydata.edit_history_tweet_ids기본값Array
object.edit_controlsdata.edit_controlstweet.fields=edit_controlsObject
object.editabledata.edit_controls.is_edit_eligibletweet.fields=edit_controlsBoolean
object.link제공되지 않음제공되지 않음
object.postedTimedata.created_attweet.fields=created_at날짜 (ISO 8601)
actor.id에서 유도됨data.author_idtweet.fields=created_at
twitter_filter_level제공되지 않음제공되지 않음
inReplyTo.link의 사용자 이름에서 유도됨data.in_reply_to_user_idtweet.fields=in_reply_to_user_idString
제공되지 않음data.referenced_tweetstweet.fields=referenced_tweets객체 배열
제공되지 않음data.referenced_tweets.typetweet.fields=referenced_tweetsString
inReplyTo.link에서 유도됨data.referenced_tweets.idtweet.fields=referenced_tweetsString
제공되지 않음data.attachmentstweet.fields=attachmentsObject
twitter_entities.media.id_str에서 유도됨data.attachments.media_keystweet.fields=attachmentsArray
해당 없음data.attachments.poll_idstweet.fields=attachments배열
twitter_entitiesdata.entitiestweet.fields=entities객체
해당 없음data.entities.annotationstweet.fields=entities객체 배열
해당 없음data.entities.annotations.starttweet.fields=entities정수 (Int)
해당 없음data.entities.annotations.endtweet.fields=entities정수 (Int)
해당 없음data.entities.annotations.probabilitytweet.fields=entities부동 소수점 수 (Float)
해당 없음data.entities.annotations.typetweet.fields=entities문자열 (String)
해당 없음data.entities.annotations.normalized_texttweet.fields=entities문자열 (String)
twitter_entities.urlsdata.entities.urlstweet.fields=entities객체 배열
twitter_entities.urls.indices[0]data.entities.urls.starttweet.fields=entities정수 (Int)
twitter_entities.urls.indices[1]data.entities.urls.endtweet.fields=entities정수
twitter_entities.urls.urldata.entities.urls.urltweet.fields=entities문자열
twitter_entities.urls.expanded_urldata.entities.urls.expanded_urltweet.fields=entities문자열
twitter_entities.urls.display_urldata.entities.urls.display_urltweet.fields=entities문자열
해당 없음data.entities.urls.imagestweet.fields=entities객체 배열
해당 없음data.entities.urls.images.urltweet.fields=entities문자열
해당 없음data.entities.urls.images.widthtweet.fields=entities정수
해당 없음data.entities.urls.images.heighttweet.fields=entities정수
gnip.urls.expanded_statusdata.entities.urls.statustweet.fields=entities정수
gnip.urls.expanded_url_titledata.entities.urls.titletweet.fields=entities문자열
gnip.urls.expanded_url_descriptiondata.entities.urls.descriptiontweet.fields=entities문자열
gnip.urls.expanded_urldata.entities.urls.unwound_urltweet.fields=entities문자열
twitter_entities.symbolsdata.entities.cashtagstweet.fields=entities객체 배열
twitter_entities.symbols.indices[0]data.entities.cashtags.starttweet.fields=entities정수
twitter_entities.symbols.indices[1]data.entities.cashtags.endtweet.fields=entities정수
twitter_entities.symbols.textdata.entities.cashtags.tagtweet.fields=entities문자열
twitter_entities.hashtagsdata.entities.hashtagstweet.fields=entities객체 배열
twitter_entities.hashtags.indices[0]data.entities.hashtags.starttweet.fields=entities정수
twitter_entities.hashtags.indices[1]data.entities.hashtags.endtweet.fields=entities정수
twitter_entities.hashtags.textdata.entities.hashtags.tagtweet.fields=entities문자열
twitter_entities.user_mentionsdata.entities.mentionstweet.fields=entities객체 배열(Object 배열)
twitter_entities.user_mentions.indices[0]data.entities.mentions.starttweet.fields=entities정수(Int)
twitter_entities.user_mentions.indices[1]data.entities.mentions.endtweet.fields=entities정수(Int)
twitter_entities.user_mentions.screen_namedata.entities.mentions.tagtweet.fields=entities문자열(String)
twitter_entities.user_mentions.id_strdata.entities.mentions.idtweet.fields=entities문자열(String)
twitter_entities.user_mentions.id해당 없음해당 없음
해당 없음data.context_annotationstweet.fields=context_annotations객체 배열(Object 배열)
해당 없음data.context_annotations.domaintweet.fields=context_annotations객체(Object)
해당 없음data.context_annotations.domain.idtweet.fields=context_annotations문자열(String)
해당 없음data.context_annotations.domain.nametweet.fields=context_annotations문자열(String)
해당 없음data.context_annotations.domain.descriptiontweet.fields=context_annotationsString
해당 없음data.context_annotations.entitytweet.fields=context_annotationsObject
해당 없음data.context_annotations.entity.idtweet.fields=context_annotationsString
해당 없음data.context_annotations.entity.nametweet.fields=context_annotationsString
해당 없음data.context_annotations.entity.descriptiontweet.fields=context_annotationsString
geodata.geotweet.fields=geoObject
location.link에서 파생된 값data.geo.place_idtweet.fields=geoString
해당 없음data.public_metricstweet.fields=public_metricsObject
favoritesCountdata.public_metrics.like_counttweet.fields=public_metricsInt
retweetCountdata.public_metrics.retweet_counttweet.fields=public_metricsInt
해당 없음data.public_metrics.quote_counttweet.fields=public_metricsInt
해당 없음data.public_metrics.reply_counttweet.fields=public_metricsInt
해당 없음data.non_public_metricstweet.fields=non_public_metricsObject
해당 없음data.non_public_metrics.impression_counttweet.fields=non_public_metricsInt
해당 없음data.non_public_metrics.url_link_counttweet.fields=non_public_metricsInt
해당 없음data.non_public_metrics.user_profile_counttweet.fields=non_public_metricsInt
해당 없음data.organic_metricstweet.fields=organic_metricsObject
해당 없음data.organic_metrics.like_counttweet.fields=organic_metricsInt
해당 없음data.organic_metrics.retweet_counttweet.fields=organic_metricsInt
해당 없음data.organic_metrics.reply_counttweet.fields=organic_metricsInt
해당 없음data.organic_metrics.impression_counttweet.fields=organic_metricsInt
제공되지 않음data.organic_metrics.url_link_counttweet.fields=organic_metricsInt
제공되지 않음data.organic_metrics.user_profile_counttweet.fields=organic_metricsInt
제공되지 않음data.promoted_metricstweet.fields=promoted_metricsObject
제공되지 않음data.promoted_metrics.like_counttweet.fields=promoted_metricsInt
제공되지 않음data.promoted_metrics.retweet_counttweet.fields=promoted_metricsInt
제공되지 않음data.promoted_metrics.reply_counttweet.fields=promoted_metricsInt
제공되지 않음data.promoted_metrics.impression_counttweet.fields=promoted_metricsInt
제공되지 않음data.promoted_metrics.url_link_counttweet.fields=promoted_metricsInt
제공되지 않음data.promoted_metrics.user_profile_counttweet.fields=promoted_metricsInt
gnip.profileLocations정의되지 않음정의되지 않음
gnip.profileLocations.address정의되지 않음정의되지 않음
gnip.profileLocations.address.country정의되지 않음정의되지 않음
gnip.profileLocations.address.countryCode정의되지 않음정의되지 않음
gnip.profileLocations.displayName정의되지 않음정의되지 않음
gnip.profileLocations.geo정의되지 않음정의되지 않음
gnip.profileLocations.geo.coordinates정의되지 않음정의되지 않음
gnip.profileLocations.geo.type정의되지 않음정의되지 않음
gnip.profileLocations.objectType정의되지 않음정의되지 않음

User 객체

Activity Streams 데이터 형식Twitter v2 형식v2 필수 매개변수v2에서의 type
actorincludes.usersexpansions=author_id객체 배열
actor.id에서 파생됨includes.users.idexpansions=author_id문자열
actor.displayNameincludes.users.nameexpansions=author_id문자열
actor.preferredUsernameincludes.users.usernameexpansions=author_id문자열
actor.postedTimeincludes.users.created_atexpansions=author_id&user.fields=created_at날짜 (ISO 8601)
actor.summaryincludes.users.descriptionexpansions=author_id&user.fields=description문자열
제공되지 않음includes.users.pinned_tweet_idexpansions=author_id&user.fields=pinned_tweet_id문자열
제공되지 않음includes.users.protectedexpansions=author_id&user.fields=protected불리언
actor.link제공되지 않음제공되지 않음 - includes.users.username을 기반으로 구성됨
actor.twitterTimeZone제공되지 않음제공되지 않음 - Tweet의 created_at에서 추론됨
actor.utcOffset제공되지 않음제공되지 않음 - Tweet의 created_at 값에서 추론됨
actor.favoritesCount제공되지 않음제공되지 않음
actor.followersCountincludes.users.public_metrics.followers_countexpansions=author_id&user.fields=public_metricsInt
actor.friendsCountincludes.users.public_metrics.following_countexpansions=author_id&user.fields=public_metricsInt
actor.listedCountincludes.users.public_metrics.listed_countexpansions=author_id&user.fields=public_metricsInt
actor.statusesCountincludes.users.public_metrics.tweet_countexpansions=author_id&user.fields=public_metricsInt
actor.languages[]제공되지 않음제공되지 않음 - Tweet의 lang 값에서 추론됨
actor.location.displayNameincludes.users.locationexpansions=author_id&user.fields=locationString
actor.imageincludes.users.profile_image_urlexpansions=author_id&user.fields=profile_image_urlString
actor.linksincludes.users.urlexpansions=author_id&user.fields=urlString
actor.verifiedincludes.users.verifiedexpansions=author_id&user.fields=verifiedBoolean
제공되지 않음includes.users.withheldexpansions=author_id&user.fields=withheld객체
해당 없음includes.users.entitiesexpansions=author_id&user.fields=entities객체
해당 없음includes.users.entities.urlexpansions=author_id&user.fields=entities객체
actor.linksincludes.users.entities.url.urlsexpansions=author_id&user.fields=entities객체 배열
해당 없음includes.users.entities.url.urls.startexpansions=author_id&user.fields=entitiesInt
해당 없음includes.users.entities.url.urls.endexpansions=author_id&user.fields=entitiesInt
해당 없음includes.users.entities.url.urls.urlexpansions=author_id&user.fields=entities문자열
actor.links.hrefincludes.users.entities.url.urls.expanded_urlexpansions=author_id&user.fields=entities문자열
해당 없음includes.users.entities.url.urls.display_urlexpansions=author_id&user.fields=entities문자열
해당 없음includes.users.entities.descriptionexpansions=author_id&user.fields=entities객체
해당 없음includes.users.entities.description.hashtagsexpansions=author_id&user.fields=entities객체 배열
해당 없음includes.users.entities.description.hashtags.startexpansions=author_id&user.fields=entities정수
해당 없음includes.users.entities.description.hashtags.endexpansions=author_id&user.fields=entities정수
해당 없음includes.users.entities.description.hashtags.tagexpansions=author_id&user.fields=entities문자열
해당 없음includes.users.entities.description.mentionsexpansions=author_id&user.fields=entities객체 배열
해당 없음includes.users.entities.description.mentions.startexpansions=author_id&user.fields=entities정수
해당 없음includes.users.entities.description.mentions.endexpansions=author_id&user.fields=entities정수
해당 없음includes.users.entities.description.mentions.usernameexpansions=author_id&user.fields=entities문자열
해당 없음includes.users.entities.description.cashtagsexpansions=author_id&user.fields=entities객체 배열
해당 없음includes.users.entities.description.cashtags.startexpansions=author_id&user.fields=entities정수
해당 없음includes.users.entities.description.cashtags.endexpansions=author_id&user.fields=entities정수형(Int)
해당 없음includes.users.entities.description.cashtags.tagexpansions=author_id&user.fields=entities문자열(String)

Poll 객체

Activity Streams 형식Twitter v2 형식필수 v2 매개변수v2 타입
제공되지 않음includes.pollsexpansions=attachments.poll_ids객체 배열
제공되지 않음includes.polls.idexpansions=attachments.poll_ids문자열
제공되지 않음includes.polls.optionsexpansions=attachments.poll_ids객체 배열
제공되지 않음includes.polls.options.positionexpansions=attachments.poll_idsInt
제공되지 않음includes.polls.options.labelexpansions=attachments.poll_ids문자열
제공되지 않음includes.polls.options.votesexpansions=attachments.poll_idsInt
제공되지 않음includes.polls.voting_statusexpansions=attachments.poll_ids&poll.fields=voting_status문자열
제공되지 않음includes.polls.duration_minutesexpansions=attachments.poll_ids&poll.fields=duration_minutesInt
제공되지 않음includes.polls.end_datetimeexpansions=attachments.poll_ids&poll.fields=end_datetime날짜 (ISO 8601)

Place 객체

Activity Streams 형식Twitter v2 형식필수 v2 매개변수v2의 type
locationincludes.placesexpansions=geo.place_id객체 배열
location.displayNameincludes.places.full_nameexpansions=geo.place_id문자열
location.link에서 파싱된 값includes.places.idexpansions=geo.place_id문자열
location.nameincludes.places.nameexpansions=geo.place_id&place.fields=name문자열
location.country_codeincludes.places.countryexpansions=geo.place_id&place.fields=country문자열
location.twitter_place_typeincludes.places.place_typeexpansions=geo.place_id&place.fields=place_type문자열
location.twitter_country_codeincludes.places.country_codeexpansions=geo.place_id&place.fields=country_code문자열
location.geoincludes.places.geoexpansions=geo.place_id&place.fields=geo객체
location.geo.typeincludes.places.geo.typeexpansions=geo.place_id&place.fields=geo문자열
location.geo.coordinatesincludes.places.geo.bboxexpansions=geo.place_id&place.fields=geo배열
제공되지 않음includes.places.geo.propertiesexpansions=geo.place_id&place.fields=geo객체

미디어 객체

Activity Streams 포맷Twitter v2 형식필수 v2 파라미터v2의 type
twitter_entities.media OR twitter_extended_entities.mediaincludes.mediaexpansions=attachments.media_keys객체 배열
twitter_entities.media.id_str OR twitter_extended_entities.media.id_strincludes.media.media_keyexpansions=attachments.media_keys문자열
twitter_entities.media.id OR twitter_extended_entities.media.id제공되지 않음제공되지 않음
twitter_entities.media.indices OR twitter_extended_entities.media.indices제공되지 않음제공되지 않음
twitter_entities.media.additional_media_info OR twitter_extended_entities.media.additional_media_info제공되지 않음제공되지 않음
twitter_entities.media.additional_media_info.monetizable OR twitter_extended_entities.media.additional_media_info.monetizable제공되지 않음제공되지 않음
twitter_entities.media.media_url OR twitter_extended_entities.media.media_url제공되지 않음제공되지 않음
twitter_entities.media.media_url_https OR twitter_extended_entities.media.media_url_httpsincludes.media.preview_image_urlexpansions=attachments.media_keys&media.fields=preview_image_url문자열
twitter_entities.media.url OR twitter_extended_entities.media.url제공되지 않음제공되지 않음
twitter_entities.media.display_url OR twitter_extended_entities.media.display_url제공되지 않음제공되지 않음
twitter_entities.media.expanded_url OR twitter_extended_entities.media.expanded_url제공되지 않음제공되지 않음
twitter_entities.media.type OR twitter_extended_entities.media.typeincludes.media.typeexpansions=attachments.media_keys문자열
twitter_entities.media.sizes OR twitter_extended_entities.media.sizes제공되지 않음제공되지 않음
twitter_entities.media.sizes.thumb OR twitter_extended_entities.media.sizes.thumb제공되지 않음제공되지 않음
twitter_entities.media.sizes.thumb.h OR twitter_extended_entities.media.sizes.thumb.h제공되지 않음제공되지 않음
twitter_entities.media.sizes.thumb.w OR twitter_extended_entities.media.sizes.thumb.w제공되지 않음제공되지 않음
twitter_entities.media.sizes.thumb.resize OR twitter_extended_entities.media.sizes.thumb.resize제공되지 않음제공되지 않음
twitter_entities.media.sizes.small OR twitter_extended_entities.media.sizes.small제공되지 않음제공되지 않음
twitter_entities.media.sizes.small.h OR twitter_extended_entities.media.sizes.small.h제공되지 않음제공되지 않음
twitter_entities.media.sizes.small.w OR twitter_extended_entities.media.sizes.small.w제공되지 않음제공되지 않음
twitter_entities.media.sizes.small.resize OR twitter_extended_entities.media.sizes.small.resize제공되지 않음제공되지 않음
twitter_entities.media.sizes.medium OR twitter_extended_entities.media.sizes.medium제공되지 않음제공되지 않음
twitter_entities.media.sizes.medium.h OR twitter_extended_entities.media.sizes.medium.h제공되지 않음제공되지 않음
twitter_entities.media.sizes.medium.w OR twitter_extended_entities.media.sizes.medium.w제공되지 않음제공되지 않음
twitter_entities.media.sizes.medium.resize OR twitter_extended_entities.media.sizes.medium.resize사용할 수 없음사용할 수 없음
twitter_entities.media.sizes.large OR twitter_extended_entities.media.sizes.large사용할 수 없음사용할 수 없음
twitter_entities.media.sizes.large.h OR twitter_extended_entities.media.sizes.large.hincludes.media.heightexpansions=attachments.media_keys&media.fields=heightInt
twitter_entities.media.sizes.large.w OR twitter_extended_entities.media.sizes.large.wincludes.media.widthexpansions=attachments.media_keys&media.fields=widthInt
twitter_entities.media.sizes.large.resize OR twitter_extended_entities.media.sizes.large.resize사용할 수 없음사용할 수 없음
twitter_extended_entities.media.video_info사용할 수 없음사용할 수 없음
twitter_extended_entities.media.video_info.aspect_ratio사용할 수 없음사용할 수 없음
twitter_extended_entities.media.video_info.duration_millisincludes.media.duration_msexpansions=attachments.media_keys&media.fields=duration_msInt
twitter_extended_entities.media.video_info.variants사용할 수 없음사용할 수 없음
twitter_extended_entities.media.video_info.variants.bitrate사용할 수 없음사용할 수 없음
twitter_extended_entities.media.video_info.variants.content_type사용할 수 없음사용할 수 없음
twitter_extended_entities.media.video_info.variants.url사용할 수 없음사용할 수 없음
사용할 수 없음includes.media.alt_textexpansions=attachments.media_keys&media.fields=alt_text문자열
지원되지 않음includes.media.public_metricsexpansions=attachments.media_keys&media.fields=public_metrics객체
지원되지 않음includes.media.public_metrics.view_countexpansions=attachments.media_keys&media.fields=public_metrics정수
지원되지 않음includes.media.non_public_metricsexpansions=attachments.media_keys&media.fields=non_public_metrics객체
지원되지 않음includes.media.non_public_metrics.playback_0_countexpansions=attachments.media_keys&media.fields=non_public_metrics정수
지원되지 않음includes.media.non_public_metrics.playback_25_countexpansions=attachments.media_keys&media.fields=non_public_metrics정수
지원되지 않음includes.media.non_public_metrics.playback_50_countexpansions=attachments.media_keys&media.fields=non_public_metrics정수
지원되지 않음includes.media.non_public_metrics.playback_75_countexpansions=attachments.media_keys&media.fields=non_public_metrics정수
지원되지 않음includes.media.non_public_metrics.playback_100_countexpansions=attachments.media_keys&media.fields=non_public_metrics정수
지원되지 않음includes.media.organic_metricsexpansions=attachments.media_keys&media.fields=organic_metrics객체
제공되지 않음includes.media.organic_metrics.playback_0_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.organic_metrics.playback_25_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.organic_metrics.playback_50_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.organic_metrics.playback_75_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.organic_metrics.playback_100_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.organic_metrics.view_countexpansions=attachments.media_keys&media.fields=organic_metrics정수
제공되지 않음includes.media.promoted_metricsexpansions=attachments.media_keys&media.fields=promoted_metrics객체
제공되지 않음includes.media.promoted_metrics.playback_0_countexpansions=attachments.media_keys&media.fields=promoted_metrics정수
제공되지 않음includes.media.promoted_metrics.playback_25_countexpansions=attachments.media_keys&media.fields=promoted_metrics정수
제공되지 않음includes.media.promoted_metrics.playback_50_countexpansions=attachments.media_keys&media.fields=promoted_metrics정수
제공되지 않음includes.media.promoted_metrics.playback_75_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
제공되지 않음includes.media.promoted_metrics.playback_100_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt
제공되지 않음includes.media.promoted_metrics.view_countexpansions=attachments.media_keys&media.fields=promoted_metricsInt

매칭 규칙 객체

Activity Streams 형식Twitter v2 형식필수 v2 매개변수v2에서의 type
gnip.matching_rulesmatching_rules필터링된 스트림에서 기본값객체 배열
gnip.matching_rules.tagmatching_rules.tag필터링된 스트림에서 기본값문자열
gnip.matching_rules.tag.id제공되지 않음제공되지 않음
gnip.matching_rules.tag.id_strmatching_rules.id필터링된 스트림에서 기본값문자열

시각적 데이터 포맷 마이그레이션 도구

시각적 데이터 포맷 마이그레이션 도구는 웹 애플리케이션으로, 특정 Tweet 또는 user 객체에 대해 X API v1.1 데이터 포맷에서 X API v2 포맷으로 매핑되는 필드를 시각적으로 보여줍니다. 이 매핑을 확인하려면 애플리케이션에 Tweet ID 또는 user ID를 입력하면 됩니다. 이 앱을 사용하려면 Twitter 계정으로 로그인해야 합니다.