Auto-Complete

Implement real-time auto-completion for search inputs using facet capabilities with suggestions and counts across US and Canadian automotive inventory data.

The Auto-Complete API provides real-time search suggestions for vehicle-related fields across United States and Canadian automotive markets. This specialized tool leverages MarketCheck's extensive inventory database to deliver intelligent auto-completion capabilities, enabling developers to build sophisticated search interfaces with relevant term suggestions and inventory counts.

With flexible field-based matching and contextual filtering capabilities, this API enables developers, automotive platforms, and search applications to implement efficient search experiences that guide users toward available inventory and popular search terms.

Overview

  • Active Inventory Search: Provides suggestions based on current active dealer listings
  • Relevance-based Sorting with prefix, substring, and case-insensitive matching
  • Contextual Filtering allowing refined suggestions based on search context
  • Performance Optimization with configurable count thresholds and result limits
If you need to implement auto-completion for vehicle specifications like make, model, trim, etc., without inventory context, consider using the Taxonomy Auto-Complete API instead. This API is optimized for vehicle spec terms without requiring active inventory data.

Base Path

GET https://api.marketcheck.com/v2/search/car/auto-complete

The following example demonstrates how to use the Auto-Complete API to get suggestions for vehicle makes and models based on user input.

request.js
import axios from 'axios';

const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/search/car/auto-complete',
params: {api_key: 'YOUR_API_KEY', field: 'make', input: 'ac'},
headers: {Accept: 'application/json'}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

Explore the full range of parameters available for configuring auto-completion behavior in the Request section below.

Request

The Auto-Complete API provides extensive auto-completion capabilities for automotive search interfaces. You can generate suggestions for vehicle specifications, geographic locations, and various attributes while applying contextual filters to refine results based on current search state.

Parameters

Available parameters for configuring auto-completion behavior and filtering suggestions:

36 Params
api_key
string required

Your MarketCheck API authentication key. Required for every request, unless OAuth is used.

body_subtype
string

Filters listings by body subtype (e.g., Crew, Extended, Regular, Extended Crew). Accepts multiple values separated by commas.

body_type
string

Filters listings by body type (e.g., SUV, Pickup, Sedan, Hatchback, Convertible). Accepts multiple values separated by commas.

car_type
string

Filters listings by inventory type. Allowed values - new, used, certified.

city
string

Filters listings by city name (e.g. Los Angeles, San Francisco, Houston).

country
string

Filters listings by country code. Allowed values - us, ca, all. Default — us.

drivetrain
string

Filters listings by drivetrain (FWD, RWD, 4WD). Accepts multiple values separated by commas.

engine
string

Filters listings by engine designation (e.g., 2.0L I4, 3.5L V6, 2.5L H4). Accepts multiple values as comma-separated list.

engine_block
string

Filters listings by engine block layout (V, I, H). Accepts multiple values separated by commas.

engine_size
string

Filters listings by engine displacement size (e.g., 2.0, 2.5, 3.5). Accepts multiple values separated by commas.

exclude_dealer_ids
string

Excludes results from the specified dealer IDs. Accepts multiple values as a comma-separated list.

exclude_make
string

Excludes the specified makes. Accepts multiple values as a comma-separated list.

exclude_mc_website_ids
string

Excludes results from the specified MarketCheck website IDs. Accepts multiple values as comma-separated list.

exclude_sources
string

Excludes listings from the specified sources (e.g., autonation.com, carmax.com). Accepts multiple values as comma-separated list.

exterior_color
string

Filters listings by exterior color (e.g. White, Summit White, Gun Metallic). Accepts multiple values as comma-separated list.

facet_min_count
integer

Minimum document count for a facet bucket to be returned.

field
string

The field name for which to perform auto-completion.

fuel_type
string

Filters listings by fuel type (e.g., Unleaded, Diesel, Electric, Premium Unleaded, Electric / Unleaded). Accepts multiple values separated by commas.

ignore_case
boolean

If true, the auto-complete search is case-insensitive. Default — true.

in_transit
boolean

If true, returns listings marked as in transit; if false or omitted, no in-transit filter is applied.

include_non_vin_listings
boolean

If true, includes listings without a VIN; if false, such listings are excluded. Default — false.

input
string

The text input string used for auto-completion queries.

interior_color
string

Filters listings by interior color. Accepts multiple values as comma-separated list.

inventory_count_range
string

Filters dealers by total listing count. Specify as min-max listings (e.g., 10-100).

make
string

Filters listings by vehicle make (e.g., Toyota, Ford, Mercedes-Benz). Accepts multiple values as comma-separated list.

model
string

Filters listings by specific vehicle model (e.g., Camry). Accepts multiple values separated by commas.

radius
integer

Search radius around the specified location in miles. Used with zip or latitude and longitude for geospatial queries.

seller_type
string

Filters auto-complete suggestions by seller type. Allowed values — dealer, fsbo, auction.

sort_by
string

Field to sort results by. If omitted, defaults to distance when a location filter is used.

state
string

Filters listings by US or Canadian state/province code (e.g., CA, NY, ON). Accepts multiple codes separated by commas.

term_counts
boolean

If true, includes term frequency counts in the response. Default — false.

transmission
string

Filters listings by transmission type (Automatic, Manual, etc.). Accepts multiple values separated by commas.

trim
string

Filters listings by vehicle trim (e.g., EX, Limited). Accepts multiple values separated by commas.

vehicle_type
string

Filters listings by vehicle type (Truck, Car). Accepts multiple values separated by commas.

year
string

Filters listings by model year (e.g., 2020). Accepts multiple years separated by commas.

zip
string

Filters listings within the specified 5-digit ZIP code.

Defaults

  • country: Defaults to us for United States market
    • When generating suggestions for Canadian data, explicitly pass country=ca in each call
    • To include both US and Canadian suggestions, use country=all
  • term_counts: Defaults to false - returns simple array of matching terms
    • Use term_counts=true to include inventory counts for each suggestion
  • facet_min_count: Defaults to 1 - minimum inventory count threshold for terms to appear in suggestions

Required Parameters

The following parameters are required for auto-completion requests:

  • field - The field to search for auto-completion (see Available Fields below)
  • input - The user input to match against

Available Fields

Auto-completion is supported for the following vehicle and location fields:

FieldDescription
ymmYear-Make-Model combination
mmMake-Model combination
makeVehicle make
modelVehicle model
trimVehicle trim
body_typeBody type of the vehicle
body_subtypeSubtype of the vehicle body
vehicle_typeType of vehicle
transmissionTransmission type
drivetrainDrivetrain type
fuel_typeType of fuel used
exterior_colorExterior color of the vehicle
interior_colorInterior color of the vehicle
engineEngine type
engine_sizeSize of the engine
engine_blockEngine block type
stateState location
cityCity location

Contextual Filtering

Apply additional filters to refine suggestions based on current search context. Use any of the standard inventory parameters to scope suggestions to specific criteria:

  • Geographic Scope: Use state, city, zip, or radius to limit suggestions to specific regions
  • Vehicle Filters: Apply make, model, year, etc. to get contextual suggestions
  • Inventory Type: Use car_type, seller_type to scope suggestions by listing type

Sorting & Matching

Auto-complete results are automatically sorted by relevance using intelligent matching algorithms:

Matching Types:

  1. Prefix matches - Terms beginning with input (highest relevance)
  2. Case-insensitive matches - Flexible text matching
  3. Substring matches - Terms containing input anywhere

Performance Limits:

  • Maximum 50 terms returned per request for optimal performance
  • Results automatically ranked by relevance score
  • No manual sorting parameters available

Response Schema

The Auto-Complete API returns suggestions in two possible formats depending on the term_counts parameter setting.

Default Format (term_counts=false)

Returns a simple array of matching terms, optimized for basic auto-completion:

interface AutoCompleteResponse {
  terms: string[];
}
Maximum response array size is limited to 50 terms for optimal performance.

With Counts Format (term_counts=true)

Returns detailed response with inventory counts for each suggestion:

interface AutoCompleteResponseWithCounts {
  terms: { item: string; count: number }[];
}
Using term_counts=true changes the response structure to include count data for each suggestion.

Use Cases & Examples

Intelligent Search Suggestions

Implement intelligent search suggestions that adapt to user input, providing relevant vehicle and location terms that match current inventory availability.

Example:

Here we're providing auto-completion for vehicle makes as the user types, returning the most relevant suggestions based on current inventory:

request.js
import axios from 'axios';

const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/search/car/auto-complete',
params: {api_key: 'YOUR_API_KEY', field: 'make', input: 'toy'},
headers: {Accept: 'application/json'}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

Contextual Model Suggestions

When users have already selected a make, provide contextual model suggestions that are relevant to their current search criteria and geographic location.

Example:

Here we're providing model suggestions for Ford vehicles in California, ensuring suggestions are relevant to available inventory in that region:

request.js
import axios from 'axios';

const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/search/car/auto-complete',
params: {
api_key: 'YOUR_API_KEY',
field: 'model',
input: 'f-',
make: 'Ford',
state: 'CA',
term_counts: 'true'
},
headers: {Accept: 'application/json'}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

Location-Based Auto-Complete

Provide location-based auto-completion for cities and states, helping users quickly find and select their desired search location.

Example:

Here we're providing city suggestions as users type, filtered to a specific state to maintain relevance:

request.js
import axios from 'axios';

const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/search/car/auto-complete',
params: {api_key: 'YOUR_API_KEY', field: 'city', input: 'san', state: 'CA'},
headers: {Accept: 'application/json'}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

Inventory Count Filtering

Filter auto-completion results to only show terms with sufficient inventory counts, reducing noise and focusing on popular or well-stocked options.

Example:

Here we're filtering suggestions to only include makes with at least 100 vehicles in inventory, ensuring users see popular and well-represented brands:

request.js
import axios from 'axios';

const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/search/car/auto-complete',
params: {
api_key: 'YOUR_API_KEY',
field: 'make',
input: 'a',
facet_min_count: '100',
term_counts: 'true'
},
headers: {Accept: 'application/json'}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

See Also