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
The table of contents is too big for display.
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.2.0"
".": "0.3.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: 115
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-3b2c6c771ad1da0bbfeb0af115972929ed2c7fcd5e47a79556d66cd21431b224.yml
openapi_spec_hash: de2890233b68387bf5f9b6d19e7d87dc
config_hash: 8894c96caeb6df84c9394518810221bd
configured_endpoints: 117
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-d40c57a05527faf060d21c0e013729f371d88017b10680cea7c8fd6780ffaef5.yml
openapi_spec_hash: 597ebc460cf86740b9f6f7c95478dece
config_hash: 30ce23c9cfbf8fb8be9e5dd28a2124fa
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 0.3.0 (2026-04-08)

Full Changelog: [v0.2.0...v0.3.0](https://github.com/Xquik-dev/x-twitter-scraper-java/compare/v0.2.0...v0.3.0)

### Features

* **api:** api update ([c190c61](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/c190c61c7ec6d8edd03874f8bcaac3ca9bce5fae))
* **api:** api update ([d3ad9b3](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/d3ad9b3b176efa1edd42d9500965287b714acef5))
* **api:** api update ([91fe731](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/91fe7314ce8e6e9db863a4bc4863333ffb94fc5c))
* **api:** api update ([85f6788](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/85f67881300bb5cdb912fe7c59edcd0af640a14f))
* **api:** api update ([d4be9ff](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/d4be9ff16190320b7cdaffae495057ee2ceda50c))
* **api:** api update ([f8f5138](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/f8f51380d7cb3d07a0be410e69492edf9fba07cc))
* **api:** api update ([be5b4f9](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/be5b4f9f89ea2e7606d57cb7f0ea809c17c4096f))
* **api:** api update ([a4e0acd](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/a4e0acdd9e95507a2d69d05b50c5b8c114c7cd0b))


### Chores

* update SDK settings ([0a6a774](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/0a6a774604e8868c1a286b2235433829a46ebe92))

## 0.2.0 (2026-04-01)

Full Changelog: [v0.1.0...v0.2.0](https://github.com/Xquik-dev/x-twitter-scraper-java/compare/v0.1.0...v0.2.0)
Expand Down
56 changes: 28 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.x_twitter_scraper.api/x-twitter-scraper-java)](https://central.sonatype.com/artifact/com.x_twitter_scraper.api/x-twitter-scraper-java/0.2.0)
[![javadoc](https://javadoc.io/badge2/com.x_twitter_scraper.api/x-twitter-scraper-java/0.2.0/javadoc.svg)](https://javadoc.io/doc/com.x_twitter_scraper.api/x-twitter-scraper-java/0.2.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.x_twitter_scraper.api/x-twitter-scraper-java)](https://central.sonatype.com/artifact/com.x_twitter_scraper.api/x-twitter-scraper-java/0.3.0)
[![javadoc](https://javadoc.io/badge2/com.x_twitter_scraper.api/x-twitter-scraper-java/0.3.0/javadoc.svg)](https://javadoc.io/doc/com.x_twitter_scraper.api/x-twitter-scraper-java/0.3.0)

<!-- x-release-please-end -->

Expand All @@ -15,7 +15,7 @@ It is generated with [Stainless](https://www.stainless.com/).

<!-- x-release-please-start-version -->

The REST API documentation can be found on [xquik.com](https://xquik.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.x_twitter_scraper.api/x-twitter-scraper-java/0.2.0).
The REST API documentation can be found on [xquik.com](https://xquik.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.x_twitter_scraper.api/x-twitter-scraper-java/0.3.0).

<!-- x-release-please-end -->

Expand All @@ -26,7 +26,7 @@ The REST API documentation can be found on [xquik.com](https://xquik.com). Javad
### Gradle

```kotlin
implementation("com.x_twitter_scraper.api:x-twitter-scraper-java:0.2.0")
implementation("com.x_twitter_scraper.api:x-twitter-scraper-java:0.3.0")
```

### Maven
Expand All @@ -35,7 +35,7 @@ implementation("com.x_twitter_scraper.api:x-twitter-scraper-java:0.2.0")
<dependency>
<groupId>com.x_twitter_scraper.api</groupId>
<artifactId>x-twitter-scraper-java</artifactId>
<version>0.2.0</version>
<version>0.3.0</version>
</dependency>
```

Expand All @@ -50,8 +50,8 @@ This library requires Java 8 or later.
```java
import com.x_twitter_scraper.api.client.XTwitterScraperClient;
import com.x_twitter_scraper.api.client.okhttp.XTwitterScraperOkHttpClient;
import com.x_twitter_scraper.api.models.PaginatedTweets;
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchParams;
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;

// Configures using the `xtwitterscraper.apiKey`, `xtwitterscraper.bearerToken` and `xtwitterscraper.baseUrl` system properties
// Or configures using the `X_TWITTER_SCRAPER_API_KEY`, `X_TWITTER_SCRAPER_BEARER_TOKEN` and `X_TWITTER_SCRAPER_BASE_URL` environment variables
Expand All @@ -61,7 +61,7 @@ TweetSearchParams params = TweetSearchParams.builder()
.q("from:elonmusk")
.limit(10L)
.build();
TweetSearchResponse response = client.x().tweets().search(params);
PaginatedTweets paginatedTweets = client.x().tweets().search(params);
```

## Client configuration
Expand Down Expand Up @@ -136,7 +136,7 @@ The `withOptions()` method does not affect the original client or service.

To send a request to the X Twitter Scraper API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.

For example, `client.x().tweets().search(...)` should be called with an instance of `TweetSearchParams`, and it will return an instance of `TweetSearchResponse`.
For example, `client.x().tweets().search(...)` should be called with an instance of `TweetSearchParams`, and it will return an instance of `PaginatedTweets`.

## Immutability

Expand All @@ -153,8 +153,8 @@ The default client is synchronous. To switch to asynchronous execution, call the
```java
import com.x_twitter_scraper.api.client.XTwitterScraperClient;
import com.x_twitter_scraper.api.client.okhttp.XTwitterScraperOkHttpClient;
import com.x_twitter_scraper.api.models.PaginatedTweets;
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchParams;
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
import java.util.concurrent.CompletableFuture;

// Configures using the `xtwitterscraper.apiKey`, `xtwitterscraper.bearerToken` and `xtwitterscraper.baseUrl` system properties
Expand All @@ -165,16 +165,16 @@ TweetSearchParams params = TweetSearchParams.builder()
.q("from:elonmusk")
.limit(10L)
.build();
CompletableFuture<TweetSearchResponse> response = client.async().x().tweets().search(params);
CompletableFuture<PaginatedTweets> paginatedTweets = client.async().x().tweets().search(params);
```

Or create an asynchronous client from the beginning:

```java
import com.x_twitter_scraper.api.client.XTwitterScraperClientAsync;
import com.x_twitter_scraper.api.client.okhttp.XTwitterScraperOkHttpClientAsync;
import com.x_twitter_scraper.api.models.PaginatedTweets;
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchParams;
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
import java.util.concurrent.CompletableFuture;

// Configures using the `xtwitterscraper.apiKey`, `xtwitterscraper.bearerToken` and `xtwitterscraper.baseUrl` system properties
Expand All @@ -185,7 +185,7 @@ TweetSearchParams params = TweetSearchParams.builder()
.q("from:elonmusk")
.limit(10L)
.build();
CompletableFuture<TweetSearchResponse> response = client.x().tweets().search(params);
CompletableFuture<PaginatedTweets> paginatedTweets = client.x().tweets().search(params);
```

The asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.
Expand All @@ -202,7 +202,7 @@ import com.x_twitter_scraper.api.models.x.media.MediaUploadResponse;
import java.nio.file.Paths;

MediaUploadParams params = MediaUploadParams.builder()
.account("account")
.account("@elonmusk")
.file(Paths.get("/path/to/file"))
.build();
MediaUploadResponse response = client.x().media().upload(params);
Expand All @@ -216,7 +216,7 @@ import com.x_twitter_scraper.api.models.x.media.MediaUploadResponse;
import java.net.URL;

MediaUploadParams params = MediaUploadParams.builder()
.account("account")
.account("@elonmusk")
.file(new URL("https://example.com//path/to/file").openStream())
.build();
MediaUploadResponse response = client.x().media().upload(params);
Expand All @@ -229,7 +229,7 @@ import com.x_twitter_scraper.api.models.x.media.MediaUploadParams;
import com.x_twitter_scraper.api.models.x.media.MediaUploadResponse;

MediaUploadParams params = MediaUploadParams.builder()
.account("account")
.account("@elonmusk")
.file("content".getBytes())
.build();
MediaUploadResponse response = client.x().media().upload(params);
Expand All @@ -245,7 +245,7 @@ import java.io.InputStream;
import java.net.URL;

MediaUploadParams params = MediaUploadParams.builder()
.account("account")
.account("@elonmusk")
.file(MultipartField.<InputStream>builder()
.value(new URL("https://example.com//path/to/file").openStream())
.filename("/path/to/file")
Expand Down Expand Up @@ -311,25 +311,25 @@ To access this data, prefix any HTTP method call on a client or service with `wi
```java
import com.x_twitter_scraper.api.core.http.Headers;
import com.x_twitter_scraper.api.core.http.HttpResponseFor;
import com.x_twitter_scraper.api.models.PaginatedTweets;
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchParams;
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;

TweetSearchParams params = TweetSearchParams.builder()
.q("from:elonmusk")
.limit(10L)
.build();
HttpResponseFor<TweetSearchResponse> response = client.x().tweets().withRawResponse().search(params);
HttpResponseFor<PaginatedTweets> paginatedTweets = client.x().tweets().withRawResponse().search(params);

int statusCode = response.statusCode();
Headers headers = response.headers();
int statusCode = paginatedTweets.statusCode();
Headers headers = paginatedTweets.headers();
```

You can still deserialize the response into an instance of a Java class if needed:

```java
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
import com.x_twitter_scraper.api.models.PaginatedTweets;

TweetSearchResponse parsedResponse = response.parse();
PaginatedTweets parsedPaginatedTweets = paginatedTweets.parse();
```

## Error handling
Expand Down Expand Up @@ -427,9 +427,9 @@ Requests time out after 1 minute by default.
To set a custom timeout, configure the method call using the `timeout` method:

```java
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
import com.x_twitter_scraper.api.models.PaginatedTweets;

TweetSearchResponse response = client.x().tweets().search(
PaginatedTweets paginatedTweets = client.x().tweets().search(
params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()
);
```
Expand Down Expand Up @@ -705,17 +705,17 @@ By default, the SDK will not throw an exception in this case. It will throw [`XT
If you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:

```java
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
import com.x_twitter_scraper.api.models.PaginatedTweets;

TweetSearchResponse response = client.x().tweets().search(params).validate();
PaginatedTweets paginatedTweets = client.x().tweets().search(params).validate();
```

Or configure the method call to validate the response using the `responseValidation` method:

```java
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
import com.x_twitter_scraper.api.models.PaginatedTweets;

TweetSearchResponse response = client.x().tweets().search(
PaginatedTweets paginatedTweets = client.x().tweets().search(
params, RequestOptions.builder().responseValidation(true).build()
);
```
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.x_twitter_scraper.api"
version = "0.2.0" // x-release-please-version
version = "0.3.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ configure<MavenPublishBaseExtension> {

pom {
name.set("Xquik API")
description.set("X real-time data platform — extractions, giveaway draws, monitoring, webhooks.")
description.set("Xquik is an all-in-one X (Twitter) automation API with 40+ endpoints for\nreading, writing, and monitoring X data. **Read endpoints** let you look up\ntweets, search tweets, fetch user profiles, list followers & following, browse\ntimelines, bookmarks, notifications, communities, lists, trending topics, and\ndownload media. **Write endpoints** let you post tweets, reply, like, unlike,\nretweet, unretweet, follow, unfollow, send DMs, upload media, update profiles,\nand manage communities. **Automation endpoints** power bulk data extractions (20\ntool types), giveaway draws from tweet replies, real-time account monitoring\nwith webhooks & Telegram integrations, tweet composition with AI, and writing\nstyle analysis. Authenticate with an API key or OAuth 2.1 bearer token.\nPay-per-use endpoints are also available without an account.")
url.set("https://xquik.com")

licenses {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import java.util.Collections
import java.util.Objects
import kotlin.jvm.optionals.getOrNull

/** Error response containing a machine-readable error code. */
class Error
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.x_twitter_scraper.api.core.Enum
import com.x_twitter_scraper.api.core.JsonField
import com.x_twitter_scraper.api.errors.XTwitterScraperInvalidDataException

/** Type of monitor event fired when account activity occurs. */
class EventType @JsonCreator private constructor(private val value: JsonField<String>) : Enum {

/**
Expand Down
Loading
Loading