- retweeters - Get Retweeters
- retweetersPage - Get Retweeters by Page
- quotes - Get Quote Tweets
- quotesPage - Get Quote Tweets by Page
Retrieve retweeters in a single request. Automatically paginates until count is reached or no more results. Minimum 10, maximum 5000 users.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.TweetsEngagementRetweetersRequest;
import io.twexapi.sdk.models.operations.TweetsEngagementRetweetersResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
TweetsEngagementRetweetersRequest req = TweetsEngagementRetweetersRequest.builder()
.tweetId("<id>")
.targetCount(100L)
.build();
TweetsEngagementRetweetersResponse res = sdk.tweets().engagement().retweeters()
.request(req)
.call();
if (res.searchUserResponse().isPresent()) {
System.out.println(res.searchUserResponse().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
TweetsEngagementRetweetersRequest | ✔️ | The request object to use for the request. |
TweetsEngagementRetweetersResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/HTTPValidationError | 422 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Retrieve retweeters using cursor-based pagination. Each page returns up to 20 users. Pass next_cursor from the previous response to continue.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.components.GetRetweetersCursorQuery;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.TweetsEngagementRetweetersPageResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetRetweetersCursorQuery req = GetRetweetersCursorQuery.builder()
.tweetId("<id>")
.nextCursor("eyJpZCI6IjIwNjAwNTE1Mzg3OTQ0Mzg2NzciLCJmbG9ja0N1cnNvciI6IjQ2MTE2ODYwMTg2Mjg5ODcxNzkiLCJvcmlnaW5hbERpcmVjdGlvbiI6IkRlc2NlbmRpbmcifQ==-999995")
.build();
TweetsEngagementRetweetersPageResponse res = sdk.tweets().engagement().retweetersPage()
.request(req)
.call();
if (res.getRetweetersCursorResponse().isPresent()) {
System.out.println(res.getRetweetersCursorResponse().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetRetweetersCursorQuery | ✔️ | The request object to use for the request. |
TweetsEngagementRetweetersPageResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/HTTPValidationError | 422 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Retrieve quote tweets in a single request. Automatically paginates until count is reached or no more results. Use Latest for chronological order or Top for ranked results. Minimum 10, maximum 5000 tweets.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.components.GetQuotesQuery;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.TweetsEngagementQuotesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetQuotesQuery req = GetQuotesQuery.builder()
.tweetId("<id>")
.count(100L)
.build();
TweetsEngagementQuotesResponse res = sdk.tweets().engagement().quotes()
.request(req)
.call();
if (res.getQuotesResponse().isPresent()) {
System.out.println(res.getQuotesResponse().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetQuotesQuery | ✔️ | The request object to use for the request. |
TweetsEngagementQuotesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/HTTPValidationError | 422 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Retrieve quote tweets using cursor-based pagination. Each page returns up to 20 tweets. Use Latest for chronological order or Top for ranked results. Pass next_cursor from the previous response to continue.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.components.GetQuotesCursorQuery;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.TweetsEngagementQuotesPageResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetQuotesCursorQuery req = GetQuotesCursorQuery.builder()
.tweetId("<id>")
.nextCursor("scroll:thGQYTMwMjU5NDA4ODc4ODc6MjU5NDA4ODc4ODc6")
.build();
TweetsEngagementQuotesPageResponse res = sdk.tweets().engagement().quotesPage()
.request(req)
.call();
if (res.getQuotesCursorResponse().isPresent()) {
System.out.println(res.getQuotesCursorResponse().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetQuotesCursorQuery | ✔️ | The request object to use for the request. |
TweetsEngagementQuotesPageResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/HTTPValidationError | 422 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |