Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.8.1"
".": "0.9.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 123
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-5f26f3694399b4ac5a4431c66f7d27c4024f9d0dcd899702de5fde1150e28330.yml
openapi_spec_hash: 362e24e622f9a74ded8b38018e50460c
config_hash: dab26921eb273c16e5570c0485c9ac2c
configured_endpoints: 124
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-7bcac1557175956021a62532c55ce29b8822b5a41d0d59ae67787a6326c0ef8a.yml
openapi_spec_hash: 04e28f19097d9b59119101492100c4ab
config_hash: 217d68ca6999ad03cfc4922e9658297e
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.9.0 (2026-08-11)

Full Changelog: [v0.8.1...v0.9.0](https://github.com/Xquik-dev/x-twitter-scraper-python/compare/v0.8.1...v0.9.0)

### Features

* **api:** api update ([6001ecb](https://github.com/Xquik-dev/x-twitter-scraper-python/commit/6001ecbc6504d11d83fbebe0a3cffd83713e71bd))

## 0.8.1 (2026-08-11)

Full Changelog: [v0.8.0...v0.8.1](https://github.com/Xquik-dev/x-twitter-scraper-python/compare/v0.8.0...v0.8.1)
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,10 @@ client = XTwitterScraper(
api_key=os.environ.get("X_TWITTER_SCRAPER_API_KEY"), # This is the default and can be omitted
)

paginated_tweets = client.x.tweets.search(
response = client.x.tweets.search(
q="from:elonmusk",
limit=10,
)
print(paginated_tweets.has_next_page)
```

While you can provide an `api_key` keyword argument,
Expand All @@ -150,11 +149,10 @@ client = AsyncXTwitterScraper(


async def main() -> None:
paginated_tweets = await client.x.tweets.search(
response = await client.x.tweets.search(
q="from:elonmusk",
limit=10,
)
print(paginated_tweets.has_next_page)


asyncio.run(main())
Expand Down Expand Up @@ -189,11 +187,10 @@ async def main() -> None:
), # This is the default and can be omitted
http_client=DefaultAioHttpClient(),
) as client:
paginated_tweets = await client.x.tweets.search(
response = await client.x.tweets.search(
q="from:elonmusk",
limit=10,
)
print(paginated_tweets.has_next_page)


asyncio.run(main())
Expand Down
23 changes: 18 additions & 5 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ from x_twitter_scraper.types.x import (
TweetRetrieveResponse,
TweetDeleteResponse,
TweetGetRepliesResponse,
TweetSearchResponse,
)
```

Expand All @@ -291,7 +292,7 @@ Methods:
- <code title="get /x/tweets/{id}/replies">client.x.tweets.<a href="./src/x_twitter_scraper/resources/x/tweets/tweets.py">get_replies</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/tweet_get_replies_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x/tweet_get_replies_response.py">TweetGetRepliesResponse</a></code>
- <code title="get /x/tweets/{id}/retweeters">client.x.tweets.<a href="./src/x_twitter_scraper/resources/x/tweets/tweets.py">get_retweeters</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/tweet_get_retweeters_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_users.py">PaginatedUsers</a></code>
- <code title="get /x/tweets/{id}/thread">client.x.tweets.<a href="./src/x_twitter_scraper/resources/x/tweets/tweets.py">get_thread</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/tweet_get_thread_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_tweets.py">PaginatedTweets</a></code>
- <code title="get /x/tweets/search">client.x.tweets.<a href="./src/x_twitter_scraper/resources/x/tweets/tweets.py">search</a>(\*\*<a href="src/x_twitter_scraper/types/x/tweet_search_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_tweets.py">PaginatedTweets</a></code>
- <code title="get /x/tweets/search">client.x.tweets.<a href="./src/x_twitter_scraper/resources/x/tweets/tweets.py">search</a>(\*\*<a href="src/x_twitter_scraper/types/x/tweet_search_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x/tweet_search_response.py">TweetSearchResponse</a></code>

### Like

Expand Down Expand Up @@ -324,24 +325,30 @@ Methods:
Types:

```python
from x_twitter_scraper.types.x import UserRemoveFollowerResponse, UserRetrieveBatchResponse
from x_twitter_scraper.types.x import (
UserRemoveFollowerResponse,
UserRetrieveBatchResponse,
UserRetrieveFollowersResponse,
UserRetrieveFollowingResponse,
UserRetrieveVerifiedFollowersResponse,
)
```

Methods:

- <code title="get /x/users/{id}">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve</a>(id) -> <a href="./src/x_twitter_scraper/types/shared/user_profile.py">UserProfile</a></code>
- <code title="post /x/users/{id}/remove-follower">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">remove_follower</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_remove_follower_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x/user_remove_follower_response.py">UserRemoveFollowerResponse</a></code>
- <code title="get /x/users/batch">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_batch</a>(\*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_batch_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x/user_retrieve_batch_response.py">UserRetrieveBatchResponse</a></code>
- <code title="get /x/users/{id}/followers">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_followers</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_followers_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_users.py">PaginatedUsers</a></code>
- <code title="get /x/users/{id}/followers">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_followers</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_followers_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x/user_retrieve_followers_response.py">UserRetrieveFollowersResponse</a></code>
- <code title="get /x/users/{id}/followers-you-know">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_followers_you_know</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_followers_you_know_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_users.py">PaginatedUsers</a></code>
- <code title="get /x/users/{id}/following">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_following</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_following_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_users.py">PaginatedUsers</a></code>
- <code title="get /x/users/{id}/following">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_following</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_following_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x/user_retrieve_following_response.py">UserRetrieveFollowingResponse</a></code>
- <code title="get /x/users/{id}/likes">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_likes</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_likes_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_tweets.py">PaginatedTweets</a></code>
- <code title="get /x/users/{id}/media">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_media</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_media_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_tweets.py">PaginatedTweets</a></code>
- <code title="get /x/users/{id}/mentions">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_mentions</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_mentions_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_tweets.py">PaginatedTweets</a></code>
- <code title="get /x/users/{id}/replies">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_replies</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_replies_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_tweets.py">PaginatedTweets</a></code>
- <code title="get /x/users/search">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_search</a>(\*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_search_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_users.py">PaginatedUsers</a></code>
- <code title="get /x/users/{id}/tweets">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_tweets</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_tweets_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_tweets.py">PaginatedTweets</a></code>
- <code title="get /x/users/{id}/verified-followers">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_verified_followers</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_verified_followers_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/shared/paginated_users.py">PaginatedUsers</a></code>
- <code title="get /x/users/{id}/verified-followers">client.x.users.<a href="./src/x_twitter_scraper/resources/x/users/users.py">retrieve_verified_followers</a>(id, \*\*<a href="src/x_twitter_scraper/types/x/user_retrieve_verified_followers_params.py">params</a>) -> <a href="./src/x_twitter_scraper/types/x/user_retrieve_verified_followers_response.py">UserRetrieveVerifiedFollowersResponse</a></code>

### Follow

Expand Down Expand Up @@ -537,6 +544,12 @@ Methods:

# Support

## Attachments

Methods:

- <code title="get /support/attachments/{id}">client.support.attachments.<a href="./src/x_twitter_scraper/resources/support/attachments.py">download</a>(id) -> BinaryAPIResponse</code>

## Tickets

Types:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "x_twitter_scraper"
version = "0.8.1"
version = "0.9.0"
description = "Python library for the Xquik API. Not affiliated with X Corp."
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ certifi==2026.6.17
# httpx
colorama==0.4.6 ; sys_platform == 'win32'
# via pytest
coverage==7.15.2
coverage==7.15.3
dirty-equals==0.11
distro==1.9.0
# via x-twitter-scraper
Expand Down Expand Up @@ -76,7 +76,7 @@ pytest-asyncio==1.4.0
pytest-xdist==3.8.0
respx==0.23.1
rich==15.0.0
ruff==0.15.22
ruff==0.16.1
sniffio==1.3.1
# via x-twitter-scraper
time-machine==3.2.0
Expand Down
10 changes: 3 additions & 7 deletions scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1
brew bundle check >/dev/null 2>&1 || {
echo -n "==> Install Homebrew dependencies? (y/N): "
read -r response
case "$response" in
[yY][eE][sS]|[yY])
brew bundle
;;
*)
;;
esac
if [[ "$response" =~ ^[Yy]([Ee][Ss])?$ ]]; then
brew bundle
fi
echo
}
fi
Expand Down
2 changes: 1 addition & 1 deletion src/x_twitter_scraper/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "x_twitter_scraper"
__version__ = "0.8.1" # x-release-please-version
__version__ = "0.9.0" # x-release-please-version
20 changes: 12 additions & 8 deletions src/x_twitter_scraper/resources/draws.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def list(
List draws

Args:
cursor: Cursor for keyset pagination from prior response next_cursor
cursor: Previous nextCursor.

limit: Maximum number of items to return (1-100, default 50). For paid per-result
endpoints, the returned count may be lower when remaining credits cannot cover
Expand Down Expand Up @@ -154,11 +154,13 @@ def export(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BinaryAPIResponse:
"""
Export draw data
"""Export draw data

Args:
format: Export output format
format: Export output format.

PDF entry exports include up to 10,000 rows. Other entry
formats include up to 100,000 rows.

type: Export winners or all entries

Expand Down Expand Up @@ -326,7 +328,7 @@ async def list(
List draws

Args:
cursor: Cursor for keyset pagination from prior response next_cursor
cursor: Previous nextCursor.

limit: Maximum number of items to return (1-100, default 50). For paid per-result
endpoints, the returned count may be lower when remaining credits cannot cover
Expand Down Expand Up @@ -372,11 +374,13 @@ async def export(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncBinaryAPIResponse:
"""
Export draw data
"""Export draw data

Args:
format: Export output format
format: Export output format.

PDF entry exports include up to 10,000 rows. Other entry
formats include up to 100,000 rows.

type: Export winners or all entries

Expand Down
16 changes: 12 additions & 4 deletions src/x_twitter_scraper/resources/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def list(
*,
cursor: str | Omit = omit,
event_type: EventType | Omit = omit,
keyword_monitor_id: str | Omit = omit,
limit: int | Omit = omit,
monitor_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -100,16 +101,18 @@ def list(
List events

Args:
cursor: Cursor for keyset pagination from prior response next_cursor
cursor: Previous nextCursor.

event_type: Filter events by type

keyword_monitor_id: Keyword monitor ID.

limit: Maximum number of items to return (1-100, default 50). For paid per-result
endpoints, the returned count may be lower when remaining credits cannot cover
the requested page. If zero paid results are affordable, the endpoint returns
402 insufficient_credits.

monitor_id: Filter events by monitor ID
monitor_id: Account monitor ID.

extra_headers: Send extra headers

Expand All @@ -130,6 +133,7 @@ def list(
{
"cursor": cursor,
"event_type": event_type,
"keyword_monitor_id": keyword_monitor_id,
"limit": limit,
"monitor_id": monitor_id,
},
Expand Down Expand Up @@ -200,6 +204,7 @@ async def list(
*,
cursor: str | Omit = omit,
event_type: EventType | Omit = omit,
keyword_monitor_id: str | Omit = omit,
limit: int | Omit = omit,
monitor_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -213,16 +218,18 @@ async def list(
List events

Args:
cursor: Cursor for keyset pagination from prior response next_cursor
cursor: Previous nextCursor.

event_type: Filter events by type

keyword_monitor_id: Keyword monitor ID.

limit: Maximum number of items to return (1-100, default 50). For paid per-result
endpoints, the returned count may be lower when remaining credits cannot cover
the requested page. If zero paid results are affordable, the endpoint returns
402 insufficient_credits.

monitor_id: Filter events by monitor ID
monitor_id: Account monitor ID.

extra_headers: Send extra headers

Expand All @@ -243,6 +250,7 @@ async def list(
{
"cursor": cursor,
"event_type": event_type,
"keyword_monitor_id": keyword_monitor_id,
"limit": limit,
"monitor_id": monitor_id,
},
Expand Down
Loading