Tweet Annotations
Overview
Annotations have been added to the Post object from all v2 endpoints that return a Post object. Post annotations offer a way to understand contextual information about the Post itself. Though 100% of Posts are reviewed, due to the contents of Post text, only a portion are annotated.
-
Entity annotations (NER): Entities include people, places, products, and organizations, and are delivered in the
entity
payload section. They are programmatically assigned based on what is explicitly mentioned (named-entity recognition) in the Post text. -
Context annotations: Derived from analyzing a Post’s text, context annotations include a domain and entity pairing to help discover Posts on topics that may have been previously difficult to surface. We currently use 80+ domains to categorize Posts. A CSV file of available context annotation entities is available in our Github repository.
Post Annotation Types
Entities
Entity annotations are programmatically defined entities within the entities
field and are reflected as annotations in the payload. Each annotation has a confidence score and indicates where in the Post text the entities were identified (using start
and end
fields).
The entity annotation types include:
- Person - Examples: Barack Obama, Daniel, George W. Bush
- Place - Examples: Detroit, Cali, San Francisco
- Product - Examples: Mountain Dew, Mozilla Firefox
- Organization - Examples: Chicago White Sox, IBM
- Other - Examples: Diabetes, Super Bowl 50
Context
Last updated: June 2022
Context annotations are delivered in the context_annotations
field of the payload. They are inferred based on semantic analysis of keywords, hashtags, handles, etc., in the Post text and result in domain and/or entity labels. Currently, we use 80+ domains, as shown in the table below.
Domain Categories | Domain Codes |
---|---|
3: TV Shows | 46: Brand Category |
4: TV Episodes | 47: Brand |
6: Sports Events | 48: Product |
10: Person | 54: Musician |
11: Sport | 55: Music Genre |
12: Sports Team | 56: Actor |
13: Place | 58: Entertainment Personality |
22: TV Genres | 60: Athlete |
23: TV Channels | 65: Interests and Hobbies Vertical |
26: Sports League | 66: Interests and Hobbies Category |
27: American Football Game | 67: Interests and Hobbies |
28: NFL Football Game | 68: Hockey Game |
29: Events | 71: Video Game |
31: Community | 78: Video Game Publisher |
35: Politicians | 79: Video Game Hardware |
38: Political Race | 83: Cricket Match |
39: Basketball Game | 84: Book |
40: Sports Series | 85: Book Genre |
43: Soccer Match | 86: Movie |
44: Baseball Game | 87: Movie Genre |
45: Brand Vertical | 88: Political Body |
46: Brand Category | 89: Music Album |
47: Brand | 90: Radio Station |
48: Product | 91: Podcast |
54: Musician | 92: Sports Personality |
55: Music Genre | 93: Coach |
56: Actor | 94: Journalist |
58: Entertainment Personality | 95: TV Channel [Entity Service] |
60: Athlete | 109: Reoccurring Trends |
65: Interests and Hobbies Vertical | 110: Viral Accounts |
66: Interests and Hobbies Category | 114: Concert |
67: Interests and Hobbies | 115: Video Game Conference |
68: Hockey Game | 116: Video Game Tournament |
71: Video Game | 117: Movie Festival |
78: Video Game Publisher | 118: Award Show |
79: Video Game Hardware | 119: Holiday |
83: Cricket Match | 120: Digital Creator |
84: Book | 122: Fictional Character |
85: Book Genre | 130: Multimedia Franchise |
86: Movie | 131: Unified Twitter Taxonomy |
87: Movie Genre | 136: Video Game Personality |
88: Political Body | 137: eSports Team |
89: Music Album | 138: eSports Player |
90: Radio Station | 139: Fan Community |
91: Podcast | 149: Esports League |
92: Sports Personality | 152: Food |
93: Coach | 155: Weather |
94: Journalist | 156: Cities |
95: TV Channel [Entity Service] | 157: Colleges & Universities |
109: Reoccurring Trends | 158: Points of Interest |
110: Viral Accounts | 159: States |
114: Concert | 160: Countries |
115: Video Game Conference | 162: Exercise & Fitness |
116: Video Game Tournament | 163: Travel |
117: Movie Festival | 164: Fields of Study |
118: Award Show | 165: Technology |
119: Holiday | 166: Stocks |
120: Digital Creator | 167: Animals |
122: Fictional Character | 171: Local News |
130: Multimedia Franchise | 172: Global TV Show |
131: Unified Twitter Taxonomy | 173: Google Product Taxonomy |
136: Video Game Personality | 174: Digital Assets & Crypto |
137: eSports Team | 175: Emergency Events |
138: eSports Player |
Note: Domain 131 (Unified Twitter Taxonomy) refers to X’s User Facing Interest Taxonomy. This taxonomy helps to power features on the platform such as Topics.
Requesting Annotations
Sample Request
Sample Response
Sample App
Check out the Post Entity Extractor on Glitch to easily discover context annotations in Posts and see how this feature works.
Frequently asked questions
Context annotations
The questions below are specific to the context annotations element of Tweet annotations. For more details, please see the Overview page.