Skip to main content
All methods are available on both XpozClient (sync) and AsyncXpozClient (async). Async methods have the same signature but return awaitables.

Twitter — client.twitter

Available Fields

The Python SDK accepts snake_case field names and automatically maps them to the camelCase names used by the underlying MCP server.

User Fields

Pass these in the fields parameter on any user method (get_user, search_users, get_user_connections, get_users_by_keywords, get_post_interacting_users). Default: id, username, name
CategoryFields
Identityid, username, name, description, location, profile_image_url, profile_banner_url
Verificationverified, is_verified, verified_type, verified_since_datetime
Metricsfollowers_count, following_count, tweet_count, listed_count, likes_count, media_count
Metadatapinned_tweet_id, source, label, label_type, account_based_in, location_accurate
Historyusername_changes, last_username_change_datetime, created_at
get_users_by_keywords also returns aggregation fields: agg_relevance, relevant_tweets_count, relevant_tweets_impressions_sum, relevant_tweets_likes_sum, relevant_tweets_quotes_sum, relevant_tweets_replies_sum, relevant_tweets_retweets_sum.

Post Fields

Pass these in the fields parameter on any post method (get_posts_by_ids, get_posts_by_author, search_posts, get_retweets, get_quotes, get_comments). Default: id, text, author_username, created_at_date
CategoryFields
Coreid, text, author_id, author_username, created_at, created_at_date
Engagementretweet_count, reply_count, like_count, quote_count, impression_count, bookmark_count
Metadatalang, possibly_sensitive, suspended, deleted, source, is_retweet, has_birdwatch_notes, status
Birdwatchbirdwatch_notes_id, birdwatch_notes_text, birdwatch_notes_url
Relationsconversation_id, quoted_tweet_id, retweeted_tweet_id, reply_to_tweet_id, reply_to_user_id, reply_to_username, original_tweet_id, edited_tweets
Contenthashtags, mentions, media_urls, urls, grok_generated_content
Locationcountry, region, city
Always specify only the fields you need using the fields parameter. For example, ["id", "text", "retweet_count", "like_count", "created_at_date"] for engagement analysis. See Field Selection for details.

get_user

Get a single Twitter user profile.
user = client.twitter.get_user("elonmusk")
user = client.twitter.get_user("44196397", identifier_type="id")
ParameterTypeRequiredDescription
identifierstrYesUsername or user ID
identifier_type"username" | "id"NoIdentifier type (default: "username")
fieldslist[str]NoFields to return (snake_case)
Returns: TwitterUser

search_users

Search users by name or username.
users = client.twitter.search_users("elon")
top_five = client.twitter.search_users("elon", limit=5)
ParameterTypeRequiredDescription
namestrYesName or username to search
limitintNoMax results (default: 10)
fieldslist[str]NoFields to return
Returns: list[TwitterUser]

get_user_connections

Get followers or following for a user.
followers = client.twitter.get_user_connections("elonmusk", "followers")
following = client.twitter.get_user_connections("elonmusk", "following")
ParameterTypeRequiredDescription
usernamestrYesTwitter username
connection_type"followers" | "following"YesConnection type
fieldslist[str]NoFields to return
force_latestboolNoForce fresh data fetch
Returns: PaginatedResult[TwitterUser]

get_users_by_keywords

Find users who authored posts matching a keyword query. Includes aggregation fields like relevant_tweets_count and relevant_tweets_likes_sum.
users = client.twitter.get_users_by_keywords(
    '"machine learning"',
    fields=["username", "name", "followers_count", "relevant_tweets_count"],
    response_type=ResponseType.FAST,
    limit=20,
)
ParameterTypeRequiredDescription
querystrYesKeyword query (supports boolean operators)
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
languagestrNoLanguage filter
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[TwitterUser]

get_posts_by_ids

Get 1-100 posts by their IDs.
tweets = client.twitter.get_posts_by_ids(["1234567890", "0987654321"])
ParameterTypeRequiredDescription
post_idslist[str]YesArray of post IDs (max 100)
fieldslist[str]NoFields to return
force_latestboolNoForce fresh data fetch
Returns: list[TwitterPost]

get_posts_by_author

Get all posts by an author with optional date filtering.
results = client.twitter.get_posts_by_author("elonmusk", start_date="2025-01-01")
ParameterTypeRequiredDescription
identifierstrYesUsername or user ID
identifier_type"username" | "id"NoIdentifier type (default: "username")
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[TwitterPost]

search_posts

Full-text search across Twitter posts with filters.
results = client.twitter.search_posts(
    '"artificial intelligence" AND ethics',
    start_date="2025-01-01",
    end_date="2025-06-01",
    language="en",
    fields=["id", "text", "like_count", "author_username", "created_at_date"],
)
ParameterTypeRequiredDescription
querystrYesSearch query (supports exact phrases, boolean operators, grouping)
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
author_usernamestrNoFilter by author username
author_idstrNoFilter by author ID
languagestrNoLanguage code filter
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[TwitterPost]

get_retweets

Get retweets of a specific post.
retweets = client.twitter.get_retweets("1234567890")
ParameterTypeRequiredDescription
post_idstrYesPost ID
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
Returns: PaginatedResult[TwitterPost]

get_quotes

Get quote tweets of a specific post.
quotes = client.twitter.get_quotes("1234567890")
ParameterTypeRequiredDescription
post_idstrYesPost ID
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
Returns: PaginatedResult[TwitterPost]

get_comments

Get replies to a specific post.
comments = client.twitter.get_comments("1234567890")
ParameterTypeRequiredDescription
post_idstrYesPost ID
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
Returns: PaginatedResult[TwitterPost]

get_post_interacting_users

Get users who interacted with a post.
commenters = client.twitter.get_post_interacting_users("1234567890", "commenters")
ParameterTypeRequiredDescription
post_idstrYesPost ID
interaction_type"commenters" | "quoters" | "retweeters"YesInteraction type
fieldslist[str]NoFields to return
force_latestboolNoForce fresh data fetch
Returns: PaginatedResult[TwitterUser]

count_posts

Count tweets containing a phrase within a date range.
count = client.twitter.count_posts("bitcoin", start_date="2025-01-01")
print(f"{count:,} tweets mention bitcoin")
ParameterTypeRequiredDescription
phrasestrYesPhrase to count
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
Returns: int

Instagram — client.instagram

Available Fields

The Python SDK accepts snake_case field names and automatically maps them to the camelCase names used by the underlying MCP server.

User Fields

Pass these in the fields parameter on any user method (get_user, search_users, get_user_connections, get_post_interacting_users, get_users_by_keywords). Default: id, username, full_name
CategoryFields
Identityid, username, full_name, biography, profile_pic_url, profile_pic_id, profile_url, external_url
Statusis_private, is_verified, has_anonymous_profile_picture
Metricsfollower_count, following_count, media_count
get_users_by_keywords also returns aggregation fields: agg_relevance, relevant_posts_count, relevant_posts_likes_sum, relevant_posts_comments_sum, relevant_posts_reshares_sum, relevant_posts_video_plays_sum.

Post Fields

Pass these in the fields parameter on any post method (get_posts_by_ids, get_posts_by_user, search_posts). Default: id, caption, username, created_at_date
CategoryFields
Coreid, post_type, user_id, username, full_name, caption, created_at, created_at_timestamp, created_at_date
Engagementlike_count, comment_count, reshare_count, video_play_count
Mediamedia_type, code_url, image_url, video_url, audio_only_url, profile_pic_url, video_subtitles_uri, subtitles, video_duration

Comment Fields

Pass these in the fields parameter on get_comments. Default: id, text, username, created_at_date
CategoryFields
Coreid, text, parent_post_id, type, parent_comment_id, replied_to_comment_id, child_comment_count, user_id, username, full_name, created_at, created_at_timestamp, created_at_date
Engagementlike_count
Statusstatus, is_spam, has_translation
Always specify only the fields you need using the fields parameter. See Field Selection for details.

get_user

Get a single Instagram user profile.
user = client.instagram.get_user("instagram")
print(f"{user.full_name}{user.follower_count:,} followers")
ParameterTypeRequiredDescription
identifierstrYesUsername or user ID
identifier_type"username" | "id"NoIdentifier type (default: "username")
fieldslist[str]NoFields to return
Returns: InstagramUser

search_users

Search Instagram users by name.
users = client.instagram.search_users("nasa")
top_three = client.instagram.search_users("nasa", limit=3)
ParameterTypeRequiredDescription
namestrYesName to search
limitintNoMax results
fieldslist[str]NoFields to return
Returns: list[InstagramUser]

get_user_connections

Get followers or following for an Instagram user.
followers = client.instagram.get_user_connections("instagram", "followers")
ParameterTypeRequiredDescription
usernamestrYesInstagram username
connection_type"followers" | "following"YesConnection type
fieldslist[str]NoFields to return
force_latestboolNoForce fresh data fetch
Returns: PaginatedResult[InstagramUser]

get_users_by_keywords

Find users who authored posts matching a keyword query.
users = client.instagram.get_users_by_keywords('"sustainable fashion"')
ParameterTypeRequiredDescription
querystrYesKeyword query
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[InstagramUser]

get_posts_by_ids

Get Instagram posts by their IDs. Post IDs must be in strong_id format: "media_id_user_id".
posts = client.instagram.get_posts_by_ids(["3606450040306139062_4836333238"])
ParameterTypeRequiredDescription
post_idslist[str]YesArray of post IDs in strong_id format
fieldslist[str]NoFields to return
force_latestboolNoForce fresh data fetch
Returns: list[InstagramPost]

get_posts_by_user

Get all posts by an Instagram user.
results = client.instagram.get_posts_by_user("nasa")
ParameterTypeRequiredDescription
identifierstrYesUsername or user ID
identifier_type"username" | "id"NoIdentifier type (default: "username")
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[InstagramPost]

search_posts

Full-text search across Instagram posts.
results = client.instagram.search_posts("travel photography")
ParameterTypeRequiredDescription
querystrYesSearch query
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[InstagramPost]

get_comments

Get comments on an Instagram post.
comments = client.instagram.get_comments("3606450040306139062_4836333238")
ParameterTypeRequiredDescription
post_idstrYesPost ID (strong_id format)
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
Returns: PaginatedResult[InstagramComment]

get_post_interacting_users

Get users who interacted with an Instagram post.
likers = client.instagram.get_post_interacting_users(
    "3606450040306139062_4836333238", "likers"
)
ParameterTypeRequiredDescription
post_idstrYesPost ID (strong_id format)
interaction_type"commenters" | "likers"YesInteraction type
fieldslist[str]NoFields to return
force_latestboolNoForce fresh data fetch
Returns: PaginatedResult[InstagramUser]

Reddit — client.reddit

Available Fields

The Python SDK accepts snake_case field names and automatically maps them to the camelCase names used by the underlying MCP server.

User Fields

Pass these in the fields parameter on any user method (get_user, search_users, get_users_by_keywords). Default: id, username, total_karma
CategoryFields
Identityid, username, profile_url, profile_pic_url, snoovatar_img, profile_description, profile_banner_url, profile_title
Karmalink_karma, comment_karma, total_karma, awardee_karma, awarder_karma
Statusis_gold, is_mod, is_employee, has_verified_email, is_suspended, verified, is_blocked, accept_followers, has_subscribed
Settingshide_from_robots, pref_show_snoovatar
Timestampscreated_at, created_at_timestamp, created_at_date
get_users_by_keywords also returns aggregation fields: agg_relevance, relevant_posts_count, relevant_posts_upvotes_sum, relevant_posts_comments_count_sum.

Post Fields

Pass these in the fields parameter on post methods (search_posts) or the post_fields parameter on get_post_with_comments and get_subreddit_with_posts. Default: id, title, author_username, subreddit_name, created_at_date
CategoryFields
Coreid, title, selftext, url, permalink, post_url, thumbnail
Authorauthor_id, author_username
Subredditsubreddit_name, subreddit_id
Engagementscore, upvotes, downvotes, upvote_ratio, comments_count, crossposts_count
Flagsis_self, is_video, is_original_content, over18, spoiler, locked, stickied, archived
Metalink_flair_text, post_hint, domain, crosspost_parent
Timestampscreated_at, created_at_timestamp, created_at_date

Comment Fields

Pass these in the fields parameter on search_comments or the comment_fields parameter on get_post_with_comments. Default: id, body, author_username, created_at_date
CategoryFields
Coreid, body, parent_post_id, parent_id
Authorauthor_id, author_username
Subredditpost_subreddit_name, post_subreddit_id
Engagementscore, upvotes, downvotes, controversiality
Metadepth, is_submitter, stickied, collapsed, edited, distinguished
Timestampscreated_at, created_at_timestamp, created_at_date

Subreddit Fields

Pass these in the fields parameter on subreddit methods (search_subreddits, get_subreddits_by_keywords) or the subreddit_fields parameter on get_subreddit_with_posts. Default: id, display_name, title, subscribers_count
CategoryFields
Coreid, display_name, title, public_description, description
Statssubscribers_count, active_user_count
Metasubreddit_type, over18, lang, url, subreddit_url
Imagesicon_img, banner_img, header_img, community_icon
Timestampscreated_at, created_at_timestamp, created_at_date
get_subreddits_by_keywords also returns aggregation fields: agg_relevance, relevant_posts_count, relevant_posts_upvotes_sum, relevant_posts_comments_count_sum.
Always specify only the fields you need using the fields parameter. See Field Selection for details.

get_user

Get a single Reddit user profile.
user = client.reddit.get_user("spez")
print(f"{user.username}{user.total_karma:,} karma")
ParameterTypeRequiredDescription
usernamestrYesReddit username
fieldslist[str]NoFields to return
Returns: RedditUser

search_users

Search Reddit users by name.
users = client.reddit.search_users("spez")
top_three = client.reddit.search_users("spez", limit=3)
ParameterTypeRequiredDescription
namestrYesName to search
limitintNoMax results
fieldslist[str]NoFields to return
Returns: list[RedditUser]

get_users_by_keywords

Find Reddit users who authored posts matching a keyword query.
users = client.reddit.get_users_by_keywords(
    '"machine learning"', subreddit="MachineLearning"
)
ParameterTypeRequiredDescription
querystrYesKeyword query
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
subredditstrNoFilter to subreddit
force_latestboolNoForce fresh data fetch
Returns: PaginatedResult[RedditUser]

search_posts

Full-text search across Reddit posts.
results = client.reddit.search_posts(
    "python tutorial",
    subreddit="learnpython",
    sort="top",
    time="month",
)
ParameterTypeRequiredDescription
querystrYesSearch query
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
subredditstrNoFilter to subreddit
sort"relevance" | "hot" | "top" | "new" | "comments"NoSort order
time"hour" | "day" | "week" | "month" | "year" | "all"NoTime filter
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[RedditPost]

get_post_with_comments

Get a Reddit post with its comments.
result = client.reddit.get_post_with_comments("abc123")
print(result.post.title)
for comment in result.comments:
    print(f"  {comment.author_username}: {comment.body[:80]}")
ParameterTypeRequiredDescription
post_idstrYesReddit post ID
post_fieldslist[str]NoPost fields to return
comment_fieldslist[str]NoComment fields to return
force_latestboolNoForce fresh data fetch
Returns: RedditPostWithComments The returned object contains:
  • postRedditPost
  • commentslist[RedditComment]
  • comments_paginationPaginationInfo | None

search_comments

Search Reddit comments by keyword.
comments = client.reddit.search_comments("helpful tip", subreddit="LifeProTips")
ParameterTypeRequiredDescription
querystrYesSearch query
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
subredditstrNoFilter to subreddit
Returns: PaginatedResult[RedditComment]

search_subreddits

Search subreddits by name.
subs = client.reddit.search_subreddits("machine learning")
top_five = client.reddit.search_subreddits("machine learning", limit=5)
ParameterTypeRequiredDescription
querystrYesSubreddit name to search
limitintNoMax results
fieldslist[str]NoFields to return
Returns: list[RedditSubreddit]

get_subreddit_with_posts

Get a subreddit with its posts.
result = client.reddit.get_subreddit_with_posts("wallstreetbets")
print(f"r/{result.subreddit.display_name}{result.subreddit.subscribers_count:,} members")
for post in result.posts:
    print(f"  {post.title} ({post.score} points)")
ParameterTypeRequiredDescription
subreddit_namestrYesSubreddit name (without r/ prefix)
subreddit_fieldslist[str]NoSubreddit fields to return
post_fieldslist[str]NoPost fields to return
force_latestboolNoForce fresh data fetch
Returns: SubredditWithPosts The returned object contains:
  • subredditRedditSubreddit
  • postslist[RedditPost]
  • posts_paginationPaginationInfo | None

get_subreddits_by_keywords

Find subreddits related to a keyword query.
subs = client.reddit.get_subreddits_by_keywords("cryptocurrency")
ParameterTypeRequiredDescription
querystrYesKeyword query
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
Returns: PaginatedResult[RedditSubreddit]

TikTok — client.tiktok

Available Fields

The Python SDK accepts snake_case field names and automatically maps them to the camelCase names used by the underlying MCP server.

User Fields

Pass these in the fields parameter on any user method (get_user, search_users, get_users_by_keywords, get_users_by_hashtags). Default: id, username, nickname
CategoryFields
Identityid, username, nickname, signature, sec_uid, avatar
Statusis_private, is_verified
Metricsfollower_count, following_count, like_count, post_count
Localelanguage, region
Timestampscreated_at, username_modify_time
get_users_by_keywords and get_users_by_hashtags also return aggregation fields: agg_relevance, relevant_posts_count, relevant_posts_likes_sum, relevant_posts_comments_sum, relevant_posts_plays_sum, relevant_posts_forwards_sum.

Post Fields

Pass these in the fields parameter on any post method (get_posts_by_ids, get_posts_by_user, search_posts, get_posts_by_hashtags). Default: id, description, username, created_at_date
CategoryFields
Coreid, post_type, is_private, user_id, username, nickname, description, description_language, created_at, created_at_timestamp, created_at_date
Engagementcollect_count, comment_count, like_count, download_count, forward_count, play_count
Mediavideo_thumbnail, video_url (array of video URLs), duration (video length in seconds)
Contenthashtags (array of hashtag strings), transcripts_json

Comment Fields

Pass these in the fields parameter on get_comments. Default: id, text, username, created_at_date
CategoryFields
Allid, post_id, user_id, username, text, like_count, created_at, created_at_timestamp, created_at_date
Always specify only the fields you need using the fields parameter. For example, ["id", "description", "play_count", "like_count", "hashtags"] for content analysis. See Field Selection for details.

get_user

Get a single TikTok user profile.
user = client.tiktok.get_user("charlidamelio")
print(f"{user.nickname}{user.follower_count:,} followers")

# By numeric ID
user = client.tiktok.get_user("123456789", identifier_type="id")
ParameterTypeRequiredDescription
identifierstrYesUsername or user ID
identifier_type"username" | "id"NoIdentifier type (default: "username")
fieldslist[str]NoFields to return
Returns: TiktokUser

search_users

Search TikTok users by name.
users = client.tiktok.search_users("charli")
top_five = client.tiktok.search_users("charli", limit=5)
ParameterTypeRequiredDescription
namestrYesName to search
limitintNoMax results
fieldslist[str]NoFields to return
Returns: list[TiktokUser]

get_users_by_keywords

Find TikTok users who authored posts matching a keyword query.
users = client.tiktok.get_users_by_keywords(
    '"machine learning"',
    response_type=ResponseType.FAST,
    limit=20,
)
ParameterTypeRequiredDescription
querystrYesKeyword query
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[TiktokUser]

get_posts_by_ids

Get 1-100 TikTok posts by their IDs.
posts = client.tiktok.get_posts_by_ids(["7123456789012345678"])
ParameterTypeRequiredDescription
post_idslist[str]YesArray of post IDs (max 100)
fieldslist[str]NoFields to return
force_latestboolNoForce fresh data fetch
Returns: list[TiktokPost]

get_posts_by_user

Get all posts by a TikTok user.
results = client.tiktok.get_posts_by_user("charlidamelio", start_date="2025-01-01")
ParameterTypeRequiredDescription
identifierstrYesUsername or user ID
identifier_type"username" | "id"NoIdentifier type (default: "username")
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[TiktokPost]

search_posts

Full-text search across TikTok posts.
results = client.tiktok.search_posts(
    "travel vlog",
    start_date="2025-01-01",
    response_type=ResponseType.FAST,
    limit=30,
)
ParameterTypeRequiredDescription
querystrYesSearch query
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[TiktokPost]

get_posts_by_hashtags

Search TikTok posts by hashtags. Pass bare alphanumeric tags (no leading #). Max 5 hashtags per request; OR semantics across the list.
results = client.tiktok.get_posts_by_hashtags(
    ["dance", "fyp"],
    response_type=ResponseType.FAST,
    limit=50,
)
ParameterTypeRequiredDescription
hashtagslist[str]YesHashtags to search (max 5, no # prefix)
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[TiktokPost]

get_users_by_hashtags

Find TikTok users who authored posts tagged with the given hashtags. Same input rules as get_posts_by_hashtags.
users = client.tiktok.get_users_by_hashtags(
    ["sustainable_fashion"],
    response_type=ResponseType.FAST,
    limit=20,
)
ParameterTypeRequiredDescription
hashtagslist[str]YesHashtags to search (max 5, no # prefix)
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
response_typeResponseTypeNoResponse mode
limitintNoMax results (fast mode)
Returns: PaginatedResult[TiktokUser]

get_comments

Get comments on a TikTok post.
comments = client.tiktok.get_comments("7123456789012345678")
ParameterTypeRequiredDescription
post_idstrYesPost ID
fieldslist[str]NoFields to return
start_datestrNoStart date (YYYY-MM-DD)
end_datestrNoEnd date (YYYY-MM-DD)
force_latestboolNoForce fresh data fetch
Returns: PaginatedResult[TiktokComment]

Type Models

All models are Pydantic v2 BaseModel subclasses with extra="allow" (unknown fields are preserved). All fields are Optional and default to None. Field names use snake_case.

TwitterPost

FieldTypeDescription
idstrPost ID
textstrPost text content
author_idstrAuthor’s user ID
author_usernamestrAuthor’s username
like_countintNumber of likes
retweet_countintNumber of retweets
reply_countintNumber of replies
quote_countintNumber of quotes
impression_countintNumber of impressions
bookmark_countintNumber of bookmarks
langstrLanguage code
hashtagslist[str]Hashtags in tweet
mentionslist[str]Mentioned usernames
media_urlslist[str]Media attachment URLs
urlslist[str]URLs in tweet text
countrystrCountry (if geo-tagged)
created_atstrCreation timestamp
created_at_datestrCreation date (YYYY-MM-DD)
conversation_idstrThread conversation ID
quoted_tweet_idstrID of quoted tweet
reply_to_tweet_idstrID of parent tweet
possibly_sensitiveboolSensitive content flag
is_retweetboolWhether this is a retweet
has_birdwatch_notesboolHas community notes
birdwatch_notes_idstrBirdwatch note ID
birdwatch_notes_textstrBirdwatch note text
birdwatch_notes_urlstrBirdwatch note URL
statusstrTweet status

TwitterUser

FieldTypeDescription
idstrUser ID
usernamestrUsername (handle)
namestrDisplay name
descriptionstrBio text
locationstrLocation string
verifiedboolVerification status
verified_typestrVerification type
followers_countintNumber of followers
following_countintNumber of following
tweet_countintTotal tweets
likes_countintTotal likes
profile_image_urlstrProfile picture URL
created_atstrAccount creation timestamp
account_based_instrAccount location

InstagramPost

FieldTypeDescription
idstrPost ID (strong_id format)
captionstrPost caption
usernamestrAuthor username
full_namestrAuthor display name
like_countintNumber of likes
comment_countintNumber of comments
reshare_countintNumber of reshares
video_play_countintVideo play count
media_typestrMedia type
image_urlstrImage URL
video_urlstrVideo URL
created_at_datestrCreation date

InstagramUser

FieldTypeDescription
idstrUser ID
usernamestrUsername
full_namestrDisplay name
biographystrBio text
is_privateboolPrivate account
is_verifiedboolVerified status
follower_countintFollowers
following_countintFollowing
media_countintTotal posts
profile_pic_urlstrProfile picture URL

InstagramComment

FieldTypeDescription
idstrComment ID
textstrComment text
usernamestrAuthor username
parent_post_idstrParent post ID
like_countintNumber of likes
child_comment_countintReply count
created_at_datestrCreation date

RedditPost

FieldTypeDescription
idstrPost ID
titlestrPost title
selftextstrPost body text
author_usernamestrAuthor username
subreddit_namestrSubreddit name
scoreintNet score
upvotesintUpvote count
comments_countintComment count
urlstrPost URL
permalinkstrReddit permalink
is_selfboolSelf post (text only)
over18boolNSFW flag
created_at_datestrCreation date

RedditUser

FieldTypeDescription
idstrUser ID
usernamestrUsername
total_karmaintTotal karma
link_karmaintLink karma
comment_karmaintComment karma
is_goldboolReddit Gold status
is_modboolModerator status
profile_descriptionstrProfile bio
created_at_datestrAccount creation date

RedditComment

FieldTypeDescription
idstrComment ID
bodystrComment text
author_usernamestrAuthor username
parent_post_idstrParent post ID
scoreintNet score
depthintNesting depth
is_submitterboolIs OP
created_at_datestrCreation date

RedditSubreddit

FieldTypeDescription
idstrSubreddit ID
display_namestrSubreddit name
titlestrSubreddit title
public_descriptionstrShort description
descriptionstrFull description
subscribers_countintSubscriber count
active_user_countintActive users
over18boolNSFW flag
created_at_datestrCreation date

TiktokPost

FieldTypeDescription
idstrPost ID
descriptionstrPost caption/description
description_languagestrLanguage of description
user_idstrAuthor user ID
usernamestrAuthor username
nicknamestrAuthor display name
like_countintNumber of likes
comment_countintNumber of comments
play_countintVideo play count
collect_countintNumber of collects/saves
download_countintNumber of downloads
forward_countintNumber of forwards/shares
video_thumbnailstrThumbnail URL
video_urllist[str]Array of video URLs
durationintVideo duration in seconds
hashtagslist[str]Hashtags in the post
post_typeintPost type code
is_privateboolPrivate post flag
created_atstrCreation timestamp
created_at_datestrCreation date (YYYY-MM-DD)

TiktokUser

FieldTypeDescription
idstrUser ID
usernamestrUsername
nicknamestrDisplay name
signaturestrBio text
sec_uidstrSecure user ID
avatarstrProfile picture URL
is_privateboolPrivate account
is_verifiedboolVerified status
follower_countintNumber of followers
following_countintNumber of following
like_countintTotal likes received
post_countintTotal posts
languagestrProfile language
regionstrAccount region
created_atstrAccount creation date

TiktokComment

FieldTypeDescription
idstrComment ID
post_idstrParent post ID
user_idstrAuthor user ID
usernamestrAuthor username
textstrComment text
like_countintNumber of likes
created_atstrCreation timestamp
created_at_datestrCreation date (YYYY-MM-DD)

Composite Types

RedditPostWithComments — returned by get_post_with_comments():
  • post: RedditPost
  • comments: list[RedditComment]
  • comments_pagination: PaginationInfo | None
SubredditWithPosts — returned by get_subreddit_with_posts():
  • subreddit: RedditSubreddit
  • posts: list[RedditPost]
  • posts_pagination: PaginationInfo | None
For the TypeScript equivalent of these types, see TypeScript SDK Reference. The TypeScript SDK uses plain interfaces with camelCase field names (e.g., likeCount instead of like_count).