Overview
The Irvine Auto Hub Public API is a read-only HTTP JSON API exposing our active dealer inventory. Every vehicle comes with rich metadata — pricing, drivetrain, fuel economy, title status, Carfax report link, factory window sticker (Monroney), color hex codes, and walk-around video — so you can build rich UIs without re-scraping.
It is safe to call directly from a browser: Access-Control-Allow-Origin: * is set on every response.
Base URL & authentication
All endpoints are relative to:
https://irvineautohub.com/api/v1No authentication is required. No API key, no OAuth, no session cookie. If you need an allowlist-based restriction for partner integrations, contact us.
Breaking changes will ship under /api/v2. Additive changes (new fields on existing responses) may appear on v1 at any time — treat unknown fields as safe to ignore.
Caching & rate limits
Every response includes:
Cache-Control: public, s-maxage=300, stale-while-revalidate=600Vercel's edge holds results for 5 minutes and serves stale-while-revalidate for another 10. Since inventory changes daily, cached responses are almost always fresh enough.
There is no hard rate limit, but please honor Cache-Control and avoid polling the same vehicle more than once per minute. Abusive traffic may be rate-limited at the edge.
Endpoints
/api/v1Self-describing index: version, documentation URL, listing of all endpoints.
Example
curl https://irvineautohub.com/api/v1{
"name": "Irvine Auto Hub Public API",
"version": "v1",
"documentation": "https://irvineautohub.com/api-docs",
"endpoints": {
"GET /api/v1/inventory": "List active inventory with filters + pagination.",
"GET /api/v1/inventory/stats": "Aggregate counts, price range, top makes, body-type breakdown.",
"GET /api/v1/inventory/{vehicleId}": "Get detailed data for a single vehicle."
},
"cache": "public, s-maxage=300, stale-while-revalidate=600",
"cors": "*"
}/api/v1/inventoryPaginated list of active, unsold, non-hidden vehicles. Supports filtering by make, model, price, and full-text search.
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page | int ≥ 1 | 1 | Page number. |
| pageSize | int (1–48) | 12 | Items per page. Clamped to 48. |
| make | string | — | Exact make filter (e.g. Porsche). |
| model | string | — | Exact model filter (e.g. Macan). |
| minPrice | number | — | Minimum internetPrice in USD. |
| maxPrice | number | — | Maximum internetPrice in USD. |
| q | string | — | Free-text search over title, VIN, stock #. |
| sort | enum | price_desc | One of: price_desc, price_asc, mileage_asc, year_desc, newest. |
| bodyType | string | — | Body type label (SUV, Sedan, Truck, Coupe, Hatchback, …) or raw single-letter code. |
| fuel | string | — | Shortcut (Gasoline, Electric, Hybrid, Diesel, Hydrogen, Flex) or exact Mesa label. |
| drivetrain | string | — | AWD, FWD, RWD, 4WD, or the full Mesa label (e.g. All Wheel Drive). |
| minYear | int | — | Minimum model year, inclusive. |
| maxYear | int | — | Maximum model year, inclusive. |
| maxMileage | int | — | Maximum mileage, inclusive (e.g. 50000). |
| titleStatus | string | — | Case-insensitive exact match against history.titleStatus (e.g. Clear). |
| color | string | — | Exterior color substring, case-insensitive (e.g. Black matches Santorini Black). |
Example
curl 'https://irvineautohub.com/api/v1/inventory?make=Porsche&sort=price_asc&pageSize=5'Response shape
{
"items": [ /* array of Vehicle objects — see below */ ],
"pagination": {
"page": 1,
"pageSize": 12,
"total": 31,
"totalPages": 3
},
"filters": {
"make": null,
"model": null,
"minPrice": null,
"maxPrice": null,
"q": null,
"sort": "price_desc",
"bodyType": null,
"fuel": null,
"drivetrain": null,
"minYear": null,
"maxYear": null,
"maxMileage": null,
"titleStatus": null,
"color": null
},
"syncInfo": {
"lastSuccessfulSyncAt": "2026-04-21T14:00:32.112Z",
"totalActiveVehicles": 31
}
}/api/v1/inventory/statsPre-aggregated snapshot of active inventory: totals, price range (min/max/median), top makes, body-type breakdown. One round-trip.
Example
curl https://irvineautohub.com/api/v1/inventory/statsResponse shape
{
"totalActive": 31,
"priceRange": {
"min": 10490,
"max": 89000,
"median": 18690
},
"topMakes": [
{ "make": "BMW", "count": 5 },
{ "make": "Porsche", "count": 4 }
],
"bodyTypeBreakdown": {
"SUV": 14,
"Sedan": 9,
"Truck": 4,
"Coupe": 4
},
"syncInfo": {
"lastSuccessfulSyncAt": "2026-04-21T14:00:32.112Z",
"totalActiveVehicles": 31
}
}Notes: priceRange fields are USD integers and are null when the lot is empty.topMakes returns up to 10 entries.bodyTypeBreakdown keys are human labels; unknown codes bucket under Unknown.
/api/v1/inventory/{vehicleId}Full detail for a single vehicle. Returns 404 if the vehicle is sold, hidden, or deactivated.
Path parameters
vehicleId— numeric Mesa vehicle id. Stable across syncs.
Example
curl https://irvineautohub.com/api/v1/inventory/1308810Returns a single Vehicle object (same shape as items in the list).
Vehicle object
Every item in a list response, and the full body of the detail response, has this shape:
{
"vehicleId": 1308810,
"vin": "WP1AF2A54FLB99584",
"stockNo": "B99584",
"year": 2015,
"make": "Porsche",
"model": "Macan",
"trim": "Turbo",
"title": "2015 Porsche Macan Turbo",
"mileage": 89849,
"bodyType": "Y",
"bodyTypeLabel": "SUV",
"isSold": false,
"isNew": false,
"pricing": {
"internetPrice": 24890,
"finalPrice": 24890,
"salePrice": null,
"discountValue": null,
"isOnSale": false,
"promoExpiresAt": null
},
"powertrain": {
"drivetrain": "All Wheel Drive",
"fuel": "Gasoline Fuel",
"transmission": "Automatic",
"engine": "3.6L 6 Cylinders",
"fuelEconomy": { "city": 17, "highway": 23 },
"estimatedRangeMiles": 376
},
"exterior": {
"colorName": "White",
"colorHex": "#E9EAE5"
},
"interior": {
"colorName": "Brown",
"colorHex": "#8B4513"
},
"history": {
"titleStatus": "Clear",
"damageType": null,
"carfaxUrl": "https://www.carfax.com/vehiclehistory/...",
"autoCheckScore": null
},
"media": {
"primaryImageUrl": "https://images.dealersync.com/...",
"monroneyStickerUrl": "https://monroneylabels.com/cars/.../window_sticker.jpg",
"monroneyPageUrl": "https://www.monroneylabels.com/cars/...",
"videoUrl": null,
"videoCount": 0
},
"listing": {
"firstListedAt": "2026-03-14T00:00:00.000Z",
"daysOnLot": 38
},
"syncedAt": "2026-04-21T14:00:32.112Z"
}Field notes
- Nullability: any field may be
nullwhen Mesa doesn't supply a value. Treat null as "unknown". - MPG:
powertrain.fuelEconomyis null for vehicles Mesa reports as 0/0 — common for EVs, diesels, and classics. For EVs, checkestimatedRangeMiles. - Sale pricing:
pricing.salePriceis only populated when it strictly differs frominternetPrice. When displaying, prefersalePrice ?? internetPrice. - Monroney:
monroneyStickerUrlis a direct JPG of the factory window sticker;monroneyPageUrlis the public decoder page. - Internal fields dropped:
isActive,manualHidden, andsourceJsonare intentionally omitted. The API only ever returns vehicles whereisActive && !isSold && !manualHidden. listing.firstListedAtis the first time our sync ingested the vehicle, not necessarily the first day Mesa advertised it. TreatdaysOnLotas a lower bound.
Body type codes
bodyType is Mesa's single-letter code; bodyTypeLabel is the human-readable string. Unknown codes fall back to the raw letter.
| Code | Label |
|---|---|
| D | Sedan |
| Y | SUV |
| H | Hatchback |
| S | Minivan |
| R | Van |
| K | Truck |
| W | Wagon |
| O | Coupe/Convertible |
| C | Coupe |
Errors
All errors use this shape:
{ "error": "Inventory database is not configured." }| Status | Meaning |
|---|---|
| 400 | Invalid parameters (e.g. non-numeric vehicle id). |
| 404 | Vehicle id does not exist, or is sold / hidden / deactivated. |
| 500 | Upstream or internal failure. |
| 503 | Backing database is not configured. |
Client examples
JavaScript (browser or Node)
const res = await fetch(
'https://irvineautohub.com/api/v1/inventory?sort=price_asc&pageSize=24'
);
const { items, pagination } = await res.json();
for (const v of items) {
console.log(v.title, v.pricing.internetPrice, v.powertrain.fuelEconomy);
}Python
import requests
r = requests.get(
'https://irvineautohub.com/api/v1/inventory',
params={'make': 'Porsche'}
)
r.raise_for_status()
for v in r.json()['items']:
print(v['title'], v['pricing']['internetPrice'])cURL — single vehicle
curl -s https://irvineautohub.com/api/v1/inventory/1308810 | jq .pricingcURL — verify CORS headers
curl -I -X OPTIONS https://irvineautohub.com/api/v1/inventory \
-H 'Origin: https://example.com' \
-H 'Access-Control-Request-Method: GET'Changelog
- v1 (2026-04-22) — Additive update. New filters on
/inventory:bodyType,fuel,drivetrain,minYear,maxYear,maxMileage,titleStatus,color. Addedlisting.firstListedAt/listing.daysOnLoton the Vehicle object. New endpointGET /api/v1/inventory/stats. - v1 (2026-04-21) — Initial public release. Adds rich Mesa-sourced fields (Carfax links, MPG, estimated range, title status, Monroney sticker, color hex codes, sale pricing, body type decoding) and strips internal flags.
Questions or need a partner integration? Contact us.