Skip to main content

Twitter — client.twitter

Available Fields

User Fields

Pass these in the options.fields parameter on any user method. Default: id, username, name
CategoryFields
Identityid, username, name, description, location, profileImageUrl, profileBannerUrl
Verificationverified, isVerified, verifiedType, verifiedSinceDatetime
MetricsfollowersCount, followingCount, tweetCount, listedCount, likesCount, mediaCount
MetadatapinnedTweetId, source, label, labelType, accountBasedIn, locationAccurate
HistoryusernameChanges, lastUsernameChangeDatetime, createdAt
getUsersByKeywords also returns aggregation fields: aggRelevance, relevantTweetsCount, relevantTweetsImpressionsSum, relevantTweetsLikesSum, relevantTweetsQuotesSum, relevantTweetsRepliesSum, relevantTweetsRetweetsSum.

Post Fields

Pass these in the options.fields parameter on any post method. Default: id, text, authorUsername, createdAtDate
CategoryFields
Coreid, text, authorId, authorUsername, createdAt, createdAtDate
EngagementretweetCount, replyCount, likeCount, quoteCount, impressionCount, bookmarkCount
Metadatalang, possiblySensitive, suspended, deleted, source, isRetweet, hasBirdwatchNotes, status
BirdwatchbirdwatchNotesId, birdwatchNotesText, birdwatchNotesUrl
RelationsconversationId, quotedTweetId, retweetedTweetId, replyToTweetId, replyToUserId, replyToUsername, originalTweetId, editedTweets
Contenthashtags, mentions, mediaUrls, urls, grokGeneratedContent
Locationcountry, region, city
Always specify only the fields you need using the fields parameter. For example, ["id", "text", "retweetCount", "likeCount", "createdAtDate"] for engagement analysis. See Field Selection for details.

getUser

Get a single Twitter user profile.
const user = await client.twitter.getUser("elonmusk");
const user = await client.twitter.getUser("44196397", { identifierType: "id" });
ParameterTypeRequiredDescription
identifierstringYesUsername or user ID
options.identifierType"username" | "id"NoIdentifier type (default: "username")
options.fieldsstring[]NoFields to return
Returns: Promise<TwitterUser>

searchUsers

Search users by name or username.
const users = await client.twitter.searchUsers("elon");
const topFive = await client.twitter.searchUsers("elon", { limit: 5 });
ParameterTypeRequiredDescription
namestringYesName or username to search
options.limitnumberNoMax results (default: 10)
options.fieldsstring[]NoFields to return
Returns: Promise<TwitterUser[]>

getUserConnections

Get followers or following for a user.
const followers = await client.twitter.getUserConnections("elonmusk", "followers");
const following = await client.twitter.getUserConnections("elonmusk", "following");
ParameterTypeRequiredDescription
usernamestringYesTwitter username
connectionType"followers" | "following"YesConnection type
options.fieldsstring[]NoFields to return
Returns: Promise<PaginatedResult<TwitterUser>>

getUsersByKeywords

Find users who authored posts matching a keyword query.
const users = await client.twitter.getUsersByKeywords('"machine learning"', {
  fields: ["username", "name", "followersCount"],
  responseType: ResponseType.Fast,
  limit: 20,
});
ParameterTypeRequiredDescription
querystringYesKeyword query (supports boolean operators)
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.languagestringNoLanguage filter
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<TwitterUser>>

getPostsByIds

Get 1-100 posts by their IDs.
const tweets = await client.twitter.getPostsByIds(["1234567890", "0987654321"]);
ParameterTypeRequiredDescription
postIdsstring[]YesArray of post IDs (max 100)
options.fieldsstring[]NoFields to return
Returns: Promise<TwitterPost[]>

getPostsByAuthor

Get all posts by an author with optional date filtering.
const results = await client.twitter.getPostsByAuthor("elonmusk", {
  startDate: "2025-01-01",
  responseType: ResponseType.Fast,
  limit: 100,
});
ParameterTypeRequiredDescription
identifierstringYesUsername or user ID
options.identifierType"username" | "id"NoIdentifier type (default: "username")
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<TwitterPost>>

searchPosts

Full-text search across Twitter posts with filters.
const results = await client.twitter.searchPosts('"artificial intelligence" AND ethics', {
  startDate: "2025-01-01",
  endDate: "2025-06-01",
  language: "en",
  fields: ["id", "text", "likeCount", "authorUsername", "createdAtDate"],
  responseType: ResponseType.Fast,
  limit: 50,
});
ParameterTypeRequiredDescription
querystringYesSearch query (supports exact phrases, boolean operators, grouping)
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.authorUsernamestringNoFilter by author username
options.authorIdstringNoFilter by author ID
options.languagestringNoLanguage code filter
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<TwitterPost>>

getRetweets

Get retweets of a specific post.
const retweets = await client.twitter.getRetweets("1234567890");
ParameterTypeRequiredDescription
postIdstringYesPost ID
options.fieldsstring[]NoFields to return
Returns: Promise<PaginatedResult<TwitterPost>>

getQuotes

Get quote tweets of a specific post.
const quotes = await client.twitter.getQuotes("1234567890");
ParameterTypeRequiredDescription
postIdstringYesPost ID
options.fieldsstring[]NoFields to return
Returns: Promise<PaginatedResult<TwitterPost>>

getComments

Get replies to a specific post.
const comments = await client.twitter.getComments("1234567890");
ParameterTypeRequiredDescription
postIdstringYesPost ID
options.fieldsstring[]NoFields to return
Returns: Promise<PaginatedResult<TwitterPost>>

getPostInteractingUsers

Get users who interacted with a post.
const commenters = await client.twitter.getPostInteractingUsers("1234567890", "commenters");
ParameterTypeRequiredDescription
postIdstringYesPost ID
interactionType"commenters" | "quoters" | "retweeters"YesInteraction type
options.fieldsstring[]NoFields to return
Returns: Promise<PaginatedResult<TwitterUser>>

countPosts

Count tweets containing a phrase within a date range.
const count = await client.twitter.countPosts("bitcoin", { startDate: "2025-01-01" });
console.log(`${count.toLocaleString()} tweets mention bitcoin`);
ParameterTypeRequiredDescription
phrasestringYesPhrase to count
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
Returns: Promise<number>

Instagram — client.instagram

Available Fields

User Fields

Pass these in the options.fields parameter on any user method. Default: id, username, fullName
CategoryFields
Identityid, username, fullName, biography, profilePicUrl, profilePicId, profileUrl, externalUrl
StatusisPrivate, isVerified, hasAnonymousProfilePicture
MetricsfollowerCount, followingCount, mediaCount
getUsersByKeywords also returns aggregation fields: aggRelevance, relevantPostsCount, relevantPostsLikesSum, relevantPostsCommentsSum, relevantPostsResharesSum, relevantPostsVideoPlaysSum.

Post Fields

Pass these in the options.fields parameter on any post method. Default: id, caption, username, createdAtDate
CategoryFields
Coreid, postType, userId, username, fullName, caption, createdAt, createdAtTimestamp, createdAtDate
EngagementlikeCount, commentCount, reshareCount, videoPlayCount
MediamediaType, codeUrl, imageUrl, videoUrl, audioOnlyUrl, profilePicUrl, videoSubtitlesUri, subtitles, videoDuration

Comment Fields

Pass these in the options.fields parameter on getComments. Default: id, text, username, createdAtDate
CategoryFields
Coreid, text, parentPostId, type, parentCommentId, repliedToCommentId, childCommentCount, userId, username, fullName, createdAt, createdAtTimestamp, createdAtDate
EngagementlikeCount
Statusstatus, isSpam, hasTranslation
Always specify only the fields you need using the fields parameter. See Field Selection for details.

getUser

Get a single Instagram user profile.
const user = await client.instagram.getUser("instagram");
console.log(`${user.fullName}${user.followerCount?.toLocaleString()} followers`);
ParameterTypeRequiredDescription
identifierstringYesUsername or user ID
options.identifierType"username" | "id"NoIdentifier type (default: "username")
options.fieldsstring[]NoFields to return
Returns: Promise<InstagramUser>

searchUsers

Search Instagram users by name.
const users = await client.instagram.searchUsers("nasa");
const topThree = await client.instagram.searchUsers("nasa", { limit: 3 });
ParameterTypeRequiredDescription
namestringYesName to search
options.limitnumberNoMax results
options.fieldsstring[]NoFields to return
Returns: Promise<InstagramUser[]>

getUserConnections

Get followers or following for an Instagram user.
const followers = await client.instagram.getUserConnections("instagram", "followers");
ParameterTypeRequiredDescription
usernamestringYesInstagram username
connectionType"followers" | "following"YesConnection type
options.fieldsstring[]NoFields to return
Returns: Promise<PaginatedResult<InstagramUser>>

getUsersByKeywords

Find users who authored posts matching a keyword query.
const users = await client.instagram.getUsersByKeywords('"sustainable fashion"', {
  responseType: ResponseType.Fast,
  limit: 20,
});
ParameterTypeRequiredDescription
querystringYesKeyword query
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<InstagramUser>>

getPostsByIds

Get Instagram posts by their IDs. Post IDs must be in strong_id format: "media_id_user_id".
const posts = await client.instagram.getPostsByIds(["3606450040306139062_4836333238"]);
ParameterTypeRequiredDescription
postIdsstring[]YesArray of post IDs in strong_id format
options.fieldsstring[]NoFields to return
Returns: Promise<InstagramPost[]>

getPostsByUser

Get all posts by an Instagram user.
const results = await client.instagram.getPostsByUser("nasa", {
  responseType: ResponseType.Fast,
  limit: 50,
});
ParameterTypeRequiredDescription
identifierstringYesUsername or user ID
options.identifierType"username" | "id"NoIdentifier type (default: "username")
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<InstagramPost>>

searchPosts

Full-text search across Instagram posts.
const results = await client.instagram.searchPosts("travel photography", {
  responseType: ResponseType.Fast,
  limit: 30,
});
ParameterTypeRequiredDescription
querystringYesSearch query
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<InstagramPost>>

getComments

Get comments on an Instagram post.
const comments = await client.instagram.getComments("3606450040306139062_4836333238");
ParameterTypeRequiredDescription
postIdstringYesPost ID (strong_id format)
options.fieldsstring[]NoFields to return
Returns: Promise<PaginatedResult<InstagramComment>>

getPostInteractingUsers

Get users who interacted with an Instagram post.
const likers = await client.instagram.getPostInteractingUsers(
  "3606450040306139062_4836333238",
  "likers"
);
ParameterTypeRequiredDescription
postIdstringYesPost ID (strong_id format)
interactionType"commenters" | "likers"YesInteraction type
options.fieldsstring[]NoFields to return
Returns: Promise<PaginatedResult<InstagramUser>>

Reddit — client.reddit

Available Fields

User Fields

Pass these in the options.fields parameter on any user method. Default: id, username, totalKarma
CategoryFields
Identityid, username, profileUrl, profilePicUrl, snoovatarImg, profileDescription, profileBannerUrl, profileTitle
KarmalinkKarma, commentKarma, totalKarma, awardeeKarma, awarderKarma
StatusisGold, isMod, isEmployee, hasVerifiedEmail, isSuspended, verified, isBlocked, acceptFollowers, hasSubscribed
SettingshideFromRobots, prefShowSnoovatar
TimestampscreatedAt, createdAtTimestamp, createdAtDate
getUsersByKeywords also returns aggregation fields: aggRelevance, relevantPostsCount, relevantPostsUpvotesSum, relevantPostsCommentsCountSum.

Post Fields

Pass these in the options.fields parameter on any post method. Default: id, title, authorUsername, subredditName, createdAtDate
CategoryFields
Coreid, title, selftext, url, permalink, postUrl, thumbnail
AuthorauthorId, authorUsername
SubredditsubredditName, subredditId
Engagementscore, upvotes, downvotes, upvoteRatio, commentsCount, crosspostsCount
FlagsisSelf, isVideo, isOriginalContent, over18, spoiler, locked, stickied, archived
MetalinkFlairText, postHint, domain, crosspostParent
TimestampscreatedAt, createdAtTimestamp, createdAtDate

Comment Fields

Pass these in the options.fields parameter on searchComments and getPostWithComments. Default: id, body, authorUsername, createdAtDate
CategoryFields
Coreid, body, parentPostId, parentId
AuthorauthorId, authorUsername
SubredditpostSubredditName, postSubredditId
Engagementscore, upvotes, downvotes, controversiality
Metadepth, isSubmitter, stickied, collapsed, edited, distinguished
TimestampscreatedAt, createdAtTimestamp, createdAtDate

Subreddit Fields

Pass these in the options.fields parameter on any subreddit method. Default: id, displayName, title, subscribersCount
CategoryFields
Coreid, displayName, title, publicDescription, description
StatssubscribersCount, activeUserCount
MetasubredditType, over18, lang, url, subredditUrl
ImagesiconImg, bannerImg, headerImg, communityIcon
TimestampscreatedAt, createdAtTimestamp, createdAtDate
getSubredditsByKeywords also returns aggregation fields: aggRelevance, relevantPostsCount, relevantPostsUpvotesSum, relevantPostsCommentsCountSum.
Always specify only the fields you need using the fields parameter. See Field Selection for details.

getUser

Get a single Reddit user profile.
const user = await client.reddit.getUser("spez");
console.log(`${user.username}${user.totalKarma?.toLocaleString()} karma`);
ParameterTypeRequiredDescription
usernamestringYesReddit username
options.fieldsstring[]NoFields to return
Returns: Promise<RedditUser>

searchUsers

Search Reddit users by name.
const users = await client.reddit.searchUsers("spez");
const topThree = await client.reddit.searchUsers("spez", { limit: 3 });
ParameterTypeRequiredDescription
namestringYesName to search
options.limitnumberNoMax results
options.fieldsstring[]NoFields to return
Returns: Promise<RedditUser[]>

getUsersByKeywords

Find Reddit users who authored posts matching a keyword query.
const users = await client.reddit.getUsersByKeywords('"machine learning"', {
  subreddit: "MachineLearning",
});
ParameterTypeRequiredDescription
querystringYesKeyword query
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.subredditstringNoFilter to subreddit
Returns: Promise<PaginatedResult<RedditUser>>

searchPosts

Full-text search across Reddit posts.
const results = await client.reddit.searchPosts("python tutorial", {
  subreddit: "learnpython",
  sort: "top",
  time: "month",
  responseType: ResponseType.Fast,
  limit: 25,
});
ParameterTypeRequiredDescription
querystringYesSearch query
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.subredditstringNoFilter to subreddit
options.sort"relevance" | "hot" | "top" | "new" | "comments"NoSort order
options.time"hour" | "day" | "week" | "month" | "year" | "all"NoTime filter
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<RedditPost>>

getPostWithComments

Get a Reddit post with its comments.
const result = await client.reddit.getPostWithComments("abc123");
console.log(result.post.title);
for (const comment of result.comments) {
  console.log(`  ${comment.authorUsername}: ${comment.body?.slice(0, 80)}`);
}
ParameterTypeRequiredDescription
postIdstringYesReddit post ID
options.fieldsstring[]NoPost fields to return
Returns: Promise<RedditPostWithComments> The returned object contains:
  • postRedditPost
  • commentsRedditComment[]
  • commentsPaginationPaginationInfo | null
  • commentsTableNamestring | null

searchComments

Search Reddit comments by keyword.
const comments = await client.reddit.searchComments("helpful tip", {
  subreddit: "LifeProTips",
});
ParameterTypeRequiredDescription
querystringYesSearch query
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.subredditstringNoFilter to subreddit
Returns: Promise<PaginatedResult<RedditComment>>

searchSubreddits

Search subreddits by name.
const subs = await client.reddit.searchSubreddits("machine learning");
const topFive = await client.reddit.searchSubreddits("machine learning", { limit: 5 });
ParameterTypeRequiredDescription
querystringYesSubreddit name to search
options.limitnumberNoMax results
options.fieldsstring[]NoFields to return
Returns: Promise<RedditSubreddit[]>

getSubredditWithPosts

Get a subreddit with its posts.
const result = await client.reddit.getSubredditWithPosts("wallstreetbets");
console.log(`r/${result.subreddit.displayName}${result.subreddit.subscribersCount?.toLocaleString()} members`);
for (const post of result.posts) {
  console.log(`  ${post.title} (${post.score} points)`);
}
ParameterTypeRequiredDescription
subredditNamestringYesSubreddit name (without r/ prefix)
options.fieldsstring[]NoFields to return
Returns: Promise<SubredditWithPosts> The returned object contains:
  • subredditRedditSubreddit
  • postsRedditPost[]
  • postsPaginationPaginationInfo | null
  • postsTableNamestring | null

getSubredditsByKeywords

Find subreddits related to a keyword query.
const subs = await client.reddit.getSubredditsByKeywords("cryptocurrency");
ParameterTypeRequiredDescription
querystringYesKeyword query
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
Returns: Promise<PaginatedResult<RedditSubreddit>>

TikTok — client.tiktok

Available Fields

User Fields

Pass these in the options.fields parameter on any user method. Default: id, username, nickname
CategoryFields
Identityid, username, nickname, signature, secUid, avatar
StatusisPrivate, isVerified
MetricsfollowerCount, followingCount, likeCount, postCount
Localelanguage, region
TimestampscreatedAt, usernameModifyTime
getUsersByKeywords and getUsersByHashtags also return aggregation fields: aggRelevance, relevantPostsCount, relevantPostsLikesSum, relevantPostsCommentsSum, relevantPostsPlaysSum, relevantPostsForwardsSum.

Post Fields

Pass these in the options.fields parameter on any post method. Default: id, description, username, createdAtDate
CategoryFields
Coreid, postType, isPrivate, userId, username, nickname, description, descriptionLanguage, createdAt, createdAtTimestamp, createdAtDate
EngagementcollectCount, commentCount, likeCount, downloadCount, forwardCount, playCount
MediavideoThumbnail, videoUrl (array of video URLs), duration (video length in seconds)
Contenthashtags (array of hashtag strings), transcriptsJson

Comment Fields

Pass these in the options.fields parameter on getComments. Default: id, text, username, createdAtDate
CategoryFields
Allid, postId, userId, username, text, likeCount, createdAt, createdAtTimestamp, createdAtDate
Always specify only the fields you need using the fields parameter. For example, ["id", "description", "playCount", "likeCount", "hashtags"] for content analysis. See Field Selection for details.

getUser

Get a single TikTok user profile.
const user = await client.tiktok.getUser("charlidamelio");
console.log(`${user.nickname}${user.followerCount?.toLocaleString()} followers`);

// By numeric ID
const user = await client.tiktok.getUser("123456789", { identifierType: "id" });
ParameterTypeRequiredDescription
identifierstringYesUsername or user ID
options.identifierType"username" | "id"NoIdentifier type (default: "username")
options.fieldsstring[]NoFields to return
Returns: Promise<TiktokUser>

searchUsers

Search TikTok users by name.
const users = await client.tiktok.searchUsers("charli");
const topFive = await client.tiktok.searchUsers("charli", { limit: 5 });
ParameterTypeRequiredDescription
namestringYesName to search
options.limitnumberNoMax results
options.fieldsstring[]NoFields to return
Returns: Promise<TiktokUser[]>

getUsersByKeywords

Find TikTok users who authored posts matching a keyword query.
const users = await client.tiktok.getUsersByKeywords('"machine learning"', {
  responseType: ResponseType.Fast,
  limit: 20,
});
ParameterTypeRequiredDescription
querystringYesKeyword query
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<TiktokUser>>

getPostsByIds

Get 1-100 TikTok posts by their IDs.
const posts = await client.tiktok.getPostsByIds(["7123456789012345678"]);
ParameterTypeRequiredDescription
postIdsstring[]YesArray of post IDs (max 100)
options.fieldsstring[]NoFields to return
Returns: Promise<TiktokPost[]>

getPostsByUser

Get all posts by a TikTok user.
const results = await client.tiktok.getPostsByUser("charlidamelio", {
  startDate: "2025-01-01",
  responseType: ResponseType.Fast,
  limit: 50,
});
ParameterTypeRequiredDescription
identifierstringYesUsername or user ID
options.identifierType"username" | "id"NoIdentifier type (default: "username")
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<TiktokPost>>

searchPosts

Full-text search across TikTok posts.
const results = await client.tiktok.searchPosts("travel vlog", {
  startDate: "2025-01-01",
  responseType: ResponseType.Fast,
  limit: 30,
});
ParameterTypeRequiredDescription
querystringYesSearch query
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<TiktokPost>>

getPostsByHashtags

Search TikTok posts by hashtags. Pass bare alphanumeric tags (no leading #). Max 5 hashtags per request; OR semantics across the list.
const results = await client.tiktok.getPostsByHashtags(["dance", "fyp"], {
  responseType: ResponseType.Fast,
  limit: 50,
});
ParameterTypeRequiredDescription
hashtagsstring[]YesHashtags to search (max 5, no # prefix)
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<TiktokPost>>

getUsersByHashtags

Find TikTok users who authored posts tagged with the given hashtags. Same input rules as getPostsByHashtags.
const users = await client.tiktok.getUsersByHashtags(["sustainable_fashion"], {
  responseType: ResponseType.Fast,
  limit: 20,
});
ParameterTypeRequiredDescription
hashtagsstring[]YesHashtags to search (max 5, no # prefix)
options.fieldsstring[]NoFields to return
options.startDatestringNoStart date (YYYY-MM-DD)
options.endDatestringNoEnd date (YYYY-MM-DD)
options.responseTypeResponseTypeNoResponse mode
options.limitnumberNoMax results (fast mode)
Returns: Promise<PaginatedResult<TiktokUser>>

getComments

Get comments on a TikTok post.
const comments = await client.tiktok.getComments("7123456789012345678");
ParameterTypeRequiredDescription
postIdstringYesPost ID
options.fieldsstring[]NoFields to return
Returns: Promise<PaginatedResult<TiktokComment>>

Tracking — client.tracking

Manage tracked items (keywords, users, subreddits) that Xpoz monitors on your behalf. Import the enums:
import { XpozClient, TrackedItemType, TrackedItemPlatform } from "@xpoz/xpoz";

getTrackedItems

List all currently tracked items on your account.
const items = await client.tracking.getTrackedItems();
for (const item of items) {
  console.log(`${item.platform} / ${item.type}: ${item.phrase}`);
}
Returns: Promise<TrackedItem[]>

addTrackedItems

Add one or more items to track.
const result = await client.tracking.addTrackedItems([
  { phrase: "bitcoin", type: TrackedItemType.Keyword, platform: TrackedItemPlatform.Twitter },
  { phrase: "nasa", type: TrackedItemType.User, platform: TrackedItemPlatform.Instagram },
]);
console.log(`Added ${result.addedCount} items (${result.currentCount}/${result.maxTrackedItems} used)`);
ParameterTypeRequiredDescription
itemsTrackedItemInput[]YesItems to track
items[].phrasestringYesKeyword, username, or subreddit name
items[].typeTrackedItemTypeYesKeyword, User, or Subreddit
items[].platformTrackedItemPlatformYesTwitter, Instagram, Reddit, or Tiktok
Returns: Promise<AddTrackedItemsResult>

removeTrackedItems

Remove one or more tracked items.
const result = await client.tracking.removeTrackedItems([
  { phrase: "bitcoin", type: TrackedItemType.Keyword, platform: TrackedItemPlatform.Twitter },
]);
console.log(`Removed ${result.removedCount} items`);
ParameterTypeRequiredDescription
itemsTrackedItemInput[]YesItems to remove (same format as addTrackedItems)
Returns: Promise<RemoveTrackedItemsResult>

Type Models

All fields are optional. Unknown fields from the server are preserved on the object.

TwitterPost

FieldTypeDescription
idstringPost ID
textstringPost text content
authorIdstringAuthor’s user ID
authorUsernamestringAuthor’s username
likeCountnumberNumber of likes
retweetCountnumberNumber of retweets
replyCountnumberNumber of replies
quoteCountnumberNumber of quotes
impressionCountnumberNumber of impressions
bookmarkCountnumberNumber of bookmarks
langstringLanguage code
hashtagsstring[]Hashtags in tweet
mentionsstring[]Mentioned usernames
mediaUrlsstring[]Media attachment URLs
urlsstring[]URLs in tweet text
countrystringCountry (if geo-tagged)
createdAtstringCreation timestamp
createdAtDatestringCreation date (YYYY-MM-DD)
conversationIdstringThread conversation ID
quotedTweetIdstringID of quoted tweet
replyToTweetIdstringID of parent tweet
possiblySensitivebooleanSensitive content flag
isRetweetbooleanWhether this is a retweet
hasBirdwatchNotesbooleanHas community notes
birdwatchNotesIdstringBirdwatch note ID
birdwatchNotesTextstringBirdwatch note text
birdwatchNotesUrlstringBirdwatch note URL
statusstringTweet status

TwitterUser

FieldTypeDescription
idstringUser ID
usernamestringUsername (handle)
namestringDisplay name
descriptionstringBio text
locationstringLocation string
verifiedbooleanVerification status
verifiedTypestringVerification type
followersCountnumberNumber of followers
followingCountnumberNumber of following
tweetCountnumberTotal tweets
likesCountnumberTotal likes
profileImageUrlstringProfile picture URL
createdAtstringAccount creation timestamp
accountBasedInstringAccount location

InstagramPost

FieldTypeDescription
idstringPost ID (strong_id format)
captionstringPost caption
usernamestringAuthor username
fullNamestringAuthor display name
likeCountnumberNumber of likes
commentCountnumberNumber of comments
reshareCountnumberNumber of reshares
videoPlayCountnumberVideo play count
mediaTypestringMedia type
imageUrlstringImage URL
videoUrlstringVideo URL
createdAtDatestringCreation date

InstagramUser

FieldTypeDescription
idstringUser ID
usernamestringUsername
fullNamestringDisplay name
biographystringBio text
isPrivatebooleanPrivate account
isVerifiedbooleanVerified status
followerCountnumberFollowers
followingCountnumberFollowing
mediaCountnumberTotal posts
profilePicUrlstringProfile picture URL

InstagramComment

FieldTypeDescription
idstringComment ID
textstringComment text
usernamestringAuthor username
parentPostIdstringParent post ID
likeCountnumberNumber of likes
childCommentCountnumberReply count
createdAtDatestringCreation date

RedditPost

FieldTypeDescription
idstringPost ID
titlestringPost title
selftextstringPost body text
authorUsernamestringAuthor username
subredditNamestringSubreddit name
scorenumberNet score
upvotesnumberUpvote count
commentsCountnumberComment count
urlstringPost URL
permalinkstringReddit permalink
isSelfbooleanSelf post (text only)
over18booleanNSFW flag
createdAtDatestringCreation date

RedditUser

FieldTypeDescription
idstringUser ID
usernamestringUsername
totalKarmanumberTotal karma
linkKarmanumberLink karma
commentKarmanumberComment karma
isGoldbooleanReddit Gold status
isModbooleanModerator status
profileDescriptionstringProfile bio
createdAtDatestringAccount creation date

RedditComment

FieldTypeDescription
idstringComment ID
bodystringComment text
authorUsernamestringAuthor username
parentPostIdstringParent post ID
scorenumberNet score
depthnumberNesting depth
isSubmitterbooleanIs OP
createdAtDatestringCreation date

RedditSubreddit

FieldTypeDescription
idstringSubreddit ID
displayNamestringSubreddit name
titlestringSubreddit title
publicDescriptionstringShort description
descriptionstringFull description
subscribersCountnumberSubscriber count
activeUserCountnumberActive users
over18booleanNSFW flag
createdAtDatestringCreation date

TiktokPost

FieldTypeDescription
idstringPost ID
descriptionstringPost caption/description
descriptionLanguagestringLanguage of description
userIdstringAuthor user ID
usernamestringAuthor username
nicknamestringAuthor display name
likeCountnumberNumber of likes
commentCountnumberNumber of comments
playCountnumberVideo play count
collectCountnumberNumber of collects/saves
downloadCountnumberNumber of downloads
forwardCountnumberNumber of forwards/shares
videoThumbnailstringThumbnail URL
videoUrlstring[]Array of video URLs
durationnumberVideo duration in seconds
hashtagsstring[]Hashtags in the post
postTypenumberPost type code
isPrivatebooleanPrivate post flag
createdAtstringCreation timestamp
createdAtDatestringCreation date (YYYY-MM-DD)

TiktokUser

FieldTypeDescription
idstringUser ID
usernamestringUsername
nicknamestringDisplay name
signaturestringBio text
secUidstringSecure user ID
avatarstringProfile picture URL
isPrivatebooleanPrivate account
isVerifiedbooleanVerified status
followerCountnumberNumber of followers
followingCountnumberNumber of following
likeCountnumberTotal likes received
postCountnumberTotal posts
languagestringProfile language
regionstringAccount region
createdAtstringAccount creation date

TiktokComment

FieldTypeDescription
idstringComment ID
postIdstringParent post ID
userIdstringAuthor user ID
usernamestringAuthor username
textstringComment text
likeCountnumberNumber of likes
createdAtstringCreation timestamp
createdAtDatestringCreation date (YYYY-MM-DD)

TrackedItem

FieldTypeDescription
phrasestringKeyword, username, or subreddit name
typeTrackedItemType"keyword", "user", or "subreddit"
platformTrackedItemPlatform"twitter", "instagram", "reddit", or "tiktok"

AddTrackedItemsResult

FieldTypeDescription
successbooleanWhether the operation succeeded
addedCountnumberNumber of items added
messagestringStatus message
currentCountnumberTotal tracked items after addition
maxTrackedItemsnumberPlan limit for tracked items
planNamestringCurrent plan name

RemoveTrackedItemsResult

FieldTypeDescription
successbooleanWhether the operation succeeded
removedCountnumberNumber of items removed
messagestringStatus message
For the Python equivalent of these types, see Python SDK Reference. The Python SDK uses Pydantic v2 models with snake_case field names (e.g., like_count instead of likeCount).