A POST method that starts searching process and return response with JSON that contain status and unique search token. This token will be needed to get search results in the getResults method.
Parameter | Type | Required | Description |
---|---|---|---|
brand* | String | Yes | Car brand requested by the user. |
model* | String | Yes | Car model requested by the user. |
city | String | Optional | City of search. By default, Moscow and Saint Petersburg. |
radius | String | Optional | Search radius. Default 100 km |
transmission | String | Optional | Type of transmission. |
price_min | Integer | Optional | Minimum price. |
price_max | Integer | Optional | Maximum price. |
year_min | Integer | Optional | Minimum year. |
year_max | Integer | Optional | Maximum year. |
v_min | Float | Optional | Minimum engine capacity. |
v_max | Float | Optional | Maximum engine capacity. |
sites | Array | Yes | Sites that will be searched. (avito, drom, autoru) |
*All possible parameters brand
and model
are presented in the site_address_data.json
file
which is in this repository.
City | Code |
---|---|
Saint-Petersburg | spb |
Moscow | msk |
Type | Code |
---|---|
Manual | mt |
Automatic | at |
http://0.0.0.0:8080/startSearch?brand=audi&model=100&city=spb&radius=100&transmission=mt &price_min=50000&price_max=100000&year_min=1940&year_max=2020&v_min=1.0&v_max=5.0
{"status": "success", "search_token": "30e679ba184111eb95af8c8590413ebf"}
A GET method that returns JSON response containing search results.
Parameter | Type | Required | Description |
---|---|---|---|
token | String | Yes | An unique token that is generated in the startSearch method. |
http://0.0.0.0:8080/getResults?token=30e679ba184111eb95af8c8590413ebf
{"30e679ba184111eb95af8c8590413ebf": [
{
"publish_date": "2020-10-29T19:23:10.164455",
"title": "Audi 100, 1992",
"price": "90000",
"mileage": "370000",
"tech_info": "2.3 \u043b / \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0430 / 133 \u043b.\u0441.",
"location": "\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433",
"link": "https://spb.drom.ru/audi/100/40095531.html",
"delta": "-21538"
},
<...>
]
}