- page - Get Replies by Page
Recommended for fetching tweet replies. Uses cursor-based pagination and avoids timeouts on large threads. The first request (omit next_cursor) returns root_tweet plus the first batch of replies. Pass next_cursor from the previous response to fetch the next page until has_next_page is false. Pricing: $0.10 per 1,000 replies.
require 'x_api_scraper'
Models = ::XapiScraper::Models
s = ::XapiScraper::Client.new(
bearer_auth: '<YOUR_BEARER_TOKEN_HERE>'
)
req = Models::Operations::TweetsRepliesPageRequest.new(
tweet_id: '1803006263529541838',
body: Models::Components::GetRepliesPageQuery.new
)
res = s.tweets.replies.page(request: req)
unless res.get_replies_page_response.nil?
# handle response
end| Parameter | Type | Required | Description |
|---|---|---|---|
request |
Models::Operations::TweetsRepliesPageRequest | ✔️ | The request object to use for the request. |
T.nilable(Models::Operations::TweetsRepliesPageResponse)
| Error Type | Status Code | Content Type |
|---|---|---|
| Models::Errors::HTTPValidationError | 422 | application/json |
| Errors::APIError | 4XX, 5XX | */* |