DriveSmart API: Blending Car Searches



About Blending Car Search Results

Our search APIs allow users to look for cars meeting a wide range of criteris such as:

  • Company Cars: Including P11D value, CO2 output, annual or monthly benefit and tax;
  • Performance: Including top speed, acceleration, BHP and engine configuration;
  • Equipment & Features: Including factors such as standard equipment and zero cost options;
  • Price: Including factors basic and on-the-road price;
  • Monthly Payment: Including factors such as the finance type, term and annual mileage;
  • Body Style: Including factors such as fuel type, seats, gearbox and fuel type.
  • Electric Cars: Including factors such as battery range and recharge time;

The APIs can be combined to produce blended searches by factors such as company car tax and body style or battery range.

How To Blend Search Results

Each API produces a dataset with a datatable incorporating the CAPIDs of all cars matching the selected criteria.

To blend a series of search results simply:

  1. Extract the CAPID, MANUFACTURER, MODELDESCRIPTION and DERIVATIVEDESCRIPTION column and associated data rows from each of the datatables
  2. Make one new master table, appending the rows from each results table to the new master
  3. Count the number of instances of the CAPID and delete those table rows where the frequency of the CAPID in the table is less than the number of search tables

Finally, either;

  • delete duplicate rows for the CAPIDs which have the required number of instances; or
  • extract to a new table a list of distinct CAPIDs for those rows where the frequency of the CAPID matches the number of search tables

For example, if the search involves matching a monthly payment with battery recharge time and body style (3 criteria) then merge the CAPID, etc, columns of the 3 results tables.

Delete all rows where the number of instances of each CAPID in the merged table is less than 3.

Extract only the distinct remaining CAPID rows to a new table for your list of cars matching the aggregate search criteria for the user.

Bespoke Searches

We can create bespoke searches for you using any combination of search criteria to focus results on the targets of your end-user.

Contact us for more details about our bespoke API services.