User highlights
Tweets the user has added to the Highlights tab of their profile, newest first.
/user/{userId}/highlightsParameters
userIdpath · string · requiredNumeric user ID (digits only, up to 30). To pass a handle instead, use -1 here and set username.
usernamequery · string · optionalHandle, with or without @. When set, it is used instead of userId: the API looks up the ID first, which makes the call a little slower. Still one billed call.
countquery · integer · optional · default 20Number of tweets to ask X for, 1 to 100. Other values fall back to 20. X treats it as a hint.
cursorquery · string · optionalBottom cursor from the previous page. Leave it out for the first page. See Pagination.
Paginated: pass the bottom cursor of one page as cursor to get the next. Each page is one billed call. See Pagination.
Example request
curl 'https://api.twittrapi.com/user/12/highlights?count=20' \
--header 'X-API-KEY: YOUR_API_KEY'import httpx
# No SDK method for this endpoint yet, so this is a plain HTTP call.
resp = httpx.get(
"https://api.twittrapi.com/user/12/highlights",
headers={"X-API-KEY": "YOUR_API_KEY"},
params={
"count": "20",
},
timeout=60,
)
data = resp.json()import { TwittrAPI } from "twittrapi";
const client = new TwittrAPI({ apiKey: process.env.TWITTRAPI_API_KEY });
// No wrapper method for this endpoint yet; client.get() sends the same authenticated GET.
const data = await client.get({
path: "/user/12/highlights",
query: {
count: "20",
},
});curl 'https://twitter-aio.p.rapidapi.com/user/12/highlights?count=20' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
--header 'x-rapidapi-host: twitter-aio.p.rapidapi.com'Base URL https://api.twittrapi.com, key in the X-API-KEY header. Python and Node.js use the official SDKs.
Response
Raw JSON of X's UserHighlightsTweets query. Entries are in data.user.result.timeline.timeline.instructions. Empty for accounts without highlights.
Simple format (?format=simple or X-Response-Format: simple): Collection of Tweet objects: {data: [Tweet], nextCursor, previousCursor, hasNextPage}. Schema.
{
"data": {
"user": {
"result": {
"__typename": "User",
"timeline": {
"timeline": {
"instructions": [
{
"type": "TimelineClearCache"
},
{
"entries": [
{
"content": {
"__typename": "TimelineTimelineItem",
"clientEventInfo": {
"component": "highlights",
"element": "tweet"
},
"entryType": "TimelineTimelineItem",
"itemContent": {
"__typename": "TimelineTweet",
"itemType": "TimelineTweet",
"tweetDisplayType": "Tweet",
"tweet_results": {
"result": {
"__typename": "Tweet",
"card": {
"legacy": {
"binding_values": [
{
"key": "broadcast_url",
"value": {
"string_value": "https://x.com/i/broadcasts/2ReRnqpjqpWXrW",
"type": "STRING"
}
},
{
"key": "broadcast_width",
"value": {
"string_value": "3840",
"type": "STRING"
}
},
{
"key": "broadcast_state",
"value": {
"string_value": "ENDED",
"type": "STRING"
}
},
{
"key": "site",
"value": {
"scribe_key": "publisher_id",
"type": "USER",
"user_value": {
"id_str": "11348282",
"path": []
}
}
},
{
"key": "broadcast_title",
"value": {
"string_value": "NASA's Northrop Grumman Commercial Resupply Services 25 Launch",
"type": "STRING"
}
},
{
"key": "broadcast_source",
"value": {
"string_value": "LiveCms",
"type": "STRING"
}
},
{
"key": "broadcast_orientation",
"value": {
"string_value": "0",
"type": "STRING"
}
},
{
"key": "broadcast_id",
"value": {
"string_value": "2ReRnqpjqpWXrW",
"type": "STRING"
}
},
{
"key": "broadcast_thumbnail_small",
"value": {
"image_value": {
"height": 202,
"url": "https://pbs.twimg.com/card_img/2127074066561658880/usBRZHge?format=jpg&name=386x202",
"width": 386
},
"type": "IMAGE"
}
},
{
"key": "broadcaster_twitter_id",
"value": {
"string_value": "11348282",
"type": "STRING"
}
},
{
"key": "broadcast_height",
"value": {
"string_value": "2160",
"type": "STRING"
}
},
{
"key": "broadcast_thumbnail_original",
"value": {
"image_value": {
"height": 2160,
"url": "https://pbs.twimg.com/card_img/2127074066561658880/usBRZHge?format=jpg&name=orig",
"width": 3840
},
"type": "IMAGE"
}
},
{
"key": "broadcaster_username",
"value": {
"string_value": "NASA",
"type": "STRING"
}
},
{
"key": "broadcast_media_key",
"value": {
"string_value": "28_2127061519821144064",
"type": "STRING"
}
},
{
"key": "broadcast_thumbnail_x_large",
"value": {
"image_value": {
"height": 1152,
"url": "https://pbs.twimg.com/card_img/2127074066561658880/usBRZHge?format=png&name=2048x2048_2_exp",
"width": 2048
},
"type": "IMAGE"
}
},
{
"key": "broadcaster_display_name",
"value": {
"string_value": "NASA",
"type": "STRING"
}
},
{
"key": "broadcast_is_high_latency",
"value": {
"boolean_value": true,
"type": "BOOLEAN"
}
},
{
"key": "broadcast_thumbnail",
"value": {
"image_value": {
"height": 314,
"url": "https://pbs.twimg.com/card_img/2127074066561658880/usBRZHge?format=jpg&name=600x314",
"width": 600
},
"type": "IMAGE"
}
},
{
"key": "broadcast_thumbnail_color",
"value": {
"image_color_value": {
"palette": [
{
"percentage": 92.96,
"rgb": {
"blue": 30,
"green": 31,
"red": 30
}
},
{
"percentage": 4.49,
"rgb": {
"blue": 150,
"green": 54,
"red": 18
}
},
{
"percentage": 0.66,
"rgb": {
"blue": 211,
"green": 197,
"red": 196
}
},
{
"percentage": 0.46,
"rgb": {
"blue": 81,
"green": 41,
"red": 22
}
},
{
"percentage": 0.22,
"rgb": {
"blue": 59,
"green": 18,
"red": 190
}
}
]
},
"type": "IMAGE_COLOR"
}
},
{
"key": "broadcast_media_id",
"value": {
"string_value": "2127061519821144064",
"type": "STRING"
}
},
{
"key": "card_url",
"value": {
"scribe_key": "card_url",
"string_value": "https://t.co/7PSFsymg4N",
"type": "STRING"
}
},
{
"key": "broadcast_thumbnail_large",
"value": {
"image_value": {
"height": 419,
"url": "https://pbs.twimg.com/card_img/2127074066561658880/usBRZHge?format=jpg&name=800x419",
"width": 800
},
"type": "IMAGE"
}
}
],
"card_platform": {
"platform": {
"audience": {
"name": "production"
},
"device": {
"name": "Swift",
"version": "12"
}
}
},
"name": "745291183405076480:broadcast",
"url": "https://t.co/7PSFsymg4N",
"user_refs_results": [
{
"result": {
"__typename": "User",
"action_counts": {
"favorites_count": 17128
},
"affiliates_highlighted_label": {},
"avatar": {
"image_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg"
},
"banner": {
"image_url": "https://pbs.twimg.com/profile_banners/11348282/1788992290"
},
"core": {
"created_at": "Wed Dec 19 20:20:32 +0000 2007",
"name": "NASA",
"screen_name": "NASA"
},
"follow_request_sent": false,
"has_graduated_access": true,
"id": "VXNlcjoxMTM0ODI4Mg==",
"is_blue_verified": true,
"location": {
"location": "Pale Blue Dot"
},
"media_permissions": {
"can_media_tag": true
},
"notifications_settings": {
"notifications_enabled": false
},
"parody_commentary_fan_label": "None",
"pinned_items": {},
"possibly_sensitive": false,
"privacy": {
"protected": false
},
"profile_bio": {
"description": "Making the seemingly impossible, possible. ✨",
"entities": {
"description": {},
"url": {
"urls": [
{
"display_url": "nasa.gov",
"expanded_url": "http://www.nasa.gov/",
"indices": [
0,
23
],
"url": "https://t.co/9NkQJKAnuU"
}
]
}
}
},
"profile_description_language": "en",
"profile_image_shape": "Square",
"profile_metadata": {
"profile_interstitial_type": ""
},
"profile_translation": {
"translator_type": "regular"
},
"relationship_counts": {
"followers": 92039920,
"following": 115
},
"relationship_perspectives": {
"blocked_by": false,
"blocking": false,
"followed_by": false,
"following": false,
"live_following": false,
"muting": false
},
"rest_id": "11348282",
"super_follow_eligible": false,
"super_followed_by": false,
"super_following": false,
"tweet_counts": {
"media_tweets": 28269,
"tweets": 74595
},
"verification": {
"verified": false,
"verified_type": "Government"
},
"website": {
"url": "https://t.co/9NkQJKAnuU"
},
"legacy": {
"blocked_by": false,
"blocking": false,
"can_media_tag": true,
"created_at": "Wed Dec 19 20:20:32 +0000 2007",
"default_profile_image": false,
"description": "Making the seemingly impossible, possible. ✨",
"entities": {
"description": {},
"url": {
"urls": [
{
"display_url": "nasa.gov",
"expanded_url": "http://www.nasa.gov/",
"indices": [
0,
23
],
"url": "https://t.co/9NkQJKAnuU"
}
]
}
},
"fast_followers_count": 0,
"favourites_count": 17128,
"follow_request_sent": false,
"followed_by": false,
"followers_count": 92039920,
"following": false,
"friends_count": 115,
"is_translator": false,
"location": "Pale Blue Dot",
"media_count": 28269,
"muting": false,
"name": "NASA",
"needs_phone_verification": false,
"normal_followers_count": 92039920,
"notifications": false,
"possibly_sensitive": false,
"profile_banner_url": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",{
"data": [
{
"id": "2127061613651915028",
"url": "https://x.com/NASA/status/2127061613651915028",
"text": "LIVE: We're sending science, supplies, holiday cookies, and much more to the @Space_Station. @NorthropGrumman's Cygnus XL cargo spacecraft is scheduled to lift off at 10:47am ET (1547 UTC). https://x.com/i/broadcasts/2ReRnqpjqpWXrW",
"createdAt": "2026-11-29T15:26:22Z",
"lang": "en",
"author": {
"id": "11348282",
"username": "NASA",
"name": "NASA",
"description": "Making the seemingly impossible, possible. ✨",
"location": "Pale Blue Dot",
"url": "http://www.nasa.gov/",
"createdAt": "2007-12-19T20:20:32Z",
"avatarUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB.jpg",
"bannerUrl": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"verified": true,
"verifiedType": "Government",
"protected": false,
"counts": {
"followers": 92039920,
"following": 115,
"tweets": 74595,
"likes": 17128,
"media": 28269,
"listed": 0
},
"pinnedTweetIds": [],
"isAutomated": false
},
"counts": {
"likes": 1884,
"retweets": 295,
"replies": 155,
"quotes": 30,
"bookmarks": 87,
"views": 657203
},
"media": [],
"urls": [
"https://x.com/i/broadcasts/2ReRnqpjqpWXrW"
],
"hashtags": [],
"mentions": [
{
"id": "1451773004",
"username": "Space_Station"
},
{
"id": "15840909",
"username": "northropgrumman"
}
],
"replyTo": null,
"quoted": null,
"retweetOf": null,
"conversationId": "2127061613651915028",
"isPinned": false,
"source": null,
"article": null
},
{
"id": "2125167587264770208",
"url": "https://x.com/NASA/status/2125167587264770208",
"text": "LIVE: An uncrewed Progress cargo spacecraft carrying food, fuel, and supplies is about to lift off on a two-day journey to the @Space_Station. Launch is scheduled for 5:17am ET (1017 UTC). https://x.com/i/broadcasts/2OdRLXzWgOzBYK",
"createdAt": "2026-11-24T10:00:11Z",
"lang": "en",
"author": {
"id": "11348282",
"username": "NASA",
"name": "NASA",
"description": "Making the seemingly impossible, possible. ✨",
"location": "Pale Blue Dot",
"url": "http://www.nasa.gov/",
"createdAt": "2007-12-19T20:20:32Z",
"avatarUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB.jpg",
"bannerUrl": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"verified": true,
"verifiedType": "Government",
"protected": false,
"counts": {
"followers": 92039920,
"following": 115,
"tweets": 74595,
"likes": 17128,
"media": 28269,
"listed": 0
},
"pinnedTweetIds": [],
"isAutomated": false
},
"counts": {
"likes": 1616,
"retweets": 238,
"replies": 120,
"quotes": 19,
"bookmarks": 72,
"views": 783154
},
"media": [],
"urls": [
"https://x.com/i/broadcasts/2OdRLXzWgOzBYK"
],
"hashtags": [],
"mentions": [
{
"id": "1451773004",
"username": "Space_Station"
}
],
"replyTo": null,
"quoted": null,
"retweetOf": null,
"conversationId": "2125167587264770208",
"isPinned": false,
"source": null,
"article": null
}
],
"nextCursor": "DAAHCgABHYXYmXi__-wLAAIAAAATMTg3NjQ5NDY1NjMyMzA2MzM0NAgAAwAAAAIAAA",
"previousCursor": "DAAHCgABHYXYmXjAJxELAAIAAAATMTg4MzIwNjg3NDU2MzM4NDMyMwgAAwAAAAEAAA",
"hasNextPage": true
}In the raw format, field names and nesting come from X and can change without notice. See Response format; the simple format keeps a fixed schema.
Errors
- 422userId is not numeric, or the username lookup failed.
- 400userId is -1 and username is missing, or the username contains characters X blocks.
- 404The user could not be found.
Errors every endpoint can return (401, 402, 403, 404, 408, 409, 429, 5xx), and which of them are charged, are on the Errors page. Calls that fail with 400, 407, 408, 409 or a 5xx error are refunded.