Public APIv1No auth requiredCORS: *

Irvine Auto Hub Public API

Read-only JSON API over our live inventory. Data refreshes daily from Mesa Luxury Imports. Use it to build dashboards, comparison tools, mobile apps, or feeds for partner sites.

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/v1

No 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=600

Vercel'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

GET/api/v1

Self-describing index: version, documentation URL, listing of all endpoints.

Example

bash
curl https://irvineautohub.com/api/v1
json
{
  "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": "*"
}
GET/api/v1/inventory

Paginated list of active, unsold, non-hidden vehicles. Supports filtering by make, model, price, and full-text search.

Query parameters

NameTypeDefaultDescription
pageint ≥ 11Page number.
pageSizeint (1–48)12Items per page. Clamped to 48.
makestringExact make filter (e.g. Porsche).
modelstringExact model filter (e.g. Macan).
minPricenumberMinimum internetPrice in USD.
maxPricenumberMaximum internetPrice in USD.
qstringFree-text search over title, VIN, stock #.
sortenumprice_descOne of: price_desc, price_asc, mileage_asc, year_desc, newest.
bodyTypestringBody type label (SUV, Sedan, Truck, Coupe, Hatchback, …) or raw single-letter code.
fuelstringShortcut (Gasoline, Electric, Hybrid, Diesel, Hydrogen, Flex) or exact Mesa label.
drivetrainstringAWD, FWD, RWD, 4WD, or the full Mesa label (e.g. All Wheel Drive).
minYearintMinimum model year, inclusive.
maxYearintMaximum model year, inclusive.
maxMileageintMaximum mileage, inclusive (e.g. 50000).
titleStatusstringCase-insensitive exact match against history.titleStatus (e.g. Clear).
colorstringExterior color substring, case-insensitive (e.g. Black matches Santorini Black).

Example

bash
curl 'https://irvineautohub.com/api/v1/inventory?make=Porsche&sort=price_asc&pageSize=5'

Response shape

json
{
  "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
  }
}
GET/api/v1/inventory/stats

Pre-aggregated snapshot of active inventory: totals, price range (min/max/median), top makes, body-type breakdown. One round-trip.

Example

bash
curl https://irvineautohub.com/api/v1/inventory/stats

Response shape

json
{
  "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.

GET/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

bash
curl https://irvineautohub.com/api/v1/inventory/1308810

Returns 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:

json
{
  "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 null when Mesa doesn't supply a value. Treat null as "unknown".
  • MPG: powertrain.fuelEconomy is null for vehicles Mesa reports as 0/0 — common for EVs, diesels, and classics. For EVs, check estimatedRangeMiles.
  • Sale pricing: pricing.salePrice is only populated when it strictly differs from internetPrice. When displaying, prefer salePrice ?? internetPrice.
  • Monroney: monroneyStickerUrl is a direct JPG of the factory window sticker; monroneyPageUrl is the public decoder page.
  • Internal fields dropped: isActive, manualHidden, and sourceJson are intentionally omitted. The API only ever returns vehicles where isActive && !isSold && !manualHidden.
  • listing.firstListedAt is the first time our sync ingested the vehicle, not necessarily the first day Mesa advertised it. Treat daysOnLot as 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.

CodeLabel
DSedan
YSUV
HHatchback
SMinivan
RVan
KTruck
WWagon
OCoupe/Convertible
CCoupe

Errors

All errors use this shape:

json
{ "error": "Inventory database is not configured." }
StatusMeaning
400Invalid parameters (e.g. non-numeric vehicle id).
404Vehicle id does not exist, or is sold / hidden / deactivated.
500Upstream or internal failure.
503Backing database is not configured.

Client examples

JavaScript (browser or Node)

javascript
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

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

bash
curl -s https://irvineautohub.com/api/v1/inventory/1308810 | jq .pricing

cURL — verify CORS headers

bash
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. Added listing.firstListedAt / listing.daysOnLot on the Vehicle object. New endpoint GET /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.