{"openapi":"3.1.0","info":{"title":"autosalons.ru","version":"1","description":"Открытые данные об автосалонах России и машинах у них в наличии. Только чтение, ключ не нужен. Условия использования и описание: https://autosalons.ru/dlya-ii/"},"servers":[{"url":"https://autosalons.ru"}],"externalDocs":{"url":"https://autosalons.ru/dlya-ii/"},"paths":{"/api/cars/":{"get":{"operationId":"searchCars","summary":"Поиск машин в наличии у автосалонов России","description":"Машины, которые салоны прислали в своих фидах. Обновляется каждый час. Ссылайтесь на поле url в ответе.","parameters":[{"name":"city","in":"query","required":false,"description":"Город: код из /api/cities/ или название по-русски","schema":{"type":"string"},"example":"moskva"},{"name":"make","in":"query","required":false,"description":"Марка: код или название","schema":{"type":"string"},"example":"haval"},{"name":"model","in":"query","required":false,"description":"Модель: код или название, только вместе с make","schema":{"type":"string"},"example":"jolion"},{"name":"price_min","in":"query","required":false,"description":"Цена от, рублей","schema":{"type":"integer"}},{"name":"price_max","in":"query","required":false,"description":"Цена до, рублей","schema":{"type":"integer"},"example":3000000},{"name":"year_min","in":"query","required":false,"description":"Год выпуска от","schema":{"type":"integer"}},{"name":"year_max","in":"query","required":false,"description":"Год выпуска до","schema":{"type":"integer"}},{"name":"mileage_max","in":"query","required":false,"description":"Пробег до, км","schema":{"type":"integer"}},{"name":"condition","in":"query","required":false,"description":"Новая или с пробегом","schema":{"type":"string","enum":["new","used"]}},{"name":"gearbox","in":"query","required":false,"description":"Коробка передач","schema":{"type":"string","enum":["manual","automatic","robot","cvt"]}},{"name":"drive","in":"query","required":false,"description":"Привод","schema":{"type":"string","enum":["front","rear","awd"]}},{"name":"engine","in":"query","required":false,"description":"Топливо","schema":{"type":"string","enum":["petrol","diesel","hybrid","electric","gas"]}},{"name":"dealer","in":"query","required":false,"description":"Номер салона из /api/dealers/","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Порядок","schema":{"type":"string","enum":["newest","price_asc","price_desc","year_desc","mileage_asc"],"default":"newest"}},{"name":"limit","in":"query","required":false,"description":"Сколько машин вернуть, до 100","schema":{"type":"integer","default":20,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Сдвиг для следующих страниц","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Найденные машины","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string","format":"uri"},"version":{"const":1},"source":{"type":"string"},"docs":{"type":"string"},"terms":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"total":{"type":"integer"},"count":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"next":{"type":["string","null"],"format":"uri","description":"Следующая страница результатов"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Car"}}}}}}},"400":{"description":"Неверный параметр, текст ошибки в поле error"},"404":{"description":"Не найдено"}}}},"/api/cars/{id}/":{"get":{"operationId":"getCar","summary":"Одна машина","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Машина в наличии","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"const":1},"item":{"$ref":"#/components/schemas/Car"}}}}}},"404":{"description":"Не найдено"},"410":{"description":"Машина продана или снята с продажи. В теле status: sold и последние известные данные"}}}},"/api/dealers/":{"get":{"operationId":"searchDealers","summary":"Поиск автосалонов с оценками и проверкой юрлица","parameters":[{"name":"city","in":"query","required":false,"description":"Город: код или название","schema":{"type":"string"},"example":"sankt-peterburg"},{"name":"make","in":"query","required":false,"description":"Марка, которую продаёт салон","schema":{"type":"string"},"example":"haval"},{"name":"q","in":"query","required":false,"description":"Часть названия салона","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Тип салона","schema":{"type":"string","enum":["official","used","grey","multibrand"]}},{"name":"stamp","in":"query","required":false,"description":"Отметка о юрлице или жалобах","schema":{"type":"string","enum":["active","liquidated","liquidating","bankrupt","entity_changed","many_complaints"]}},{"name":"limit","in":"query","required":false,"description":"Сколько салонов вернуть, до 100","schema":{"type":"integer","default":20,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Сдвиг для следующих страниц","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Найденные салоны","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string","format":"uri"},"version":{"const":1},"source":{"type":"string"},"docs":{"type":"string"},"terms":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"total":{"type":"integer"},"count":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"next":{"type":["string","null"],"format":"uri","description":"Следующая страница результатов"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Dealer"}}}}}}},"400":{"description":"Неверный параметр, текст ошибки в поле error"},"404":{"description":"Не найдено"}}}},"/api/dealers/{id}/":{"get":{"operationId":"getDealer","summary":"Один автосалон","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Салон","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"const":1},"item":{"$ref":"#/components/schemas/Dealer"}}}}}},"404":{"description":"Не найдено"}}}},"/api/cities/":{"get":{"operationId":"listCities","summary":"Города каталога","responses":{"200":{"description":"Города с числом салонов и машин","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string","format":"uri"},"version":{"const":1},"source":{"type":"string"},"docs":{"type":"string"},"terms":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"total":{"type":"integer"},"count":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"next":{"type":["string","null"],"format":"uri","description":"Следующая страница результатов"},"items":{"type":"array","items":{"$ref":"#/components/schemas/City"}}}}}}}}}}},"components":{"schemas":{"Car":{"type":"object","required":["id","url","title","make","make_slug","model","model_slug","availability","city","dealer","updated_at"],"properties":{"id":{"type":"integer","description":"Номер машины на autosalons.ru, не меняется"},"url":{"type":"string","format":"uri","description":"Страница машины. Ссылайтесь на неё в ответах"},"title":{"type":"string","description":"Марка, модель и год"},"make":{"type":"string"},"make_slug":{"type":"string"},"model":{"type":"string"},"model_slug":{"type":"string"},"year":{"type":["integer","null"],"description":"Год выпуска"},"condition":{"type":["string","null"],"enum":["new","used",null],"description":"Новая или с пробегом"},"condition_label":{"type":["string","null"],"description":"То же по-русски"},"availability":{"type":["string","null"],"enum":["in_stock","in_transit","on_order",null],"description":"В наличии, в пути в салон или под заказ"},"availability_label":{"type":["string","null"],"description":"То же по-русски"},"price_rub":{"type":["integer","null"],"description":"Цена в рублях. null, если салон не указал цену"},"old_price_rub":{"type":["integer","null"],"description":"Цена до скидки, если салон её прислал"},"mileage_km":{"type":["integer","null"],"description":"Пробег в километрах"},"trim":{"type":["string","null"],"description":"Комплектация"},"modification":{"type":["string","null"],"description":"Модификация, как её пишет салон"},"generation":{"type":["string","null"],"description":"Поколение"},"body_type":{"type":["string","null"],"description":"Кузов"},"engine":{"type":"object","properties":{"type":{"type":["string","null"],"enum":["petrol","diesel","hybrid","electric","gas",null],"description":"Топливо"},"type_label":{"type":["string","null"],"description":"То же по-русски"},"volume_l":{"type":["number","null"],"description":"Объём двигателя в литрах"},"power_hp":{"type":["integer","null"],"description":"Мощность в лошадиных силах"}}},"gearbox":{"type":["string","null"],"enum":["manual","automatic","robot","cvt",null],"description":"Коробка передач"},"gearbox_label":{"type":["string","null"],"description":"То же по-русски"},"drive":{"type":["string","null"],"enum":["front","rear","awd",null],"description":"Привод"},"drive_label":{"type":["string","null"],"description":"То же по-русски"},"wheel":{"type":["string","null"],"enum":["left","right",null],"description":"Руль"},"wheel_label":{"type":["string","null"],"description":"То же по-русски"},"color":{"type":["string","null"],"description":"Цвет"},"owners":{"type":["integer","null"],"description":"Владельцев по ПТС"},"accident":{"type":["boolean","null"],"description":"Была ли машина в аварии, по данным салона. null, если салон не указал"},"vin_masked":{"type":["string","null"],"description":"VIN со скрытой серединой: первые 8 и последние 4 знака"},"photos":{"type":"array","items":{"type":"string","format":"uri"},"description":"Фото с сервера салона или площадки"},"description":{"type":["string","null"],"description":"Текст салона"},"city":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"cars_url":{"type":"string","format":"uri"}}},"dealer":{"type":"object","description":"Салон, который продаёт машину. Подробности в /api/dealers/{id}/","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri","description":"Страница салона с отзывами и проверкой юрлица"},"address":{"type":["string","null"],"description":"Адрес"},"phones":{"type":"array","items":{"type":"string"},"description":"Телефоны в формате +7XXXXXXXXXX"},"rating":{"type":["number","null"],"description":"Сводная оценка салона от 1 до 5"},"rating_votes":{"type":"integer","description":"Сколько оценок в сводной"},"stamp":{"type":["string","null"],"enum":["active","liquidated","liquidating","bankrupt","entity_changed","many_complaints",null],"description":"Отметка о юрлице или жалобах"},"stamp_label":{"type":["string","null"],"description":"То же по-русски"},"legal_inn":{"type":["string","null"],"description":"ИНН юрлица салона"},"legal_status":{"type":["string","null"],"description":"Статус юрлица по ФНС, если проверен"}}},"first_seen_at":{"type":"string","format":"date-time","description":"Когда машина впервые появилась в фиде салона"},"updated_at":{"type":"string","format":"date-time","description":"Когда данные машины последний раз менялись"}}},"Dealer":{"type":"object","required":["id","name","url","city","type","rating","updated_at"],"properties":{"id":{"type":"string","description":"Номер салона на autosalons.ru, не меняется"},"name":{"type":"string"},"url":{"type":"string","format":"uri","description":"Страница салона с отзывами и проверкой юрлица"},"cars_url":{"type":["string","null"],"format":"uri","description":"Машины салона в наличии, если есть"},"cars_in_stock":{"type":"integer"},"city":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"reviews_url":{"type":"string","format":"uri"}}},"type":{"type":"string","enum":["official","used","grey","multibrand"],"description":"Официальный дилер, салон с пробегом, серый импорт или разные марки"},"type_label":{"type":["string","null"],"description":"То же по-русски"},"sells_new":{"type":["boolean","null"]},"sells_used":{"type":["boolean","null"]},"brands":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"official":{"type":"boolean","description":"Официальный дилер этой марки"}}}},"address":{"type":["string","null"],"description":"Адрес"},"geo":{"type":["object","null"],"properties":{"lat":{"type":"number"},"lon":{"type":"number"}}},"phones":{"type":"array","items":{"type":"string"},"description":"Телефоны в формате +7XXXXXXXXXX"},"phones_display":{"type":"array","items":{"type":"string"}},"website":{"type":["string","null"],"format":"uri","description":"Сайт салона"},"hours":{"type":["string","null"],"description":"Часы работы"},"network":{"type":["object","null"],"properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"rating":{"type":"object","properties":{"score":{"type":["number","null"],"description":"Сводная оценка от 1 до 5 по отзывам с разных площадок и на autosalons.ru"},"votes":{"type":"integer"},"method_url":{"type":"string","format":"uri","description":"Как считается оценка"},"own_reviews":{"type":"integer","description":"Отзывы, оставленные на autosalons.ru"},"own_rating":{"type":["number","null"],"description":"Средняя оценка в этих отзывах"},"external":{"type":"array","description":"Оценки на других площадках со ссылками","items":{"type":"object","properties":{"source":{"type":"string"},"source_name":{"type":"string"},"url":{"type":["string","null"],"format":"uri","description":"Страница отзывов на площадке"},"rating":{"type":["number","null"],"description":""},"reviews_count":{"type":["integer","null"],"description":""}}}}}},"official_dealer_listings":{"type":"array","description":"Где салон указан на сайте марки как официальный дилер","items":{"type":"object","properties":{"brand_slug":{"type":"string"},"url":{"type":["string","null"],"format":"uri","description":""}}}},"complaints_90d":{"type":"integer","description":"Жалобы за 90 дней"},"stamp":{"type":["string","null"],"enum":["active","liquidated","liquidating","bankrupt","entity_changed","many_complaints",null],"description":"Отметка о юрлице или жалобах"},"stamp_label":{"type":["string","null"],"description":"То же по-русски"},"legal":{"type":["object","null"],"description":"Юрлицо салона и его проверка в ФНС","properties":{"name":{"type":["string","null"],"description":""},"inn":{"type":"string"},"ogrn":{"type":["string","null"],"description":""},"registered":{"type":["string","null"],"description":"Дата регистрации"},"checked_in_fns":{"type":"boolean"},"status":{"type":["string","null"],"description":"Статус по ФНС: active, liquidating, liquidated, bankrupt, reorganizing"},"status_label":{"type":["string","null"],"description":"То же по-русски"},"checked_at":{"type":["string","null"],"description":"Когда проверяли"},"source_url":{"type":["string","null"],"format":"uri","description":"Где проверяли"},"changes":{"type":"integer","description":"Сколько раз салон менял юрлицо"}}},"updated_at":{"type":"string","format":"date-time","description":"Когда данные салона последний раз менялись"}}},"City":{"type":"object","required":["slug","name","dealers"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"region":{"type":["string","null"],"description":"Регион"},"geo":{"type":["object","null"],"properties":{"lat":{"type":"number"},"lon":{"type":"number"}}},"dealers":{"type":"integer","description":"Салонов в каталоге"},"cars_in_stock":{"type":"integer"},"reviews_url":{"type":"string","format":"uri","description":"Салоны города с отзывами"},"cars_url":{"type":["string","null"],"format":"uri","description":"Машины в наличии в городе, если есть"},"dealers_feed":{"type":"string","format":"uri"},"cars_feed":{"type":["string","null"],"format":"uri","description":"Фид машин города, если есть"}}}}}}