Skip to content

Commit 553cca1

Browse files
committed
add public_metrics.bookmarkcount and non_public_metrics.engagements
1 parent 39230e2 commit 553cca1

File tree

5 files changed

+27
-10
lines changed

5 files changed

+27
-10
lines changed

x-api/fundamentals/data-dictionary.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ Use `tweet.fields` to request additional fields and `expansions` to include rela
5656
| **geo** | object | Indicates the location or place of a geo-tagged Tweet. | Use this to determine get location of a geo-tagged Tweet. |
5757
| **in_reply_to_user_id** | string | If the represented Tweet is a reply, this field will contain the original Tweet’s author ID. | Determine if a Tweet was in reply to another Tweet. |
5858
| **lang** | string | Language of the Tweet, if detected by Twitter. | Classify Tweets by spoken language. |
59-
| **non_public_metrics** | object | Non-public engagement metrics for the Tweet at the time of the request. Requires user context authentication. | Determine total impressions generated for the Tweet. |
59+
| **non_public_metrics** | object | Non-public engagement metrics for the Tweet at the time of the request. Requires user context authentication. Includes `impression_count`, `user_profile_clicks`, `url_link_clicks`, and `engagements`. | Determine total impressions and engagement generated for the Tweet. |
6060
| **note_tweet** | object | Contains the full text of a Post for long-form Posts (>280 characters). | Get the complete text of a post. |
6161
| **organic_metrics** | object | Engagement metrics, tracked in an organic context, for the Tweet at the time of the request. Requires user context authentication. | Measure organic engagement for the Tweet. |
6262
| **possibly_sensitive** | boolean | Indicates if the content may be recognized as sensitive. | Study circulation of certain types of content. |
6363
| **promoted_metrics** | object | Engagement metrics, tracked in a promoted context, for the Tweet at the time of the request. Requires user context authentication. | Measure engagement for the Tweet when it was promoted. |
64-
| **public_metrics** | object | Public engagement metrics for the Tweet at the time of the request. | Measure Tweet engagement. |
64+
| **public_metrics** | object | Public engagement metrics for the Tweet at the time of the request. Includes `retweet_count`, `reply_count`, `like_count`, `quote_count`, `impression_count`, and `bookmark_count`. | Measure Tweet engagement. |
6565
| **referenced_tweets** | array | A list of Tweets this Tweet refers to, such as Retweets, quoted Tweets, or replies. | Understand conversational aspects of retweets, etc. |
6666
| **reply_settings** | string | Shows who can reply to a given Tweet. Options are "everyone", "mentioned_users", and "followers". | Determine conversation reply settings for the Tweet. |
6767
| **withheld** | object | Contains withholding details for [withheld content](https://help.x.com/en/rules-and-policies/tweet-withheld-by-country). | |
@@ -130,7 +130,9 @@ curl --request GET 'https://api.x.com/2/tweets?ids=1212092628029698048&tweet.fie
130130
"retweet_count": 7,
131131
"reply_count": 3,
132132
"like_count": 38,
133-
"quote_count": 1
133+
"quote_count": 1,
134+
"bookmark_count": 2,
135+
"impression_count": 1250
134136
},
135137
"context_annotations": [
136138
{
@@ -305,7 +307,9 @@ curl --request GET 'https://api.x.com/2/tweets?ids=1212092628029698048&tweet.fie
305307
"retweet_count": 2,
306308
"reply_count": 1,
307309
"like_count": 19,
308-
"quote_count": 0
310+
"quote_count": 0,
311+
"bookmark_count": 0,
312+
"impression_count": 430
309313
},
310314
"created_at": "2019-12-31T19:26:16.000Z",
311315
"possibly_sensitive": false

x-api/fundamentals/fields.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ Response:
6262
"retweet_count": 10,
6363
"reply_count": 5,
6464
"like_count": 100,
65-
"quote_count": 2
65+
"quote_count": 2,
66+
"bookmark_count": 3,
67+
"impression_count": 1500
6668
}
6769
}
6870
}
@@ -176,7 +178,7 @@ media.fields=url,preview_image_url,alt_text,public_metrics
176178
## Important notes
177179

178180
<Warning>
179-
**You cannot request subfields.** When you request `public_metrics`, you get all metrics (likes, reposts, replies, quotes). You can't request just `public_metrics.like_count`.
181+
**You cannot request subfields.** When you request `public_metrics`, you get all metrics (likes, reposts, replies, quotes, bookmarks, impressions). You can't request just `public_metrics.like_count`.
180182
</Warning>
181183

182184
- Field order in responses may differ from request order

x-api/fundamentals/metrics.mdx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ The X API provides engagement metrics for posts and media. Access public metrics
3535
| Likes | Public | `public_metrics.like_count` |
3636
| Replies | Public | `public_metrics.reply_count` |
3737
| Impressions | Public | `public_metrics.impression_count` |
38+
| Bookmarks | Public | `public_metrics.bookmark_count` |
3839
| URL clicks | Non-public | `non_public_metrics.url_link_clicks` |
3940
| Profile clicks | Non-public | `non_public_metrics.user_profile_clicks` |
41+
| Engagements | Non-public | `non_public_metrics.engagements` |
4042

4143
### Media metrics (videos)
4244

@@ -71,7 +73,9 @@ Response:
7173
"retweet_count": 50,
7274
"reply_count": 12,
7375
"like_count": 234,
74-
"quote_count": 5
76+
"quote_count": 5,
77+
"bookmark_count": 8,
78+
"impression_count": 5432
7579
}
7680
}
7781
}
@@ -96,7 +100,8 @@ Response:
96100
"non_public_metrics": {
97101
"impression_count": 5432,
98102
"url_link_clicks": 89,
99-
"user_profile_clicks": 156
103+
"user_profile_clicks": 156,
104+
"engagements": 345
100105
},
101106
"organic_metrics": {
102107
"impression_count": 5432,
@@ -188,6 +193,10 @@ Number of reposts (retweets). Does not include quote posts.
188193
Number of quote posts (reposts with comment). These are always organic.
189194
</Accordion>
190195

196+
<Accordion title="Bookmark count">
197+
Number of times the post has been bookmarked by users.
198+
</Accordion>
199+
191200
<Accordion title="Video views">
192201
Aggregated across all posts containing the video. A video reposted in multiple posts has one total view count.
193202
</Accordion>

x-api/posts/timelines/integrate.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ Available for all Posts with App-Only or User Context authentication:
287287
"retweet_count": 156,
288288
"reply_count": 23,
289289
"like_count": 892,
290-
"quote_count": 12
290+
"quote_count": 12,
291+
"bookmark_count": 34,
292+
"impression_count": 15200
291293
}
292294
}
293295
```

x-api/posts/timelines/migrate/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The following tables compare the standard v1.1 and X API v2 home timeline endpoi
3535
| Timeline navigation options | since_id (exclusive) used for update polling<br/><br/>`max_id` (inclusive) | `start_time`<br/><br/>end_time<br/><br/>`since_id`(exclusive) used for update polling <br/><br/>`until_id` (exclusive) |
3636
| Optional parameters for results refinement | `count`<br/><br/>`exclude_replies`<br/><br/>`include_rts`<br/><br/>`trim_user`<br/><br/>`tweet_mode`<br/><br/>`since_id`<br/><br/>`max_id` | `max_results`<br/><br/>`exclude`(retweets,replies)<br/><br/>`tweet.fields`<br/><br/>`user.fields`<br/><br/>`place.fields`<br/><br/>`media.fields`<br/><br/>`poll.fields`<br/><br/>`expansions`<br/><br/>`start_time`<br/><br/>`end_time`<br/><br/>`since_id`<br/><br/>`until_id` |
3737
| Supports requesting and receiving [annotations](/x-api/fundamentals/post-annotations) | N/A | If annotations are included in tweet.fields, results will be annotated with inferred annotation data based on the Post text, such as 'Music Genre' and 'Folk Music' or 'Musician' and 'Dolly Parton' |
38-
| Supports requesting and receiving specific Post [metrics](/x-api/fundamentals/metrics) | N/A | If annotations are included in `tweet.fields`, results will be annotated with public_metrics per Post including `retweet_count`, `reply_count`, `quote_count` and `like_count`, `non_public_metrics` , including `impression_count`, `user_profile_clicks`, `url_link_clicks`.<br/><br/>Additional media metrics such as view_count and video playback metrics.<br/><br/>Additional organic\_metrics and promoted\_metrics available with User Context for promoted Posts. |
38+
| Supports requesting and receiving specific Post [metrics](/x-api/fundamentals/metrics) | N/A | If annotations are included in `tweet.fields`, results will be annotated with public_metrics per Post including `retweet_count`, `reply_count`, `quote_count`, `like_count`, `impression_count`, and `bookmark_count`, `non_public_metrics` including `impression_count`, `user_profile_clicks`, `url_link_clicks`, and `engagements`.<br/><br/>Additional media metrics such as view_count and video playback metrics.<br/><br/>Additional organic\_metrics and promoted\_metrics available with User Context for promoted Posts. |
3939
| Supports requesting and receiving [conversation_id](/x-api/fundamentals/conversation-id) | N/A | Returns a conversation_id field where the value represents the first published Post in a reply thread to help you track conversations. |
4040
| Post JSON format | [Standard v1.1 data format](https://developer.x.com/en/docs/twitter-api/v1/data-dictionary/overview.html) | [X API v2](/x-api/fundamentals/data-dictionary) format (determined by fields and expansions request parameters, not backward-compatible with v1.1 formats)<br/><br/>To learn more about how to migrate from the Standard v1.1 format to the X API v2 format, please visit our [data formats migration guide](/x-api/migrate/data-format-migration). |
4141
| Results order | Reverse chronological | Reverse chronological |

0 commit comments

Comments
 (0)