Java client for auto-api.com. Pulls car listings from 8 marketplaces — encar, mobile.de, autoscout24, che168, dongchedi, guazi, dubicars, dubizzle.
Java 11+, single dependency (Gson). Uses java.net.http.HttpClient under the hood.
implementation 'com.autoapi:auto-api-client:1.0.0'<dependency>
<groupId>com.autoapi</groupId>
<artifactId>auto-api-client</artifactId>
<version>1.0.0</version>
</dependency>import com.autoapi.client.AutoApiClient;
import com.autoapi.client.model.*;
AutoApiClient client = new AutoApiClient("your-api-key");Map<String, Object> filters = client.getFilters("encar");OffersResponse offers = client.getOffers("mobilede", new OffersParams()
.page(1)
.brand("BMW")
.yearFrom(2020));
// Pagination
System.out.println(offers.getMeta().getPage());
System.out.println(offers.getMeta().getNextPage());OffersResponse offer = client.getOffer("encar", "40427050");int changeId = client.getChangeId("encar", "2025-01-15");
ChangesResponse changes = client.getChanges("encar", changeId);
// Next batch
ChangesResponse nextBatch = client.getChanges("encar", changes.getMeta().getNextChangeId());Map<String, Object> info = client.getOfferByUrl(
"https://encar.com/dc/dc_cardetailview.do?carid=40427050");The offer data field is a Gson JsonElement — the actual fields depend on the marketplace. Deserialize to OfferData or your own class:
Gson gson = new Gson();
for (OfferItem item : offers.getResult()) {
OfferData d = gson.fromJson(item.getData(), OfferData.class);
System.out.printf("%s %s %s — $%s%n", d.getMark(), d.getModel(), d.getYear(), d.getPrice());
}import com.autoapi.client.exception.ApiException;
import com.autoapi.client.exception.AuthException;
try {
OffersResponse offers = client.getOffers("encar", new OffersParams().page(1));
} catch (AuthException e) {
// 401/403 — invalid API key
System.out.println(e.getStatusCode() + ": " + e.getMessage());
} catch (ApiException e) {
// Any other API error
System.out.println(e.getStatusCode() + ": " + e.getMessage());
System.out.println(e.getResponseBody());
}| Source | Platform | Region |
|---|---|---|
encar |
encar.com | South Korea |
mobilede |
mobile.de | Germany |
autoscout24 |
autoscout24.com | Europe |
che168 |
che168.com | China |
dongchedi |
dongchedi.com | China |
guazi |
guazi.com | China |
dubicars |
dubicars.com | UAE |
dubizzle |
dubizzle.com | UAE |
| Language | Package |
|---|---|
| PHP | autoapi/client |
| TypeScript | @autoapicom/client |
| Python | autoapicom-client |
| Go | auto-api-go |
| C# | AutoApi.Client |
| Ruby | auto-api-client |
| Rust | auto-api-client |