# Past Inventory Search API

Canonical URL: https://developers.marketcheck.com/apis/past-inventory-search

Updated: Nov 16, 2026

This is the Markdown version of https://developers.marketcheck.com/apis/past-inventory-search. Every page of this site has one at its own address with .md added (the home page's is https://developers.marketcheck.com/index.md). The prices are at https://developers.marketcheck.com/pricing.md.

> Search dealer listings that have ended, or only cars inferred sold, with last listed price and days on market. Recorded requests, responses and screens.

Search the dealer listings that recently ended, and narrow them to the cars MarketCheck infers were sold.

- Endpoint: `GET https://api.marketcheck.com/v2/search/car/recents`, with `api_key` as a query parameter
- Regions: United States, Canada, United Kingdom
- UK endpoint: `GET https://api.marketcheck.com/v2/search/car/uk/recents` (Past Inventory Search in the UK docs: https://docs.marketcheck.com/uk/docs/api/cars/inventory/past-inventory-search)
- Docs: https://docs.marketcheck.com/docs/api/cars/inventory/past-inventory-search
- This page: https://developers.marketcheck.com/apis/past-inventory-search

## Good to know
- The endpoint searches dealer listings that ended in the last 90 days, with the same filters and response shape as Inventory Search.
- Without `sold=true` the results include old listings of cars still for sale; with it, only cars that left the active listings and stayed out.
- A sale is inferred from listing activity, so the `price` on a row is its last listed price.
- Every request needs a location or a dealer to narrow it, and takes one facet field or one stats field at a time.

## Use cases

### Recently delisted comparables
A pricing tool wants the cars most like this one that recently left the market: filter to one model around a ZIP with sold=true, and sort_by=last_seen with sort_order=desc puts the newest first. Each row carries price, miles, dom and last_seen_at_date, and num_found counts every match.

Request: Used 2022 Toyota RAV4s inferred sold within 25 miles of ZIP 76053, most recently seen first, first 4 results.
```bash
curl "https://api.marketcheck.com/v2/search/car/recents?api_key=YOUR_API_KEY&car_type=used&year=2022&make=toyota&model=rav4&sold=true&zip=76053&radius=25&sort_by=last_seen&sort_order=desc&rows=4"
```

Response (recorded Nov 13, 2026). Each listing is cut to the fields a results table uses.
```json
{
  "num_found": 88,
  "listings": [
    {
      "price": 21725,
      "miles": 85248,
      "dom": 30,
      "last_seen_at_date": "2026-11-04T05:30:11.000Z",
      "dealer": {
        "name": "Four Stars Nissan",
        "city": "Corinth",
        "state": "TX"
      },
      "build": {
        "year": 2022,
        "make": "Toyota",
        "model": "RAV4",
        "trim": "LE",
        "body_type": "SUV"
      }
    },
    {
      "price": 14515,
      "miles": 217992,
      "dom": 63,
      "last_seen_at_date": "2026-11-01T05:48:31.000Z",
      "dealer": {
        "name": "Autonation Ford Arlington",
        "city": "Arlington",
        "state": "TX"
      },
      "build": {
        "year": 2022,
        "make": "Toyota",
        "model": "RAV4",
        "trim": "XLE Premium",
        "body_type": "SUV"
      }
    },
    {
      "price": 28229,
      "miles": 26836,
      "dom": 60,
      "last_seen_at_date": "2026-11-01T04:28:46.000Z",
      "dealer": {
        "name": "Don Davis Nissan",
        "city": "Arlington",
        "state": "TX"
      },
      "build": {
        "year": 2022,
        "make": "Toyota",
        "model": "RAV4",
        "trim": "LE",
        "body_type": "SUV"
      }
    },
    {
      "price": 27990,
      "miles": 33177,
      "dom": 23,
      "last_seen_at_date": "2026-10-29T11:53:51.000Z",
      "dealer": {
        "name": "Carvana Blue Mound",
        "city": "Blue Mound",
        "state": "TX"
      },
      "build": {
        "year": 2022,
        "make": "Toyota",
        "model": "RAV4",
        "trim": "XLE",
        "body_type": "SUV"
      }
    }
  ]
}
```

### How fast this model sells in the state
A dealer checks how long a model sits: stats=dom_active with rows=0 returns the minimum, maximum, mean and median days on market over every matching car inferred sold. dom_active is a car's latest stretch on the market across all sources; dom would count its whole listing history.

Request: Typical days to sell for used 2022 Toyota RAV4s inferred sold in Texas: days on market across all sources, as stats, with no listings returned.
```bash
curl "https://api.marketcheck.com/v2/search/car/recents?api_key=YOUR_API_KEY&car_type=used&year=2022&make=toyota&model=rav4&state=TX&sold=true&rows=0&stats=dom_active"
```

Response (recorded Nov 13, 2026). Showing the main stats and the 25th and 75th percentiles; sums and the other percentiles are left out.
```json
{
  "num_found": 516,
  "stats": {
    "dom_active": {
      "min": 1,
      "max": 835,
      "mean": 42.84,
      "median": 27,
      "percentiles": {
        "25.0": 12,
        "75.0": 53
      }
    }
  }
}
```

### What left dealer sites, by make
For a market-share chart or an assistant's answer, facets=make with sold=true and rows=0 returns one count of cars inferred sold per make, largest first. An offset and a limit follow the field name, the limit setting how many come back; num_found totals all makes.

Request: Cars inferred sold in Texas, counted by make, top 8, with no listings returned.
```bash
curl "https://api.marketcheck.com/v2/search/car/recents?api_key=YOUR_API_KEY&state=TX&sold=true&rows=0&facets=make|0|8"
```

Response (recorded Nov 13, 2026):
```json
{
  "num_found": 922128,
  "facets": {
    "make": [
      {
        "item": "Toyota",
        "count": 144309
      },
      {
        "item": "Ford",
        "count": 127264
      },
      {
        "item": "Chevrolet",
        "count": 110078
      },
      {
        "item": "Nissan",
        "count": 59444
      },
      {
        "item": "Honda",
        "count": 52008
      },
      {
        "item": "GMC",
        "count": 42340
      },
      {
        "item": "Hyundai",
        "count": 41893
      },
      {
        "item": "KIA",
        "count": 39573
      }
    ]
  }
}
```

### What sold near the store, by model
A store's buyer plans stock around the models that left dealer websites nearby. Send sold=true, facets=model and rows=0 with the store's ZIP and a radius: the response counts the inferred sold listings by model, new and used together unless car_type narrows them.

Request: Cars inferred sold within 25 miles of ZIP 76053, counted by model, top 8, with no listings returned.
```bash
curl "https://api.marketcheck.com/v2/search/car/recents?api_key=YOUR_API_KEY&sold=true&zip=76053&radius=25&rows=0&facets=model|0|8"
```

Response (recorded Nov 14, 2026):
```json
{
  "num_found": 171213,
  "facets": {
    "model": [
      {
        "item": "F-150",
        "count": 5895
      },
      {
        "item": "Silverado 1500",
        "count": 4639
      },
      {
        "item": "Camry",
        "count": 4421
      },
      {
        "item": "RAV4",
        "count": 3659
      },
      {
        "item": "Corolla",
        "count": 2807
      },
      {
        "item": "Tacoma",
        "count": 2786
      },
      {
        "item": "Ram 1500 Pickup",
        "count": 2706
      },
      {
        "item": "Rogue",
        "count": 2660
      }
    ]
  }
}
```

## Key parameters
- `api_key` (string, required): Your MarketCheck API authentication key. Required for every request, unless OAuth is used.
- `sold` (boolean): If `true`, returns listings that are inferred to be sold by MarketCheck.
- `car_type` (string): Filters listings by inventory type. Allowed values - `new`, `used`, `certified`.
- `year` (string): Filters listings by model year (e.g., `2020`). Accepts multiple years separated by commas.
- `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.
- `zip` (string): Filters listings within the specified 5-digit ZIP code.
- `radius` (integer): Search radius around the specified location in miles. Used with `zip` or `latitude` and `longitude` for geospatial queries.
- `state` (string): Filters listings by US or Canadian state/province code (e.g., `CA`, `NY`, `ON`). Accepts multiple codes separated by commas.
- `stats` (string): Comma-separated list of numeric fields for which to return aggregate statistics (mean, max, min, count).

## Questions

### What is the MarketCheck Past Inventory Search API?
The MarketCheck Past Inventory Search API searches dealer listings that are no longer active: the ones that ended in the last 90 days, in the US and Canada. A GET to /v2/search/car/recents returns them in the format Inventory Search uses, each with its last listed price and last seen date. sold=true keeps only the cars MarketCheck infers were sold.

### What is the difference between MarketCheck's Inventory Search and Past Inventory Search?
Inventory Search returns the cars on dealer websites today, and Past Inventory Search returns listings that have ended. The filters and the response format carry over. Two rules apply to the past endpoint alone: every request must be narrowed by a location or a dealer, and it accepts one facet, stats or range-facet field at a time.

### How does MarketCheck decide that a car in Past Inventory Search was sold?
A sale is inferred from listing activity, whether or not the dealer marks the car as sold. MarketCheck treats a VIN as sold once it has left the active listings and none of its listings has been seen for a set period, currently seven days. The sale is credited to the dealer it had identified as holding the car.

### What is the difference between sold=true and expired=true in Past Inventory Search?
In MarketCheck's Past Inventory Search, sold=true and expired=true both narrow the default result, which is listings that have ended, old listings of cars still for sale among them. expired=true keeps the listings of VINs with no active listing left. Of those, sold=true keeps only the ones inferred sold, leaving out cars that came off the market unsold.

## Related APIs
- Inventory Search: https://developers.marketcheck.com/apis/inventory-search
- History by VIN: https://developers.marketcheck.com/apis/vin-history
- Sold Vehicles Summary: https://developers.marketcheck.com/apis/market-trends

Replace YOUR_API_KEY with your key from https://developers.marketcheck.com/api-keys, and call the API from your server so the key stays private.
