MarketCheck caches few images from vehicle detail pages to make them available for later use when the original source may not be accessible. This endpoint allows you to retrieve these cached images using the listing ID and image ID.
api_key
is included in the response URLs by default, but for production use, you should remove it from the URL using append_api_key=false
query parameterapi_key
, you need to add it to the request to access the imagelisting_id
and image_id
GET https://api.marketcheck.com/v2/image/cache/car/{listing_id}/{image_id}
Path Parameters:
listing_id
: Unique identifier for the vehicle listingimage_id
: Specific identifier for the cached imageOften these URLs are provided in the response of the Inventory Search API or the Car Listing API
The following example demonstrates how to use the Cached Image API to retrieve a cached image using the listing ID and image ID.
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/image/cache/car/5TFUW5F16KX782196-44367fcc-c2fb/e93cff16913e9d2a75f3197d3ba15c7d',
params: {api_key: 'YOUR_API_KEY'},
headers: {Accept: 'image/jpeg, application/json'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
To retrieve a cached image, you need to make a GET request to the Cached Image API endpoint with the required parameters.
Your MarketCheck API authentication key. Required for every request, unless OAuth is used.
listing_id
: The unique identifier for the car listing you want to retrieve the cached image for. This parameter is case-sensitive and must be provided in the URL path.image_id
: The specific identifier for the cached image you want to retrieve. This parameter is also case-sensitive and must be provided in the URL path.The response schema for the Cached Image API is straightforward, as it returns the JPEG image file directly. The response headers are set to indicate the content type and caching policy.
200 OK
- Returns the cached image with appropriate content headers.Content-Type
: The MIME type of the image image/jpeg
Cache-Control
: Public, max-age=14400 (4 hours)Content-Length
: Size of the image file in bytesStatus 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 | Invalid listing_id or image_id |
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 |
After performing a search using the Inventory Search API, in response you will receive list of cached image URLs for each listing in media.photo_links_cached
field.
You can use those URLs to retrieve the cached images directly.
Example:
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/image/cache/car/5TFUW5F16KX782196-44367fcc-c2fb/e93cff16913e9d2a75f3197d3ba15c7d',
params: {api_key: 'YOUR_API_KEY'},
headers: {Accept: 'image/jpeg, application/json'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
Auction Listing Details
Retrieve comprehensive details about specific auction vehicle listings with complete vehicle specifications, auction house information, media content, and marketplace data.
History by VIN
Retrieve comprehensive vehicle listing history by VIN from MarketCheck's historical database