Use the Java SDK for generated JVM models, builders, sync calls, async calls, and typed exceptions in Java 8+ applications.Documentation Index
Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
Use this file to discover all available pages before exploring further.
Install
Authenticate
XTwitterScraperOkHttpClient.fromEnv() reads X_TWITTER_SCRAPER_API_KEY, X_TWITTER_SCRAPER_BEARER_TOKEN, and X_TWITTER_SCRAPER_BASE_URL.
Basic Example
Error Handling
The Java SDK throws unchecked exceptions.| Status | Exception |
|---|---|
| 400 | BadRequestException |
| 401 | UnauthorizedException |
| 403 | PermissionDeniedException |
| 404 | NotFoundException |
| 422 | UnprocessableEntityException |
| 429 | RateLimitException |
| 5xx | InternalServerException |
XTwitterScraperIoException. All SDK exceptions inherit from XTwitterScraperException.
Pagination
Paginated responses expose generated fields such ashasNextPage. Use the endpoint cursor fields documented in the API reference when requesting additional pages.