### API Request Examples for Vehicle Information Source: https://baza-gai.com.ua/api/index Demonstrates how to make API requests to retrieve vehicle information using a license plate. It includes examples for cURL, JavaScript, Ruby, Python, Node.js, and PHP, showing how to set the necessary headers ('Accept: application/json' and 'X-Api-Key'). ```curl curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/nomer/KA0007XB' ``` ```javascript let url = "https://baza-gai.com.ua/nomer/KA0007XB"; let key = "$API_KEY"; let request = fetch(url, {headers: {"Accept": "application/json", "X-Api-Key": key}}).then(r => r.json()); let data = await request; // или // let data; // request.then(d => data = d); ``` ```ruby require "httparty" key = "$API_KEY" url = "https://baza-gai.com.ua/nomer/KA0007XB" data = HTTParty.get(url, {headers: {"Accept" => "application/json", "X-Api-Key" => key}}) ``` ```python import requests key = "$API_KEY" url = "https://baza-gai.com.ua/nomer/KA0007XB" r = requests.get(url, headers={"Accept": "application/json", "X-Api-Key": key}) data = r.json() ``` ```javascript let got = require("got"); let key = "$API_KEY"; let url = "https://baza-gai.com.ua/nomer/KA0007XB"; let data = await got(url, {headers: {"Accept": "application/json", "X-Api-Key": key}}).json(); ``` ```php $opts = [ "http" => [ "method" => "GET", "header" => "Accept: application/json\r\n"."X-Api-Key: $API_KEY\r\n" ] ]; $context = stream_context_create($opts); $data = json_decode(file_get_contents("https://baza-gai.com.ua/nomer/KA0007XB", false, $context)); ``` -------------------------------- ### API Request Example (cURL) Source: https://baza-gai.com.ua/api/index This example demonstrates how to make a request to the Baza Gai UA API to calculate import duties and taxes for a car. It specifies required parameters like currency, car type, price, volume, motor type, and year. The API endpoint used is for tax calculation. ```bash curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/taxes?currency=EUR&car_type=car&price=10000&volume=2.0&motor=diesel&year=2018' ``` -------------------------------- ### GET /make Source: https://baza-gai.com.ua/api/index Retrieves a list of all car manufacturers available in the database. ```APIDOC ## GET /make ### Description Retrieves a list of all car manufacturers available in the database. ### Method GET ### Endpoint /make ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the manufacturer. - **title** (string) - The name of the manufacturer. - **slug** (string) - A URL-friendly identifier for the manufacturer. ``` -------------------------------- ### GET /make/:vendor Source: https://baza-gai.com.ua/api/changelog Retrieves a catalog of models for a specific vehicle make (vendor). ```APIDOC ## GET /make/:vendor ### Description Retrieves a list of available models for a given vehicle make (vendor). This endpoint provides model details such as their identifiers and photo URLs. ### Method GET ### Endpoint `/make/:vendor` ### Parameters #### Path Parameters - **vendor** (string) - Required - The name or identifier of the vehicle make. ### Response #### Success Response (200) - **catalog_models** (array) - A list of models available for the specified vendor. Each model object may contain: - **catalog_model** (string) - The identifier for the model. - **photo_url** (string) - The URL of a representative photo for the model. - **other_models** (array) - Potentially other related models. #### Response Example ```json { "catalog_models": [ { "catalog_model": "ModelX", "photo_url": "http://example.com/photo.jpg", "other_models": [] } ] } ``` ``` -------------------------------- ### GET /popular Source: https://baza-gai.com.ua/api/changelog Retrieves a list of popular vehicles. The title field has been updated to start with a capital letter. ```APIDOC ## GET /popular ### Description Returns a list of popular vehicles. The `title` field in the response now begins with a capital letter, offering improved readability. ### Method GET ### Endpoint `/popular` ### Response #### Success Response (200) - **title** (string) - The name of the popular vehicle, starting with a capital letter. #### Response Example ```json { "title": "Popular Model" } ``` ``` -------------------------------- ### GET /make/:vendor/:model Source: https://baza-gai.com.ua/api/changelog Retrieves detailed information for a specific vehicle model from a given make. ```APIDOC ## GET /make/:vendor/:model ### Description Fetches detailed information about a specific vehicle model, including its full title, catalog identifier, production year range, and photo URL. ### Method GET ### Endpoint `/make/:vendor/:model` ### Parameters #### Path Parameters - **vendor** (string) - Required - The make of the vehicle. - **model** (string) - Required - The specific model of the vehicle. ### Response #### Success Response (200) - **full_title** (string) - The complete title of the vehicle model. - **catalog_model** (string) - The catalog identifier for the model. - **year_from** (integer) - The starting year of the model's production range. - **year_to** (integer) - The ending year of the model's production range. - **photo_url** (string) - The URL of a representative photo for the model. #### Response Example ```json { "full_title": "Example Make Example Model", "catalog_model": "ExampleModel", "year_from": 2010, "year_to": 2020, "photo_url": "http://example.com/model_photo.jpg" } ``` ``` -------------------------------- ### GET /make/:vendor Source: https://baza-gai.com.ua/api/index Retrieves detailed information about a specific car manufacturer, including its models and registration statistics. ```APIDOC ## GET /make/:vendor ### Description Retrieves detailed information about a specific car manufacturer, including its models and registration statistics. ### Method GET ### Endpoint /make/:vendor #### Path Parameters - **vendor** (string) - Required - The slug of the manufacturer (e.g., 'lamborghini'). ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the manufacturer. - **title** (string) - The name of the manufacturer. - **slug** (string) - A URL-friendly identifier for the manufacturer. - **first_registration_count** (integer) - The count of first registrations for this manufacturer. - **all_registration_count** (integer) - The total count of all registrations for this manufacturer. - **first_registration_count_by_years** (object) - An object containing first registration counts for specific years. - **catalog_models** (array) - An array of catalog models for this manufacturer. - **slug** (string) - The slug of the model. - **title** (string) - The name of the model. - **plate_count** (integer) - The number of plates associated with this model. - **first_registration_count** (integer) - The count of first registrations for this model. - **years** (string) - The production years for the model. - **photo_url** (string) - URL to an image of the model. - **other_models** (object) - An object containing other models categorized by type. ``` -------------------------------- ### GET /taxes Source: https://baza-gai.com.ua/api/index Calculate import taxes and fees for a vehicle. The parameters vary depending on the car type. ```APIDOC ## GET /taxes ### Description Calculate import taxes and fees for a vehicle. The parameters vary depending on the car type. ### Method GET ### Endpoint /taxes ### Parameters #### Query Parameters - **car_type** (string) - Required - Type of car: `car`, `electric`, `hybrid`, `motorcycle`, `truck` - **price** (number) - Required - Cost of the car. Example: `10000` - **currency** (string) - Required - Currency: `USD`, `EUR`, `UAH` #### Car Type Specific Parameters: ##### For `car`, `motorcycle`, `truck`: - **volume** (number) - Required - Engine displacement. For cars and trucks in liters (dm³), e.g., `2.5`. For motorcycles in cm³, e.g., `150`. - **year** (integer) - Required - Year of manufacture. Example: `2021` ##### For `car` and `truck`: - **motor** (string) - Required - Fuel type: `petrol`, `diesel` ##### For `electric`: - **power** (integer) - Required - Power in kW⋅h. Example: `150` ##### For `truck`: - **vehicle_type** (string) - Required - Body type: `lorry`, `truck`. If `truck`, `volume`, `weight`, `year`, and `motor` can be omitted. - **weight** (integer) - Optional - Gross weight in kg. Example: `5000` ### Request Example ``` https://baza-gai.com.ua/taxes?currency=EUR&car_type=car&price=10000&volume=2.0&motor=diesel&year=2018 ``` ### Response #### Success Response (200) - **origin_price** (number) - The price of the car provided in the request. - **nds** (number) - Value Added Tax (VAT). - **duty** (number) - Customs duty. - **excise** (number) - Excise tax. - **pension_fund** (number) - Pension fund contribution. - **all_fees** (number) - Total fees excluding pension fund. - **all_fees_with_pension_fund** (number) - Total fees including pension fund. - **result_price** (number) - Total price including customs clearance. - **currency** (string) - The currency of the calculation. - **result_price_usd** (number) - Total price including customs clearance in USD. - **result_price_eur** (number) - Total price including customs clearance in EUR. - **result_price_uah** (number) - Total price including customs clearance in UAH. #### Response Example ```json { "origin_price": 10000, "nds": 2260, "duty": 1000, "excise": 300, "pension_fund": 339, "all_fees": 3560, "all_fees_with_pension_fund": 3899, "result_price": 13899.0, "currency": "EUR", "result_price_usd": 16540, "result_price_eur": 13899, "result_price_uah": 464922 } ``` ``` -------------------------------- ### GET /catalog/:vendor/:model Source: https://baza-gai.com.ua/api/changelog Retrieves catalog information for a specific vehicle model within a given make. ```APIDOC ## GET /catalog/:vendor/:model ### Description Fetches catalog details for a specific vehicle model belonging to a particular make. This endpoint provides the full title and photo URL for the model. ### Method GET ### Endpoint `/catalog/:vendor/:model` ### Parameters #### Path Parameters - **vendor** (string) - Required - The make of the vehicle. - **model** (string) - Required - The specific model of the vehicle. ### Response #### Success Response (200) - **full_title** (string) - The complete title of the vehicle model. - **photo_url** (string) - The URL of a representative photo for the model. #### Response Example ```json { "full_title": "Example Make Example Model", "photo_url": "http://example.com/catalog_photo.jpg" } ``` ``` -------------------------------- ### Stolen Vehicle Details Source: https://baza-gai.com.ua/api/index Example structure for `stolen_details` field when a vehicle is reported stolen. ```APIDOC ## Stolen Vehicle Details ### Description This section provides an example of the structure for the `stolen_details` field, which is included when a vehicle is reported stolen. This information can be returned when querying by license plate or VIN. ### Response Example (stolen_details field) ```json { "stolen_details": [ { "theft_at": "15.01.2022", "vendor_title": "MERCEDES-BENZ - ATEGO 1828", "color": { "id": 6, "title": { "ru": "Бежевый", "ua": "БЕЖЕВИЙ" }, "slug": "beige" }, "raw_color": "БЕЖЕВИЙ" } ] } ``` ``` -------------------------------- ### GET /taxes Source: https://baza-gai.com.ua/api/changelog Calculator for customs duties (rastamozhka) on vehicles. Provides a breakdown of fees and final prices in different currencies. ```APIDOC ## GET /taxes ### Description A calculator for vehicle customs duties. This endpoint provides a detailed breakdown of all fees, including those for the pension fund, and presents the final price in various currencies (USD, EUR, UAH). ### Method GET ### Endpoint `/taxes` ### Parameters #### Query Parameters *(Note: Specific query parameters for the tax calculator are not detailed in the provided text, but would typically include vehicle details like cost, engine size, age, etc.)* ### Response #### Success Response (200) - **origin_price** (number) - The original price of the vehicle. - **pension_fund** (number) - The calculated pension fund fee. - **all_fees** (number) - The total of all other applicable fees. - **all_fees_with_pension_fund** (number) - The sum of all fees including the pension fund fee. - **result_price** (number) - The final calculated price in the base currency. - **result_price_usd** (number) - The final calculated price in USD. - **result_price_eur** (number) - The final calculated price in EUR. - **result_price_uah** (number) - The final calculated price in UAH. #### Response Example ```json { "origin_price": 10000, "pension_fund": 500, "all_fees": 1500, "all_fees_with_pension_fund": 2000, "result_price": 12000, "result_price_usd": 300, "result_price_eur": 270, "result_price_uah": 480000 } ``` ``` -------------------------------- ### GET /popular Source: https://baza-gai.com.ua/api/index Retrieves lists of the most popular new cars, new car brands, and used car brands. ```APIDOC ## GET /popular ### Description Retrieves lists of the most popular new cars, new car brands, and used car brands. ### Method GET ### Endpoint /popular ### Response #### Success Response (200) - **top_new_cars** (array) - A list of the most popular new cars. - **vendor** (object) - Information about the car's manufacturer. - **id** (integer) - Manufacturer ID. - **title** (string) - Manufacturer name. - **slug** (string) - Manufacturer slug. - **model** (object) - Information about the car model. - **id** (integer) - Model ID. - **title** (string) - Model name. - **slug** (string) - Model slug. - **first_registration_count** (integer) - Count of first registrations for this model. - **top_new_vendors** (array) - A list of the most popular new car brands. - **id** (integer) - Vendor ID. - **vendor** (string) - Vendor name. - **slug** (string) - Vendor slug. - **first_registration_count** (integer) - Count of first registrations for this vendor. - **top_secondary_vendors** (array) - A list of the most popular used car brands. - **id** (integer) - Vendor ID. - **vendor** (string) - Vendor name. - **slug** (string) - Vendor slug. - **all_registration_count** (integer) - Total registration count for this vendor in the used market. ``` -------------------------------- ### GET /make/:vendor/:model Source: https://baza-gai.com.ua/api/index Retrieves specific details about a car model from a particular manufacturer. ```APIDOC ## GET /make/:vendor/:model ### Description Retrieves specific details about a car model from a particular manufacturer. ### Method GET ### Endpoint /make/:vendor/:model #### Path Parameters - **vendor** (string) - Required - The slug of the manufacturer (e.g., 'lamborghini'). - **model** (string) - Required - The slug of the car model (e.g., 'huracan'). ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the model entry. - **title** (string) - The title of the model. - **slug** (string) - A URL-friendly identifier for the model. - **full_title** (string) - The full name of the model including the manufacturer. - **catalog_model** (object) - Detailed information about the catalog model. - **id** (integer) - The catalog model ID. - **vendor_id** (integer) - The manufacturer's ID. - **slug** (string) - The model's slug. - **title** (string) - The model's title. - **plate_count** (integer) - The number of plates associated with this model. - **years** (string) - The production years for the model. - **is_current** (boolean) - Indicates if the model is currently in production. - **description** (string) - A description of the model. - **year_from** (integer) - The year the model started production. - **year_to** (integer|null) - The year the model ended production (if applicable). - **photo_url** (string) - URL to an image of the model. ``` -------------------------------- ### GET /search Source: https://baza-gai.com.ua/api/index Performs an advanced search for vehicles based on specified criteria. ```APIDOC ## GET /search ### Description Performs an advanced search for vehicles based on specified criteria. ### Method GET ### Endpoint /search #### Query Parameters - **vendor** (string) - Optional - The slug of the manufacturer (e.g., 'audi', 'bmw'). - **catalog_model** (string) - Optional - The slug of the catalog model (e.g., 'a4', 'm5'). - **year_from** (integer) - Optional - The minimum year of manufacture (e.g., 2015, 2020). ``` -------------------------------- ### GET /search Source: https://baza-gai.com.ua/api/changelog Performs a search for vehicles based on various criteria. Supports updated field names for registration date and photo URL. ```APIDOC ## GET /search ### Description Allows searching for vehicles using various criteria. This endpoint has been updated to use `registered_at` for the registration date and `photo_url` for the vehicle's photo. ### Method GET ### Endpoint `/search` ### Parameters #### Query Parameters *(Note: Specific query parameters for search are not detailed in the provided text, but would typically include fields like make, model, year, etc.)* ### Response #### Success Response (200) *(Note: Specific response fields for search are not detailed, but would typically include vehicle details like `registered_at` and `photo_url`)* #### Response Example ```json { "registered_at": "YYYY-MM-DD", "photo_url": "http://example.com/vehicle.jpg" } ``` ``` -------------------------------- ### GET /catalog/:vendor/:model/plates Source: https://baza-gai.com.ua/api/changelog Retrieves information about license plates for a specific vehicle model. ```APIDOC ## GET /catalog/:vendor/:model/plates ### Description Provides information related to license plates for a specific vehicle model. This includes the full title of the model, its photo URL, and registration details. ### Method GET ### Endpoint `/catalog/:vendor/:model/plates` ### Parameters #### Path Parameters - **vendor** (string) - Required - The make of the vehicle. - **model** (string) - Required - The specific model of the vehicle. ### Response #### Success Response (200) - **full_title** (string) - The complete title of the vehicle model. - **photo_url** (string) - The URL of a representative photo for the model. - **registration** (string) - Information related to the vehicle's registration. #### Response Example ```json { "full_title": "Example Make Example Model", "photo_url": "http://example.com/plate_photo.jpg", "registration": "Example Registration Info" } ``` ``` -------------------------------- ### GET /catalog/:vendor/:model/photos Source: https://baza-gai.com.ua/api/index Retrieves photos for different generations and body types of a car model from the catalog. Access to this endpoint requires a subscription of at least 10,000 requests per month. ```APIDOC ## GET /catalog/:vendor/:model/photos ### Description Retrieves photos for different generations and body types of a car model from the catalog. **Note:** This path is only available with a subscription of 10,000+ requests per month. ### Method GET ### Endpoint `/catalog/:vendor/:model/photos` ### Parameters #### Path Parameters - **vendor** (string) - Required - The vendor (make) of the car. - **model** (string) - Required - The model of the car. ### Request Example ``` curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/catalog/lamborghini/aventador/photos' ``` ### Response #### Success Response (200) - **title** (string) - The title of the car model. - **vendor_slug** (string) - The slug for the car vendor. - **catalog_model_slug** (string) - The slug for the car model. - **generations** (array) - An array of car generations. - **id** (integer) - The ID of the generation. - **name** (string) - The name of the generation. - **years** (string) - The years the generation was built. - **bodies** (array) - An array of car body types for the generation. - **id** (integer) - The ID of the body type. - **name** (string) - The name of the body type (e.g., "Купе"). - **photos** (array) - An array of photo objects. - **img_path** (string) - The URL to the full-size image. - **thumb_path** (string) - The URL to the thumbnail image. #### Response Example ```json { "title": "Lamborghini Aventador", "vendor_slug": "lamborghini", "catalog_model_slug": "aventador", "generations": [ { "id": 840, "name": "I Рестайлинг", "years": "2016 – н.в.", "bodies": [ { "id": 1236, "name": "Купе", "photos": [ { "img_path": "https://baza-gai.com.ua/catalog-images/lamborghini/aventador/I Рестайлинг/Купе/images/0.jpg", "thumb_path": "https://baza-gai.com.ua/catalog-images/lamborghini/aventador/I Рестайлинг/Купе/thumbs/0.jpg" }, { "img_path": "https://baza-gai.com.ua/catalog-images/lamborghini/aventador/I Рестайлинг/Купе/images/1.jpg", "thumb_path": "https://baza-gai.com.ua/catalog-images/lamborghini/aventador/I Рестайлинг/Купе/thumbs/1.jpg" } ] } ] } ] } ``` ``` -------------------------------- ### GET /catalog/:vendor/:model/plates Source: https://baza-gai.com.ua/api/index Retrieves registration information for a car model from the catalog. Access to this endpoint requires a subscription of at least 10,000 requests per month. ```APIDOC ## GET /catalog/:vendor/:model/plates ### Description Retrieves registration information for a car model from the catalog. **Note:** This path is only available with a subscription of 10,000+ requests per month. ### Method GET ### Endpoint `/catalog/:vendor/:model/plates` ### Parameters #### Path Parameters - **vendor** (string) - Required - The vendor (make) of the car. - **model** (string) - Required - The model of the car. #### Query Parameters - **page** (integer) - Optional - The page number for the results. Defaults to the first page. - **order** (string) - Optional - Specifies the sorting field. Possible values: `model_year`, `registered_at`. Defaults to `registered_at`. - **order_type** (string) - Optional - Specifies the sorting order. Possible values: `ASC`, `DESC`. Defaults to `DESC`. ### Request Example ``` curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/catalog/bmw/3er/plates?order=registered_at&order_type=desc&page=1' ``` ### Response #### Success Response (200) - **id** (integer) - The ID of the car model. - **title** (string) - The title of the car model. - **slug** (string) - The slug for the car model. - **full_title** (string) - The full title of the car, including the vendor. - **production** (string) - The production years of the model. - **photo_url** (string) - URL to the model's primary photo. - **first_registration_count** (integer) - The count of first registrations. - **all_registration_count** (integer) - The total count of all registrations. - **first_registration_count_by_years** (object) - An object containing first registration counts by year. - **all_items_count** (integer) - Total number of items in the catalog for this model. - **pages_count** (integer) - The total number of pages available for this model's registrations. - **current_page** (integer) - The current page number of the results. - **plates** (array) - An array of registration plate objects. - **digits** (string) - The license plate number. - **registered_at** (string) - The date of registration (DD.MM.YYYY). - **model_year** (integer) - The manufacturing year of the car. - **notes** (string) - Additional notes about the vehicle (e.g., color, engine type). - **operation** (object) - Information about the registration operation. - **group** (string) - The group of the operation. - **code** (integer) - The code of the operation. - **title_ru** (string) - The title of the operation in Russian. - **title_uk** (string) - The title of the operation in Ukrainian. - **department** (object) - Information about the registration department. - **title** (string) - The title of the department (e.g., "ТСЦ 5141"). - **address** (string) - The address of the department. #### Response Example ```json { "id": 240, "title": "3 серия", "slug": "3er", "full_title": "BMW 3 серия", "production": "1975 – н.в.", "photo_url": "https://baza-gai.com.ua/catalog-images/bmw/3er/model.jpg", "first_registration_count": 17760, "all_registration_count": 66459, "first_registration_count_by_years": { "2021": 2701, "2020": 3482, "2019": 8021, "2018": 1693, "2017": 749, "2016": 337 }, "all_items_count": 66459, "pages_count": 3323, "current_page": 3, "plates": [ { "digits": "BH9787OO", "registered_at": "31.07.2021", "model_year": 2017, "notes": "Черный, Дизель, 2.0L", "operation": { "group": "Вторичная регистрация", "code": 315, "title_ru": "Перерегистрация, новый собственник (договор в ТСЦ)", "title_uk": "ПЕРЕРЕЄСТРАЦІЯ ТЗ НА НОВ. ВЛАСН. ПО ДОГОВОРУ УКЛАДЕНОМУ В ТСЦ" }, "department": { "title": "ТСЦ 5141", "address": "65114, м. Одеса, вул. Ак. Корольова, 5" } } ] } ``` ``` -------------------------------- ### GET /nomer/:digits Source: https://baza-gai.com.ua/api/changelog Retrieves information about a vehicle using its registration number or VIN. Includes details like comments from users. ```APIDOC ## GET /nomer/:digits ### Description Retrieves detailed information about a vehicle based on its registration number or VIN. This endpoint also provides access to user-added comments related to the vehicle's registration number. ### Method GET ### Endpoint `/nomer/:digits` ### Parameters #### Path Parameters - **digits** (string) - Required - The vehicle's registration number or VIN. ### Request Example ```json { "digits": "KA0007XB" } ``` ### Response #### Success Response (200) - **digits** (string) - The vehicle's registration number or VIN. - **comments** (array) - An array of user comments related to the vehicle. Each comment object contains: - **id** (integer) - The unique identifier for the comment. - **name** (string) - The name of the user who posted the comment. - **text** (string) - The content of the comment. - **created_at** (string) - The timestamp when the comment was created. - **updated_at** (string) - The timestamp when the comment was last updated. #### Response Example ```json { "digits": "KA0007XB", "comments": [ { "id": 1, "name": "Василий", "text": "Спасибо, что помогли прикурить авто!", "created_at": "2022-11-19T18:49:30.392+02:00", "updated_at": "2022-11-19T18:49:30.392+02:00" } ] } ``` ``` -------------------------------- ### Get List of All Car Manufacturers (curl) Source: https://baza-gai.com.ua/api/index Fetches a list of all supported car manufacturers. Each manufacturer is returned with its ID, title, and slug. This endpoint is useful for populating dropdowns or providing a reference for other manufacturer-related queries. ```curl curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/make' ``` -------------------------------- ### Get Vehicle Registration Data by Plate (curl) Source: https://baza-gai.com.ua/api/index Retrieves detailed information about a vehicle based on its license plate. Includes region, available endings, counts, and specific plate details. The `page` parameter can be used to paginate results. ```curl curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/nomer/KA1111' ``` -------------------------------- ### Get Specific Car Model Data by Manufacturer (curl) Source: https://baza-gai.com.ua/api/index Fetches detailed information about a specific car model from a particular manufacturer. Requires both the vendor slug and the model slug. Provides model details, registration counts, and years of production. ```curl curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/make/lamborghini/huracan' ``` -------------------------------- ### GET /vin/:vin Source: https://baza-gai.com.ua/api/index Retrieves information about a vehicle and its registrations using its VIN code. VIN codes are only available for vehicles registered from 2021 onwards. ```APIDOC ## GET /vin/:vin ### Description Retrieves detailed information about a vehicle and its registration history using its VIN code. Note: VIN data is available only for vehicles registered from 2021 onwards. ### Method GET ### Endpoint `/vin/:vin` ### Parameters #### Path Parameters - **vin** (string) - Required - The Vehicle Identification Number (VIN). ### Request Example ```bash curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/vin/WBA7########57838' ``` ### Response #### Success Response (200) - **digits** (string) - The license plate number. - **vin** (string) - The VIN code. - **region** (object) - Information about the vehicle's registration region. - **vendor** (string) - The vehicle manufacturer. - **model** (string) - The vehicle model. - **model_year** (integer) - The model year of the vehicle. - **photo_url** (string) - URL to an image of the vehicle model. - **is_stolen** (boolean) - Indicates if the vehicle is reported stolen. - **stolen_details** (array) - Details about the vehicle if it is stolen. - **operations** (array) - A list of registration operations for the vehicle. #### Response Example ```json { "digits": "KA0007XB", "vin": "WBA7########57838", "region": { "name": "г. Киев", "name_ua": "м. Київ", "slug": "kyiv", "old_code": "AA", "new_code": "KA" }, "vendor": "BMW", "model": "M760LI", "model_year": 2021, "photo_url": "https://baza-gai.com.ua/catalog-images/bmw/7er/VI (G11-G12) Рестайлинг/image.jpg", "is_stolen": false, "stolen_details": null, "operations": [ { "digits": "KA0007XB", "is_last": true, "catalog_model_title": "7 серия", "catalog_model_slug": "7er", "body": { "id": 4, "ua": "СЕДАН", "ru": "Седан" }, "purpose": { "id": 1, "ua": "ЗАГАЛЬНИЙ", "ru": "Общий" }, "registered_at": "03.04.2021", "model_year": 2021, "vendor": "BMW", "vendor_slug": "bmw", "model": "M760LI", "operation": { "ru": "Первичная регистрация нового ТС, автосалон, ввезено из-за границы", "ua": "Первинна реєстрація нового тз придбаного в торгівельній організації, який ввезено з-за кордону" }, "department": "ТСЦ 8047", "color": { "slug": "gray", "ru": "Серый", "ua": "Сірий" }, "is_registered_to_company": false, "address": "м.Київ, Деснянський", "koatuu": 8036400000, "displacement": 6592, "kind": { "id": 1, "ru": "Легковой", "ua": "Легковий", "slug": "car" }, "operation_group": { "id": 1, "ru": "Первичная регистрация", "ua": "Первинна реєстрація" } } ] } ``` ``` -------------------------------- ### GET /nomer/:digits_most_part Source: https://baza-gai.com.ua/api/index Retrieves vehicle registration information for a given license plate prefix. Supports pagination via a 'page' query parameter. ```APIDOC ## GET /nomer/:digits_most_part ### Description Retrieves vehicle registration information for a given license plate prefix. Supports pagination via a 'page' query parameter. ### Method GET ### Endpoint /nomer/:digits_most_part #### Query Parameters - **page** (integer) - Optional - The page number for pagination. Defaults to the first page. ``` -------------------------------- ### Get Specific Car Manufacturer Data (curl) Source: https://baza-gai.com.ua/api/index Retrieves detailed information for a specific car manufacturer identified by its vendor slug. Includes counts of first registrations, total registrations, and a catalog of its models with associated data. ```curl curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/make/lamborghini' ``` -------------------------------- ### Vehicle VIN Query Response JSON Source: https://baza-gai.com.ua/api/index Complete JSON response from the /vin/:vin endpoint containing vehicle information and complete registration operation history. Similar structure to license plate queries with additional registration operation details including catalog model information available for subscriptions starting from 10,000 requests. ```json { "digits": "KA0007XB", "vin": "WBA7########57838", "region": { "name": "г. Киев", "name_ua": "м. Київ", "slug": "kyiv", "old_code": "AA", "new_code": "KA" }, "vendor": "BMW", "model": "M760LI", "model_year": 2021, "photo_url": "https://baza-gai.com.ua/catalog-images/bmw/7er/VI (G11-G12) Рестайлинг/image.jpg", "is_stolen": false, "stolen_details": null, "operations": [ { "digits": "KA0007XB", "is_last": true, "catalog_model_title": "7 серия", "catalog_model_slug": "7er", "body": { "id": 4, "ua": "СЕДАН", "ru": "Седан" }, "purpose": { "id": 1, "ua": "ЗАГАЛЬНИЙ", "ru": "Общий" }, "registered_at": "03.04.2021", "model_year": 2021, "vendor": "BMW", "vendor_slug": "bmw", "model": "M760LI", "operation": { "ru": "Первичная регистрация нового ТС, автосалон, ввезено из-за границы", "ua": "Первинна реєстрація нового тз придбаного в торгівельній організації, який ввезено з-за кордону" }, "department": "ТСЦ 8047", "color": { "slug": "gray", "ru": "Серый", "ua": "Сірий" }, "is_registered_to_company": false, "address": "м.Київ, Деснянський", "koatuu": 8036400000, "displacement": 6592, "kind": { "id": 1, "ru": "Легковой", "ua": "Легковий", "slug": "car" }, "operation_group": { "id": 1, "ru": "Первичная регистрация", "ua": "Первинна реєстрація" } } ] } ``` -------------------------------- ### GET /nomer/{plate} Source: https://baza-gai.com.ua/api/index Search vehicle information by license plate number. Returns registration data and vehicle details associated with the provided plate number. ```APIDOC ## GET /nomer/{plate} ### Description Retrieve vehicle information by license plate number from the Ukrainian GAI database. ### Method GET ### Endpoint ``` https://baza-gai.com.ua/nomer/{plate} ``` ### Parameters #### Path Parameters - **plate** (string) - Required - Vehicle license plate number (e.g., KA0007XB) ### Request Headers - **Accept** (string) - Required - `application/json` - **X-Api-Key** (string) - Required - Your API key ### Request Examples #### Curl ```bash curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/nomer/KA0007XB' ``` #### JavaScript ```javascript let url = "https://baza-gai.com.ua/nomer/KA0007XB"; let key = "$API_KEY"; let request = fetch(url, {headers: {"Accept": "application/json", "X-Api-Key": key}}).then(r => r.json()); let data = await request; ``` #### Python ```python import requests key = "$API_KEY" url = "https://baza-gai.com.ua/nomer/KA0007XB" r = requests.get(url, headers={"Accept": "application/json", "X-Api-Key": key}) data = r.json() ``` #### Node.js ```javascript let got = require("got"); let key = "$API_KEY"; let url = "https://baza-gai.com.ua/nomer/KA0007XB"; let data = await got(url, {headers: {"Accept": "application/json", "X-Api-Key": key}}).json(); ``` #### Ruby ```ruby require "httparty" key = "$API_KEY" url = "https://baza-gai.com.ua/nomer/KA0007XB" data = HTTParty.get(url, {headers: {"Accept" => "application/json", "X-Api-Key" => key}}) ``` #### PHP ```php $opts = [ "http" => [ "method" => "GET", "header" => "Accept: application/json\r\n"."X-Api-Key: $API_KEY\r\n" ] ]; $context = stream_context_create($opts); $data = json_decode(file_get_contents("https://baza-gai.com.ua/nomer/KA0007XB", false, $context)); ``` ### Response #### Success Response (200) - **plate** (string) - License plate number - **region** (string) - Registration region - **owner_info** (object) - Vehicle owner information - **vehicle_info** (object) - Vehicle specifications and details - **registration_date** (string) - Date of registration - **status** (string) - Vehicle status ### Notes - Responses vary based on subscription tier - Premium subscriptions include VIN codes and operation type (primary/secondary/other) - Response includes remaining API requests in `X-RateLimit-Remaining` header ``` -------------------------------- ### Get Popular Car Data (curl) Source: https://baza-gai.com.ua/api/index Retrieves lists of the most popular new cars, new car vendors, and popular used car vendors. Data is typically categorized by year, providing insights into market trends. ```curl curl -H 'Accept: application/json' -H 'X-Api-Key: $API_KEY' 'https://baza-gai.com.ua/popular' ```