auto-api-client-rust
Async Rust client for the auto-api.com car listings API. Built on reqwest + serde.
Covers 8 marketplaces: encar, mobile.de, autoscout24, che168, dongchedi, guazi, dubicars, dubizzle. Offer data comes back as serde_json::Value since each source has its own schema.
Installation
Add to your Cargo.toml:
[]
= "1.0"
Usage
use ;
async
Get filters
let filters = client.get_filters.await?;
Search offers
let offers = client.get_offers.await?;
// Pagination
println!;
println!;
Get single offer
let offer = client.get_offer.await?;
Track changes
let change_id = client.get_change_id.await?;
let changes = client.get_changes.await?;
// Next batch
let next_batch = client.get_changes.await?;
Get offer by URL
let info = client.get_offer_by_url.await?;
Decode offer data
Since each marketplace returns different fields, offer data is serde_json::Value. You can deserialize into OfferData or your own struct:
use OfferData;
for item in &offers.result
Error handling
use ;
match client.get_offers.await
Supported sources
| 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 |
Other languages
| Language | Package |
|---|---|
| PHP | autoapi/client |
| TypeScript | @autoapicom/client |
| Python | autoapicom-client |
| Go | auto-api-go |
| C# | AutoApi.Client |
| Java | auto-api-client |
| Ruby | auto-api-client |