Search filter counts

GET https://api.api.sh/truecar/v1/facets
1 credit / call automotive try it in the playground →

How many cars match each filter value for a TrueCar search: makes with their models and trims, body styles, fuel types, year range, exterior and interior colors, key features, drivetrains, transmissions, recent price drops. Takes the same filters as /truecar/v1/search (gives the trim slugs to use there).

Every response includes credits_used: the credits this call cost.

Part of the TrueCar API: 8 endpoints with prices, use cases and example responses.

Parameters

nametypedescription
condition used | new Used (default) or new cars. Example: used
make string Make slug. Example: toyota
model string Model slug; needs make.
zip string 5-digit US ZIP code (nationwide without it). Example: 90210
radius 10 | 25 | 50 | 75 | 100 | 150 | 200 | 250 | 500 Miles around zip (default 75).
min_year integer Oldest model year.
max_year integer Newest model year.
min_price integer Lowest price in USD.
max_price integer Highest price in USD.
max_mileage integer Highest mileage.
body_style string Comma-separated body styles, as in /truecar/v1/search.
dealer_id string Only this dealership's cars.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/truecar/v1/facets?condition=used&make=toyota&zip=90210" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)

{"applied_filters": {"condition": "used","make": "toyota","zip": "90210"},"makes": [{"label": "Toyota","slug": "toyota","count": 12569,"models": [{"label": "RAV4","slug": "rav4","count": 2416,"trims": []},{"label": "Camry","slug": "camry","count": 1861,"trims": []},"… 36 more"]},{"label": "Honda","slug": "honda","count": 9343,"models": []},"… 57 more"],"body_styles": [{"label": "SUV","value": "suv","count": 4908},{"label": "Sedan","value": "sedan","count": 3874},"… 6 more"],"fuel_types": [{"label": "Gas","value": "Gas","count": 8704},{"label": "Hybrid","value": "Hybrid","count": 3228},"… 3 more"],"years": {"min": 1997,"max": 2027},"exterior_colors": [{"label": "White","value": "White","count": 3173},{"label": "Gray","value": "Gray","count": 2861},"… 14 more"],"interior_colors": [{"label": "Black","value": "Black","count": 7899},{"label": "Gray","value": "Gray","count": 3452},"… 9 more"],"features": [{"label": "Bluetooth","value": "Bluetooth","count": 11692},{"label": "Backup Camera","value": "Backup Camera","count": 11560},"… 18 more"],"drivetrains": [{"label": "FWD","value": "FWD","count": 6733},{"label": "AWD","value": "AWD","count": 2728},"… 2 more"],"transmissions": [{"label": "Automatic","value": "Automatic","count": 12179},{"label": "Manual","value": "Manual","count": 162}],"recent_price_drop": 5399,"local_only": 4781,"cached": false,"credits_used": 1}
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.