The Dealerships Search API allows you to find car dealerships across the USA and Canada using geographic coordinates, ZIP codes, or other filter criteria. This API provides comprehensive access to MarketCheck's enhanced dealership directory with sophisticated filtering, sorting, and analytics capabilities.
This is a new and improved system for maintaining and retrieving dealership information, replacing the older Dealers Search API. In this system, each dealership's websites, groups, multiple locations, rooftops, and other relevant data are integrated into a unified structure.
To understand more about dealership management, refer to the Dealership Management Guide
GET https://api.marketcheck.com/v2/dealerships/car
The following example demonstrates a basic request to the Dealerships Search API:
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/dealerships/car',
params: {api_key: 'YOUR_API_KEY', rows: '2'},
headers: {Accept: 'application/json'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
The Dealerships Search API provides extensive filtering and search capabilities for the enhanced dealership directory. You can search by geographic location, dealer identifiers, dealership groups, and various other criteria to find dealerships that match your requirements.
Available parameters for filtering, sorting, and configuring search results:
Your MarketCheck API authentication key. Required for every request, unless OAuth is used.
Filters listings by city name (e.g. Los Angeles, San Francisco, Houston).
Filters listings by country code. Allowed values - us, ca, all. Default — us.
Filters dealerships by age in days since creation. Specify as min-max days. Alternative of created_at_range.
Filters dealerships by creation date. Specify as YYYYMMDD-YYYYMMDD. Alternative of created_at_days.
Filters dealers by type. Allowed values — franchise, independent.
Field name to return bucket facets for. Accepts multiple fields as a comma-separated list.
Filters dealerships with their domain (e.g., carmax.com).
Latitude component of the search location (decimal degrees). Used for geospatial queries along with longitude and radius parameters.
Longitude component of the search location (decimal degrees). Used for geospatial queries along with latitude and radius parameters.
Filters listings by MarketCheck category code.
Filters listings by MarketCheck dealer ID.
Filters listings by MarketCheck dealership group ID.
Filters listings by dealership group name.
Filters listings by MarketCheck location ID.
Filters listings by MarketCheck rooftop ID.
Filters listings by MarketCheck sub-dealership group ID.
Filters listings by sub-dealership group name.
Filters listings by MarketCheck website ID.
Filters listings by Metropolitan Statistical Area (MSA) code.
Search radius around the specified location in miles. Used with zip or latitude and longitude for geospatial queries.
Comma-separated list of numeric field names for which to return range facets in the response.
Number of results to return per request. Default — 10. Maximum — 50.
Field to sort results by. If omitted, defaults to distance when a location filter is used.
Specifies result sort order. Allowed values — asc or desc. Default — asc.
Pagination offset (0-based). Default — 0. Maximum page is limited to 10,000/rows.
Filters listings by US or Canadian state/province code (e.g., CA, NY, ON). Accepts multiple codes separated by commas.
Filters listings within the specified 5-digit ZIP code.
| Parameter | Default Value | Description |
|---|---|---|
country | us | Defaults to United States market, can be set to ca for Canada |
Use start and rows parameters to iterate through search results efficiently.
The pagination parameters, interface and limits are similar to the Inventory Search API pagination, refer to that section for more details.
The sort_by and sort_order parameters allow you to control the order of results. The interface of these parameters is similar to the Inventory Search API sorting, refer to that section for more details.
Default Sorting:
Sorting Options:
Following are the fields you can sort by:
| Field Name | sort_by | Data Type | Default Order | Description |
|---|---|---|---|---|
| mc_website_id | mc_website_id | string | ascending | Unique identifier for dealership website |
| mc_dealer_id | mc_dealer_id | string | ascending | Unique identifier for the dealer |
| mc_location_id | mc_location_id | string | ascending | Unique identifier for dealership location |
| mc_rooftop_id | mc_rooftop_id | string | ascending | Unique identifier for dealership rooftop |
| mc_dealership_group_id | mc_dealership_group_id | string | ascending | Unique identifier for dealership group |
| mc_sub_dealership_group_id | mc_sub_dealership_group_id | string | ascending | Unique identifier for sub dealership group |
| created_at_days | created_at_days | integer | descending | Number of days since dealership record was created |
| created_at_range | created_at_range | string | descending | Date range when dealership record was created |
Similar to the Inventory Search API, this API also supports facets for aggregating results based on specific fields. Use facets to get unique value counts for categorical fields and range-based counts for numeric fields.
Field facets return unique terms and their counts for categorical data. For example, you can get counts of dealers by state or dealer type.
The interface and usage of facets is similar to the Inventory Search API facets, refer to that section for more details.
| Field Name | facet_name | Description |
|---|---|---|
| City | city | City where the dealership is located |
| State | state | State or province of the dealership |
| Country | country | Country of the dealership (USA or Canada) |
| Dealer Type | dealer_type | Unique dealer types (franchise, independent) |
| Website ID | mc_website_id | Unique identifier for dealership website |
| Dealer ID | mc_dealer_id | Unique identifier for the dealer |
| Location ID | mc_location_id | Unique identifier for dealership location |
| Rooftop ID | mc_rooftop_id | Unique identifier for dealership rooftop |
| Category | mc_category | Dealership category (e.g., franchise, independent) |
| Dealership Group ID | mc_dealership_group_id | Unique identifier for dealership group |
| Dealership Group Name | mc_dealership_group_name | Name of the dealership group |
| Sub Dealership Group ID | mc_sub_dealership_group_id | Unique identifier for sub dealership group |
| Sub Dealership Group Name | mc_sub_dealership_group_name | Name of the sub dealership group |
The Dealerships Search API returns dealership information in JSON format with pagination metadata for multiple results.
interface DealershipsResponse {
num_found: number; // Total number of dealerships matching search criteria
mc_dealerships: McDealership[]; // Array of dealership objects
}
interface McDealership {
mc_website_id: string; // Unique identifier for dealership website
mc_dealer_id: string; // Unique identifier for the dealer
mc_location_id: string; // Unique identifier for dealership location
mc_rooftop_id: string; // Unique identifier for dealership rooftop
mc_dealership_group_id?: string; // Unique identifier for dealership group
mc_dealership_group_name?: string; // Name of the dealership group
mc_sub_dealership_group_id?: string; // Unique identifier for sub dealership group
mc_sub_dealership_group_name?: string; // Name of the sub dealership group
mc_category: string; // Dealership category (franchise, independent)
seller_name: string; // Display name of the dealership
inventory_url: string; // URL to dealership's inventory page
status: string; // Current status of the dealership
dealer_type: string; // Type classification (franchise, independent)
street: string; // Street address of the dealership
city: string; // City where dealership is located
state: string; // State or province abbreviation
country: string; // Country code (US, CA)
zip?: string; // Postal/ZIP code
msa_code?: string; // Metropolitan Statistical Area code
latitude?: number; // Geographic latitude coordinate
longitude?: number; // Geographic longitude coordinate
seller_phone: string; // Primary phone number
seller_email?: string; // Email address if available
created_at: string; // Timestamp when dealership record was created
}
| Status Code | Description | Common Causes |
|---|---|---|
| 400 | Bad Request | Invalid parameter values |
| 401 | Unauthorized | Missing/invalid API key |
| 403 | Forbidden | Access denied to resource |
| 422 | Unprocessable Entity | Pagination limit exceeded |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Temporary server issues |
| 502 | Bad Gateway | Issues with upstream services |
| 503 | Service Unavailable | API maintenance or downtime |
Using spatial search with latitude and longitude coordinates you can find dealerships within a specified radius. Either latitude and longitude or zip code can be used as the center point for the search.
Example:
Here we're searching for dealerships within a 50-mile radius of a specific latitude and longitude:
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/dealerships/car',
params: {
api_key: 'YOUR_API_KEY',
latitude: '34.0522',
longitude: '-118.2437',
radius: '50',
rows: '2'
},
headers: {Accept: 'application/json'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
Search for dealerships belonging to a specific dealership group using group identifiers or names to analyze multi-location operations.
Example:
Here we're searching for all dealerships belonging to a specific dealership group:
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/dealerships/car',
params: {
api_key: 'YOUR_API_KEY',
mc_dealership_group_name: 'Penske Automotive Group Inc.',
rows: '2'
},
headers: {Accept: 'application/json'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
Find specific dealership locations using MarketCheck's unique identifiers for websites, locations, or rooftops.
Example:
Here we're searching for dealerships using specific MarketCheck identifiers:
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/dealerships/car',
params: {
api_key: 'YOUR_API_KEY',
mc_website_id: '124110',
mc_location_id: '1426861',
rows: '2'
},
headers: {Accept: 'application/json'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}