Retrieve detailed profile information for multiple Twitter users by their usernames or profile URLs, $0.10/1000 users. The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.UsersGetByUsernamesResponse;
import java.lang.Exception;
import java.lang.String;
import java.util.List;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
List<String> req = List.of(
"elonmusk");
UsersGetByUsernamesResponse res = sdk.users().getByUsernames()
.request(req)
.call();
if (res.any().isPresent()) {
System.out.println(res.any().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
List |
✔️ |
The request object to use for the request. |
UsersGetByUsernamesResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Users Details by ID. The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.UsersGetByIdsResponse;
import java.lang.Exception;
import java.lang.String;
import java.util.List;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
List<String> req = List.of(
"44196397",
"1696160451770429440");
UsersGetByIdsResponse res = sdk.users().getByIds()
.request(req)
.call();
if (res.usersDetailsResponse().isPresent()) {
System.out.println(res.usersDetailsResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
List |
✔️ |
The request object to use for the request. |
UsersGetByIdsResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Retrieves the verification metadata for a specific account. This endpoint identifies whether an account holds a Blue Verified status (authenticity check) or is an Official Organization Affiliate (gold/grey labels). The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.UsersVerifyAccountResponse;
import java.lang.Exception;
import java.lang.String;
import java.util.List;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
List<String> req = List.of(
"1696160451770429440");
UsersVerifyAccountResponse res = sdk.users().verifyAccount()
.request(req)
.call();
if (res.accountVerifyResponse().isPresent()) {
System.out.println(res.accountVerifyResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
List |
✔️ |
The request object to use for the request. |
UsersVerifyAccountResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Retrieve detailed account status for multiple Twitter users by their usernames. The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.UsersGetStatusesResponse;
import java.lang.Exception;
import java.lang.String;
import java.util.List;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
List<String> req = List.of(
"elonmusk",
"sundarpichai");
UsersGetStatusesResponse res = sdk.users().getStatuses()
.request(req)
.call();
if (res.any().isPresent()) {
System.out.println(res.any().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
List |
✔️ |
The request object to use for the request. |
UsersGetStatusesResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Search user
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.UsersSearchRequest;
import io.twexapi.sdk.models.operations.UsersSearchResponse;
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();
UsersSearchRequest req = UsersSearchRequest.builder()
.keyword("<value>")
.targetCount(794044L)
.build();
UsersSearchResponse res = sdk.users().search()
.request(req)
.call();
if (res.searchUserResponse().isPresent()) {
System.out.println(res.searchUserResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
UsersSearchRequest |
✔️ |
The request object to use for the request. |
UsersSearchResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Follow a user, $0.001 per call.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.components.FollowUserQuery;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.UsersFollowResponse;
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();
FollowUserQuery req = FollowUserQuery.builder()
.username("Mckenna.Roberts")
.cookie("ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7")
.build();
UsersFollowResponse res = sdk.users().follow()
.request(req)
.call();
if (res.blockUserResponse().isPresent()) {
System.out.println(res.blockUserResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
FollowUserQuery |
✔️ |
The request object to use for the request. |
UsersFollowResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Unfollow a user, $0.001 per call.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.components.UnfollowUserQuery;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.UsersUnfollowResponse;
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();
UnfollowUserQuery req = UnfollowUserQuery.builder()
.username("Casandra47")
.cookie("ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7")
.build();
UsersUnfollowResponse res = sdk.users().unfollow()
.request(req)
.call();
if (res.unfollowUserResponse().isPresent()) {
System.out.println(res.unfollowUserResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
UnfollowUserQuery |
✔️ |
The request object to use for the request. |
UsersUnfollowResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Get Twitter Account Based in. The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.UsersGetAccountBasedResponse;
import java.lang.Exception;
import java.lang.String;
import java.util.List;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
List<String> req = List.of(
"screen_name");
UsersGetAccountBasedResponse res = sdk.users().getAccountBased()
.request(req)
.call();
if (res.twitterAccountBasedStandardResponse().isPresent()) {
System.out.println(res.twitterAccountBasedStandardResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
List |
✔️ |
The request object to use for the request. |
UsersGetAccountBasedResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Get Twitter User About for a specific twitter user. get account_based_in,location_accurate
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.UsersGetAboutRequest;
import io.twexapi.sdk.models.operations.UsersGetAboutResponse;
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();
UsersGetAboutRequest req = UsersGetAboutRequest.builder()
.screenName("elonmusk")
.build();
UsersGetAboutResponse res = sdk.users().getAbout()
.request(req)
.call();
if (res.twitterUserAboutStandardResponse().isPresent()) {
System.out.println(res.twitterUserAboutStandardResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
UsersGetAboutRequest |
✔️ |
The request object to use for the request. |
UsersGetAboutResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |