From 184f599c3f27391cdeb1f3657abb79f42509c809 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2026 10:59:11 +0000 Subject: [PATCH 1/3] feat(api): sync public contracts --- .stats.yml | 6 +- .../resources/x/tweets/tweets.py | 286 +++++++++++++++++- .../resources/x/users/users.py | 20 +- src/x_twitter_scraper/types/shared/error.py | 12 + .../types/x/tweet_get_quotes_params.py | 2 +- .../types/x/tweet_get_replies_params.py | 2 +- .../types/x/tweet_get_thread_params.py | 105 ++++++- .../types/x/tweet_search_params.py | 2 +- .../types/x/user_retrieve_likes_params.py | 2 +- .../types/x/user_retrieve_media_params.py | 2 +- .../types/x/user_retrieve_mentions_params.py | 2 +- .../types/x/user_retrieve_replies_params.py | 2 +- .../types/x/user_retrieve_tweets_params.py | 2 +- tests/api_resources/x/test_tweets.py | 64 ++++ 14 files changed, 475 insertions(+), 34 deletions(-) diff --git a/.stats.yml b/.stats.yml index 61f7c4d..a89002f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 124 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-d5ea5609c8180c1340dd312fcb526d52953040de479617d4755673705d7c1334.yml -openapi_spec_hash: 9b5ddbbd9ca6b21d24051d6b7cec9123 -config_hash: 217d68ca6999ad03cfc4922e9658297e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-878138bbf57021047ac2af87a490a147b1d41367ee7807cc188d3247cc4b255d.yml +openapi_spec_hash: 1f50b417a17776f9f361f34552879e64 +config_hash: a4624963c7e5bdbdf085e64f3101d3b0 diff --git a/src/x_twitter_scraper/resources/x/tweets/tweets.py b/src/x_twitter_scraper/resources/x/tweets/tweets.py index b0874ee..0d79f39 100644 --- a/src/x_twitter_scraper/resources/x/tweets/tweets.py +++ b/src/x_twitter_scraper/resources/x/tweets/tweets.py @@ -478,7 +478,7 @@ def get_quotes( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -739,7 +739,7 @@ def get_replies( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -994,8 +994,40 @@ def get_thread( self, id: str, *, + any_words: str | Omit = omit, + blue_verified_only: bool | Omit = omit, + cashtags: str | Omit = omit, + conversation_id: str | Omit = omit, cursor: str | Omit = omit, + exact_phrase: str | Omit = omit, + exclude_words: str | Omit = omit, + from_user: str | Omit = omit, + hashtags: str | Omit = omit, + in_reply_to_tweet_id: str | Omit = omit, + language: str | Omit = omit, + max_faves: int | Omit = omit, + max_quotes: int | Omit = omit, + max_replies: int | Omit = omit, + max_retweets: int | Omit = omit, + media_type: Literal["images", "videos", "gifs", "media", "links", "none"] | Omit = omit, + mentioning: str | Omit = omit, + min_bookmarks: int | Omit = omit, + min_faves: int | Omit = omit, + min_quotes: int | Omit = omit, + min_replies: int | Omit = omit, + min_retweets: int | Omit = omit, + min_views: int | Omit = omit, page_size: int | Omit = omit, + quotes: Literal["include", "exclude", "only"] | Omit = omit, + quotes_of_tweet_id: str | Omit = omit, + replies: Literal["include", "exclude", "only"] | Omit = omit, + retweets: Literal["include", "exclude", "only"] | Omit = omit, + retweets_of_tweet_id: str | Omit = omit, + since_date: Union[str, date] | Omit = omit, + to_user: str | Omit = omit, + until_date: Union[str, date] | Omit = omit, + url: str | Omit = omit, + verified_only: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1007,12 +1039,77 @@ def get_thread( Get full conversation thread for a tweet Args: + any_words: Words or quoted phrases where any one can match. Separate with spaces, commas, + or lines. + + blue_verified_only: Only return tweets from Blue-verified authors. + + cashtags: Cashtags separated by spaces, commas, or lines. + + conversation_id: Conversation ID filter. + cursor: Pagination cursor for thread tweets + exact_phrase: Exact phrase to match. + + exclude_words: Words or quoted phrases to exclude. Separate with spaces, commas, or lines. + + from_user: Filter by author username. + + hashtags: Hashtags separated by spaces, commas, or lines. + + in_reply_to_tweet_id: Only replies to this tweet ID. + + language: Language code filter, e.g. en or tr. + + max_faves: Maximum likes threshold. maxLikes is also accepted. + + max_quotes: Maximum quotes threshold. + + max_replies: Maximum replies threshold. + + max_retweets: Maximum retweets threshold. + + media_type: Filter by media type. + + mentioning: Filter tweets mentioning a username. + + min_bookmarks: Minimum bookmark count threshold. + + min_faves: Minimum likes threshold. minLikes is also accepted. + + min_quotes: Minimum quote count threshold. + + min_replies: Minimum replies threshold. + + min_retweets: Minimum retweets threshold. + + min_views: Minimum view count threshold. + page_size: Maximum page items (1-100, default 20). Source, filters, or credits can reduce results. Continue while has_next_page is true. Deprecated limit and count aliases remain accepted. + quotes: Quote mode. + + quotes_of_tweet_id: Only quotes of this tweet ID. + + replies: Reply mode. + + retweets: Retweet mode. + + retweets_of_tweet_id: Only retweets of this tweet ID. + + since_date: Start date in YYYY-MM-DD format. + + to_user: Filter replies sent to a username. + + until_date: End date in YYYY-MM-DD format. + + url: URL substring or domain filter. + + verified_only: Only return tweets from verified authors. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1032,8 +1129,40 @@ def get_thread( timeout=timeout, query=maybe_transform( { + "any_words": any_words, + "blue_verified_only": blue_verified_only, + "cashtags": cashtags, + "conversation_id": conversation_id, "cursor": cursor, + "exact_phrase": exact_phrase, + "exclude_words": exclude_words, + "from_user": from_user, + "hashtags": hashtags, + "in_reply_to_tweet_id": in_reply_to_tweet_id, + "language": language, + "max_faves": max_faves, + "max_quotes": max_quotes, + "max_replies": max_replies, + "max_retweets": max_retweets, + "media_type": media_type, + "mentioning": mentioning, + "min_bookmarks": min_bookmarks, + "min_faves": min_faves, + "min_quotes": min_quotes, + "min_replies": min_replies, + "min_retweets": min_retweets, + "min_views": min_views, "page_size": page_size, + "quotes": quotes, + "quotes_of_tweet_id": quotes_of_tweet_id, + "replies": replies, + "retweets": retweets, + "retweets_of_tweet_id": retweets_of_tweet_id, + "since_date": since_date, + "to_user": to_user, + "until_date": until_date, + "url": url, + "verified_only": verified_only, }, tweet_get_thread_params.TweetGetThreadParams, ), @@ -1110,10 +1239,12 @@ def search( ) -> TweetSearchResponse: """No-mode search maximizes coverage. - Args: - q: Query, Tweet ID, or status URL. + New cursorless `Latest` sessions return rows + newest-first across cursor pages. Existing cursors preserve their established + ordering. - Valid inline bounds apply per page. + Args: + q: Query, Tweet ID, or status URL. Valid inline bounds apply per page. advanced_query: Raw advanced search query appended as-is. @@ -1171,7 +1302,7 @@ def search( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -1736,7 +1867,7 @@ async def get_quotes( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -1997,7 +2128,7 @@ async def get_replies( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -2252,8 +2383,40 @@ async def get_thread( self, id: str, *, + any_words: str | Omit = omit, + blue_verified_only: bool | Omit = omit, + cashtags: str | Omit = omit, + conversation_id: str | Omit = omit, cursor: str | Omit = omit, + exact_phrase: str | Omit = omit, + exclude_words: str | Omit = omit, + from_user: str | Omit = omit, + hashtags: str | Omit = omit, + in_reply_to_tweet_id: str | Omit = omit, + language: str | Omit = omit, + max_faves: int | Omit = omit, + max_quotes: int | Omit = omit, + max_replies: int | Omit = omit, + max_retweets: int | Omit = omit, + media_type: Literal["images", "videos", "gifs", "media", "links", "none"] | Omit = omit, + mentioning: str | Omit = omit, + min_bookmarks: int | Omit = omit, + min_faves: int | Omit = omit, + min_quotes: int | Omit = omit, + min_replies: int | Omit = omit, + min_retweets: int | Omit = omit, + min_views: int | Omit = omit, page_size: int | Omit = omit, + quotes: Literal["include", "exclude", "only"] | Omit = omit, + quotes_of_tweet_id: str | Omit = omit, + replies: Literal["include", "exclude", "only"] | Omit = omit, + retweets: Literal["include", "exclude", "only"] | Omit = omit, + retweets_of_tweet_id: str | Omit = omit, + since_date: Union[str, date] | Omit = omit, + to_user: str | Omit = omit, + until_date: Union[str, date] | Omit = omit, + url: str | Omit = omit, + verified_only: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -2265,12 +2428,77 @@ async def get_thread( Get full conversation thread for a tweet Args: + any_words: Words or quoted phrases where any one can match. Separate with spaces, commas, + or lines. + + blue_verified_only: Only return tweets from Blue-verified authors. + + cashtags: Cashtags separated by spaces, commas, or lines. + + conversation_id: Conversation ID filter. + cursor: Pagination cursor for thread tweets + exact_phrase: Exact phrase to match. + + exclude_words: Words or quoted phrases to exclude. Separate with spaces, commas, or lines. + + from_user: Filter by author username. + + hashtags: Hashtags separated by spaces, commas, or lines. + + in_reply_to_tweet_id: Only replies to this tweet ID. + + language: Language code filter, e.g. en or tr. + + max_faves: Maximum likes threshold. maxLikes is also accepted. + + max_quotes: Maximum quotes threshold. + + max_replies: Maximum replies threshold. + + max_retweets: Maximum retweets threshold. + + media_type: Filter by media type. + + mentioning: Filter tweets mentioning a username. + + min_bookmarks: Minimum bookmark count threshold. + + min_faves: Minimum likes threshold. minLikes is also accepted. + + min_quotes: Minimum quote count threshold. + + min_replies: Minimum replies threshold. + + min_retweets: Minimum retweets threshold. + + min_views: Minimum view count threshold. + page_size: Maximum page items (1-100, default 20). Source, filters, or credits can reduce results. Continue while has_next_page is true. Deprecated limit and count aliases remain accepted. + quotes: Quote mode. + + quotes_of_tweet_id: Only quotes of this tweet ID. + + replies: Reply mode. + + retweets: Retweet mode. + + retweets_of_tweet_id: Only retweets of this tweet ID. + + since_date: Start date in YYYY-MM-DD format. + + to_user: Filter replies sent to a username. + + until_date: End date in YYYY-MM-DD format. + + url: URL substring or domain filter. + + verified_only: Only return tweets from verified authors. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2290,8 +2518,40 @@ async def get_thread( timeout=timeout, query=await async_maybe_transform( { + "any_words": any_words, + "blue_verified_only": blue_verified_only, + "cashtags": cashtags, + "conversation_id": conversation_id, "cursor": cursor, + "exact_phrase": exact_phrase, + "exclude_words": exclude_words, + "from_user": from_user, + "hashtags": hashtags, + "in_reply_to_tweet_id": in_reply_to_tweet_id, + "language": language, + "max_faves": max_faves, + "max_quotes": max_quotes, + "max_replies": max_replies, + "max_retweets": max_retweets, + "media_type": media_type, + "mentioning": mentioning, + "min_bookmarks": min_bookmarks, + "min_faves": min_faves, + "min_quotes": min_quotes, + "min_replies": min_replies, + "min_retweets": min_retweets, + "min_views": min_views, "page_size": page_size, + "quotes": quotes, + "quotes_of_tweet_id": quotes_of_tweet_id, + "replies": replies, + "retweets": retweets, + "retweets_of_tweet_id": retweets_of_tweet_id, + "since_date": since_date, + "to_user": to_user, + "until_date": until_date, + "url": url, + "verified_only": verified_only, }, tweet_get_thread_params.TweetGetThreadParams, ), @@ -2368,10 +2628,12 @@ async def search( ) -> TweetSearchResponse: """No-mode search maximizes coverage. - Args: - q: Query, Tweet ID, or status URL. + New cursorless `Latest` sessions return rows + newest-first across cursor pages. Existing cursors preserve their established + ordering. - Valid inline bounds apply per page. + Args: + q: Query, Tweet ID, or status URL. Valid inline bounds apply per page. advanced_query: Raw advanced search query appended as-is. @@ -2429,7 +2691,7 @@ async def search( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. diff --git a/src/x_twitter_scraper/resources/x/users/users.py b/src/x_twitter_scraper/resources/x/users/users.py index f80363a..1ed9a22 100644 --- a/src/x_twitter_scraper/resources/x/users/users.py +++ b/src/x_twitter_scraper/resources/x/users/users.py @@ -659,7 +659,7 @@ def retrieve_likes( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -887,7 +887,7 @@ def retrieve_media( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -1117,7 +1117,7 @@ def retrieve_mentions( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -1358,7 +1358,7 @@ def retrieve_replies( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -1697,7 +1697,7 @@ def retrieve_tweets( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -2552,7 +2552,7 @@ async def retrieve_likes( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -2780,7 +2780,7 @@ async def retrieve_media( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -3010,7 +3010,7 @@ async def retrieve_mentions( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -3251,7 +3251,7 @@ async def retrieve_replies( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. @@ -3590,7 +3590,7 @@ async def retrieve_tweets( min_bookmarks: Minimum bookmark count threshold. - min_faves: Minimum likes threshold. + min_faves: Minimum likes threshold. minLikes is also accepted. min_quotes: Minimum quote count threshold. diff --git a/src/x_twitter_scraper/types/shared/error.py b/src/x_twitter_scraper/types/shared/error.py index 0e16514..ac478ed 100644 --- a/src/x_twitter_scraper/types/shared/error.py +++ b/src/x_twitter_scraper/types/shared/error.py @@ -72,12 +72,17 @@ class ErrorValueStructuredError(BaseModel): "idempotency_conflict", "idempotency_key_conflict", "invalid_community_id", + "invalid_complete_replies_request", "invalid_coverage_cursor", + "invalid_coverage_request", "invalid_idempotency_key", "invalid_list_id", + "invalid_output_options", "invalid_payment_amount", "invalid_range", + "invalid_reply_options", "login_rate_limited", + "login_service_unavailable", "missing_idempotency_key", "missing_ids", "no_cached_style", @@ -88,6 +93,7 @@ class ErrorValueStructuredError(BaseModel): "support_media_rate_limit", "support_request_rate_limit", "too_many_ids", + "too_many_tweets", "unknown_field", "unsupported_media_type", "webhook_inactive", @@ -192,12 +198,17 @@ class ErrorValueStructuredError(BaseModel): "idempotency_conflict", "idempotency_key_conflict", "invalid_community_id", + "invalid_complete_replies_request", "invalid_coverage_cursor", + "invalid_coverage_request", "invalid_idempotency_key", "invalid_list_id", + "invalid_output_options", "invalid_payment_amount", "invalid_range", + "invalid_reply_options", "login_rate_limited", + "login_service_unavailable", "missing_idempotency_key", "missing_ids", "no_cached_style", @@ -208,6 +219,7 @@ class ErrorValueStructuredError(BaseModel): "support_media_rate_limit", "support_request_rate_limit", "too_many_ids", + "too_many_tweets", "unknown_field", "unsupported_media_type", "webhook_inactive", diff --git a/src/x_twitter_scraper/types/x/tweet_get_quotes_params.py b/src/x_twitter_scraper/types/x/tweet_get_quotes_params.py index 05518fd..10f8dd6 100644 --- a/src/x_twitter_scraper/types/x/tweet_get_quotes_params.py +++ b/src/x_twitter_scraper/types/x/tweet_get_quotes_params.py @@ -91,7 +91,7 @@ class TweetGetQuotesParams(TypedDict, total=False): """Minimum bookmark count threshold.""" min_faves: Annotated[int, PropertyInfo(alias="minFaves")] - """Minimum likes threshold.""" + """Minimum likes threshold. minLikes is also accepted.""" min_quotes: Annotated[int, PropertyInfo(alias="minQuotes")] """Minimum quote count threshold.""" diff --git a/src/x_twitter_scraper/types/x/tweet_get_replies_params.py b/src/x_twitter_scraper/types/x/tweet_get_replies_params.py index af8fe78..5ae63fa 100644 --- a/src/x_twitter_scraper/types/x/tweet_get_replies_params.py +++ b/src/x_twitter_scraper/types/x/tweet_get_replies_params.py @@ -111,7 +111,7 @@ class TweetGetRepliesParams(TypedDict, total=False): """Minimum bookmark count threshold.""" min_faves: Annotated[int, PropertyInfo(alias="minFaves")] - """Minimum likes threshold.""" + """Minimum likes threshold. minLikes is also accepted.""" min_quotes: Annotated[int, PropertyInfo(alias="minQuotes")] """Minimum quote count threshold.""" diff --git a/src/x_twitter_scraper/types/x/tweet_get_thread_params.py b/src/x_twitter_scraper/types/x/tweet_get_thread_params.py index 8d9250f..79d7bbf 100644 --- a/src/x_twitter_scraper/types/x/tweet_get_thread_params.py +++ b/src/x_twitter_scraper/types/x/tweet_get_thread_params.py @@ -6,7 +6,9 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing import Union +from datetime import date +from typing_extensions import Literal, Annotated, TypedDict from ..._utils import PropertyInfo @@ -14,12 +16,113 @@ class TweetGetThreadParams(TypedDict, total=False): + any_words: Annotated[str, PropertyInfo(alias="anyWords")] + """Words or quoted phrases where any one can match. + + Separate with spaces, commas, or lines. + """ + + blue_verified_only: Annotated[bool, PropertyInfo(alias="blueVerifiedOnly")] + """Only return tweets from Blue-verified authors.""" + + cashtags: str + """Cashtags separated by spaces, commas, or lines.""" + + conversation_id: Annotated[str, PropertyInfo(alias="conversationId")] + """Conversation ID filter.""" + cursor: str """Pagination cursor for thread tweets""" + exact_phrase: Annotated[str, PropertyInfo(alias="exactPhrase")] + """Exact phrase to match.""" + + exclude_words: Annotated[str, PropertyInfo(alias="excludeWords")] + """Words or quoted phrases to exclude. Separate with spaces, commas, or lines.""" + + from_user: Annotated[str, PropertyInfo(alias="fromUser")] + """Filter by author username.""" + + hashtags: str + """Hashtags separated by spaces, commas, or lines.""" + + in_reply_to_tweet_id: Annotated[str, PropertyInfo(alias="inReplyToTweetId")] + """Only replies to this tweet ID.""" + + language: str + """Language code filter, e.g. en or tr.""" + + max_faves: Annotated[int, PropertyInfo(alias="maxFaves")] + """Maximum likes threshold. maxLikes is also accepted.""" + + max_quotes: Annotated[int, PropertyInfo(alias="maxQuotes")] + """Maximum quotes threshold.""" + + max_replies: Annotated[int, PropertyInfo(alias="maxReplies")] + """Maximum replies threshold.""" + + max_retweets: Annotated[int, PropertyInfo(alias="maxRetweets")] + """Maximum retweets threshold.""" + + media_type: Annotated[ + Literal["images", "videos", "gifs", "media", "links", "none"], PropertyInfo(alias="mediaType") + ] + """Filter by media type.""" + + mentioning: str + """Filter tweets mentioning a username.""" + + min_bookmarks: Annotated[int, PropertyInfo(alias="minBookmarks")] + """Minimum bookmark count threshold.""" + + min_faves: Annotated[int, PropertyInfo(alias="minFaves")] + """Minimum likes threshold. minLikes is also accepted.""" + + min_quotes: Annotated[int, PropertyInfo(alias="minQuotes")] + """Minimum quote count threshold.""" + + min_replies: Annotated[int, PropertyInfo(alias="minReplies")] + """Minimum replies threshold.""" + + min_retweets: Annotated[int, PropertyInfo(alias="minRetweets")] + """Minimum retweets threshold.""" + + min_views: Annotated[int, PropertyInfo(alias="minViews")] + """Minimum view count threshold.""" + page_size: Annotated[int, PropertyInfo(alias="pageSize")] """Maximum page items (1-100, default 20). Source, filters, or credits can reduce results. Continue while has_next_page is true. Deprecated limit and count aliases remain accepted. """ + + quotes: Literal["include", "exclude", "only"] + """Quote mode.""" + + quotes_of_tweet_id: Annotated[str, PropertyInfo(alias="quotesOfTweetId")] + """Only quotes of this tweet ID.""" + + replies: Literal["include", "exclude", "only"] + """Reply mode.""" + + retweets: Literal["include", "exclude", "only"] + """Retweet mode.""" + + retweets_of_tweet_id: Annotated[str, PropertyInfo(alias="retweetsOfTweetId")] + """Only retweets of this tweet ID.""" + + since_date: Annotated[Union[str, date], PropertyInfo(alias="sinceDate", format="iso8601")] + """Start date in YYYY-MM-DD format.""" + + to_user: Annotated[str, PropertyInfo(alias="toUser")] + """Filter replies sent to a username.""" + + until_date: Annotated[Union[str, date], PropertyInfo(alias="untilDate", format="iso8601")] + """End date in YYYY-MM-DD format.""" + + url: str + """URL substring or domain filter.""" + + verified_only: Annotated[bool, PropertyInfo(alias="verifiedOnly")] + """Only return tweets from verified authors.""" diff --git a/src/x_twitter_scraper/types/x/tweet_search_params.py b/src/x_twitter_scraper/types/x/tweet_search_params.py index 84ecbd7..8a70de4 100644 --- a/src/x_twitter_scraper/types/x/tweet_search_params.py +++ b/src/x_twitter_scraper/types/x/tweet_search_params.py @@ -112,7 +112,7 @@ class TweetSearchParams(TypedDict, total=False): """Minimum bookmark count threshold.""" min_faves: Annotated[int, PropertyInfo(alias="minFaves")] - """Minimum likes threshold.""" + """Minimum likes threshold. minLikes is also accepted.""" min_quotes: Annotated[int, PropertyInfo(alias="minQuotes")] """Minimum quote count threshold.""" diff --git a/src/x_twitter_scraper/types/x/user_retrieve_likes_params.py b/src/x_twitter_scraper/types/x/user_retrieve_likes_params.py index 6ddf22e..4a31ca7 100644 --- a/src/x_twitter_scraper/types/x/user_retrieve_likes_params.py +++ b/src/x_twitter_scraper/types/x/user_retrieve_likes_params.py @@ -88,7 +88,7 @@ class UserRetrieveLikesParams(TypedDict, total=False): """Minimum bookmark count threshold.""" min_faves: Annotated[int, PropertyInfo(alias="minFaves")] - """Minimum likes threshold.""" + """Minimum likes threshold. minLikes is also accepted.""" min_quotes: Annotated[int, PropertyInfo(alias="minQuotes")] """Minimum quote count threshold.""" diff --git a/src/x_twitter_scraper/types/x/user_retrieve_media_params.py b/src/x_twitter_scraper/types/x/user_retrieve_media_params.py index 04c9a91..a26d25f 100644 --- a/src/x_twitter_scraper/types/x/user_retrieve_media_params.py +++ b/src/x_twitter_scraper/types/x/user_retrieve_media_params.py @@ -88,7 +88,7 @@ class UserRetrieveMediaParams(TypedDict, total=False): """Minimum bookmark count threshold.""" min_faves: Annotated[int, PropertyInfo(alias="minFaves")] - """Minimum likes threshold.""" + """Minimum likes threshold. minLikes is also accepted.""" min_quotes: Annotated[int, PropertyInfo(alias="minQuotes")] """Minimum quote count threshold.""" diff --git a/src/x_twitter_scraper/types/x/user_retrieve_mentions_params.py b/src/x_twitter_scraper/types/x/user_retrieve_mentions_params.py index 07598a6..7ecc39b 100644 --- a/src/x_twitter_scraper/types/x/user_retrieve_mentions_params.py +++ b/src/x_twitter_scraper/types/x/user_retrieve_mentions_params.py @@ -88,7 +88,7 @@ class UserRetrieveMentionsParams(TypedDict, total=False): """Minimum bookmark count threshold.""" min_faves: Annotated[int, PropertyInfo(alias="minFaves")] - """Minimum likes threshold.""" + """Minimum likes threshold. minLikes is also accepted.""" min_quotes: Annotated[int, PropertyInfo(alias="minQuotes")] """Minimum quote count threshold.""" diff --git a/src/x_twitter_scraper/types/x/user_retrieve_replies_params.py b/src/x_twitter_scraper/types/x/user_retrieve_replies_params.py index a29f21d..48b04f5 100644 --- a/src/x_twitter_scraper/types/x/user_retrieve_replies_params.py +++ b/src/x_twitter_scraper/types/x/user_retrieve_replies_params.py @@ -95,7 +95,7 @@ class UserRetrieveRepliesParams(TypedDict, total=False): """Minimum bookmark count threshold.""" min_faves: Annotated[int, PropertyInfo(alias="minFaves")] - """Minimum likes threshold.""" + """Minimum likes threshold. minLikes is also accepted.""" min_quotes: Annotated[int, PropertyInfo(alias="minQuotes")] """Minimum quote count threshold.""" diff --git a/src/x_twitter_scraper/types/x/user_retrieve_tweets_params.py b/src/x_twitter_scraper/types/x/user_retrieve_tweets_params.py index 7dd315c..08aea27 100644 --- a/src/x_twitter_scraper/types/x/user_retrieve_tweets_params.py +++ b/src/x_twitter_scraper/types/x/user_retrieve_tweets_params.py @@ -98,7 +98,7 @@ class UserRetrieveTweetsParams(TypedDict, total=False): """Minimum bookmark count threshold.""" min_faves: Annotated[int, PropertyInfo(alias="minFaves")] - """Minimum likes threshold.""" + """Minimum likes threshold. minLikes is also accepted.""" min_quotes: Annotated[int, PropertyInfo(alias="minQuotes")] """Minimum quote count threshold.""" diff --git a/tests/api_resources/x/test_tweets.py b/tests/api_resources/x/test_tweets.py index 7ce7b7c..1c4427e 100644 --- a/tests/api_resources/x/test_tweets.py +++ b/tests/api_resources/x/test_tweets.py @@ -556,8 +556,40 @@ def test_method_get_thread(self, client: XTwitterScraper) -> None: def test_method_get_thread_with_all_params(self, client: XTwitterScraper) -> None: tweet = client.x.tweets.get_thread( id="id", + any_words="anyWords", + blue_verified_only=True, + cashtags="cashtags", + conversation_id="conversationId", cursor="cursor", + exact_phrase="exactPhrase", + exclude_words="excludeWords", + from_user="fromUser", + hashtags="hashtags", + in_reply_to_tweet_id="inReplyToTweetId", + language="language", + max_faves=0, + max_quotes=0, + max_replies=0, + max_retweets=0, + media_type="images", + mentioning="mentioning", + min_bookmarks=0, + min_faves=0, + min_quotes=0, + min_replies=0, + min_retweets=0, + min_views=0, page_size=1, + quotes="include", + quotes_of_tweet_id="quotesOfTweetId", + replies="include", + retweets="include", + retweets_of_tweet_id="retweetsOfTweetId", + since_date=parse_date("2019-12-27"), + to_user="toUser", + until_date=parse_date("2019-12-27"), + url="url", + verified_only=True, ) assert_matches_type(PaginatedTweets, tweet, path=["response"]) @@ -1226,8 +1258,40 @@ async def test_method_get_thread(self, async_client: AsyncXTwitterScraper) -> No async def test_method_get_thread_with_all_params(self, async_client: AsyncXTwitterScraper) -> None: tweet = await async_client.x.tweets.get_thread( id="id", + any_words="anyWords", + blue_verified_only=True, + cashtags="cashtags", + conversation_id="conversationId", cursor="cursor", + exact_phrase="exactPhrase", + exclude_words="excludeWords", + from_user="fromUser", + hashtags="hashtags", + in_reply_to_tweet_id="inReplyToTweetId", + language="language", + max_faves=0, + max_quotes=0, + max_replies=0, + max_retweets=0, + media_type="images", + mentioning="mentioning", + min_bookmarks=0, + min_faves=0, + min_quotes=0, + min_replies=0, + min_retweets=0, + min_views=0, page_size=1, + quotes="include", + quotes_of_tweet_id="quotesOfTweetId", + replies="include", + retweets="include", + retweets_of_tweet_id="retweetsOfTweetId", + since_date=parse_date("2019-12-27"), + to_user="toUser", + until_date=parse_date("2019-12-27"), + url="url", + verified_only=True, ) assert_matches_type(PaginatedTweets, tweet, path=["response"]) From 5301d705809cf57165438962ec9507189f9b80fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2026 10:59:35 +0000 Subject: [PATCH 2/3] release: 0.11.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/x_twitter_scraper/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 30b6d45..78e7f27 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.10.1" + ".": "0.11.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8077a3f..95d3f86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.11.0 (2026-08-12) + +Full Changelog: [v0.10.1...v0.11.0](https://github.com/Xquik-dev/x-twitter-scraper-python/compare/v0.10.1...v0.11.0) + +### Features + +* **api:** sync public contracts ([184f599](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/184f599c3f27391cdeb1f3657abb79f42509c809)) + ## 0.10.1 (2026-08-11) Full Changelog: [v0.10.0...v0.10.1](https://github.com/Xquik-dev/x-twitter-scraper-python/compare/v0.10.0...v0.10.1) diff --git a/pyproject.toml b/pyproject.toml index fad2862..fbaa366 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "x_twitter_scraper" -version = "0.10.1" +version = "0.11.0" description = "Python library for the Xquik API. Not affiliated with X Corp." dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/x_twitter_scraper/_version.py b/src/x_twitter_scraper/_version.py index 9365429..b4fc9d7 100644 --- a/src/x_twitter_scraper/_version.py +++ b/src/x_twitter_scraper/_version.py @@ -5,4 +5,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "x_twitter_scraper" -__version__ = "0.10.1" # x-release-please-version +__version__ = "0.11.0" # x-release-please-version From ff8830c3e2d9e2bbd32253bc5e9770f7df56c07a Mon Sep 17 00:00:00 2001 From: kriptoburak Date: Wed, 12 Aug 2026 17:54:12 +0300 Subject: [PATCH 3/3] fix: sync release lock version --- uv.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uv.lock b/uv.lock index adad3f3..29f6db1 100644 --- a/uv.lock +++ b/uv.lock @@ -1571,7 +1571,7 @@ wheels = [ [[package]] name = "x-twitter-scraper" -version = "0.10.1" +version = "0.11.0" source = { editable = "." } dependencies = [ { name = "anyio" },