---
title: "Vehicle Dimensions and Classification"
description: "Get vehicle measurements, parking category, weight class, and charging data from a VIN, US plate, catalog trim, or plate photo."
canonical_url: "https://docs.carsxe.com/docs/products/vehicle-dimensions"
markdown_url: "https://docs.carsxe.com/docs/products/vehicle-dimensions.md"
last_updated: "1980-01-01"
x_farming_labs_generated_preamble: true
agent:
  task: "Look up vehicle dimensions and classification for parking, fleet, or loading workflows."
  outcome: "A successful request returns vehicle identity, measurements, classification, fuel and energy data, and towing and hauling data."
  prerequisites:
    - "A valid CarsXE API key with access to the products used by the chosen lookup."
    - "A VIN, a US plate and state, a year/make/model/trim, or an accessible image URL showing one US plate."
  verification:
    - "Confirm a successful response contains vehicle, dimensions, classification, fuel_and_energy, and towing_and_hauling."
    - "Check that the required measurements have numeric values before using them to evaluate clearance."
  failureModes:
    - symptom: "A short trim returns 409 with trim_options."
      resolution: "Retry with one of the full catalog style names in trim_options. The 409 is not charged."
    - symptom: "The image lookup returns 422."
      resolution: "Use a reachable URL with one readable US plate and state, or submit the known plate and state directly."
    - symptom: "A VIN returns 404 because its length, width, and height are unknown."
      resolution: "Retry by year, make, model, and trim. The 404 is not charged."
    - symptom: "The response contains null measurements or an unknown classification."
      resolution: "Check which measurements your workflow requires and collect those missing values before making a fit decision."
---

# Vehicle Dimensions and Classification
URL: /docs/products/vehicle-dimensions
LLM index: /llms.txt
Description: Get vehicle measurements, parking category, weight class, and charging data from a VIN, US plate, catalog trim, or plate photo.
Related: /docs/products/specifications, /docs/products/recognition, /docs/guides/parking

<!-- farming-labs:agent-contract:start -->
## Agent Contract

Task: Look up vehicle dimensions and classification for parking, fleet, or loading workflows.
Outcome: A successful request returns vehicle identity, measurements, classification, fuel and energy data, and towing and hauling data.

### Prerequisites

- A valid CarsXE API key with access to the products used by the chosen lookup.
- A VIN, a US plate and state, a year/make/model/trim, or an accessible image URL showing one US plate.

### Verification

- Confirm a successful response contains vehicle, dimensions, classification, fuel_and_energy, and towing_and_hauling.
- Check that the required measurements have numeric values before using them to evaluate clearance.

### Failure Modes

- A short trim returns 409 with trim_options. — Recovery: Retry with one of the full catalog style names in trim_options. The 409 is not charged.
- The image lookup returns 422. — Recovery: Use a reachable URL with one readable US plate and state, or submit the known plate and state directly.
- A VIN returns 404 because its length, width, and height are unknown. — Recovery: Retry by year, make, model, and trim. The 404 is not charged.
- The response contains null measurements or an unknown classification. — Recovery: Check which measurements your workflow requires and collect those missing values before making a fit decision.
<!-- farming-labs:agent-contract:end -->

Task: Get vehicle dimensions, parking category, and weight class from a VIN, US plate, catalog trim, or plate image.
Outcome: A successful response includes numeric measurements where available and a classification you can use to screen vehicles for parking or fleet workflows.
Related: /docs/products/specifications, /docs/products/recognition, /docs/guides/parking

Get exterior dimensions, curb weight, gross vehicle weight rating (GVWR), and vehicle classification in one response. Use [Vehicle Dimensions](/api-reference/specifications/look-up-vehicle-dimensions) when you have a VIN, a US plate and state, or a catalog trim. Use [Classify a Vehicle From a Plate Image](/api-reference/recognition/classify-a-vehicle-from-a-plate-image) when your input is a photo with one readable US plate.

## Who uses this API

Parking operators, fleet managers, and logistics teams use vehicle measurements to screen for garage clearance, assign lanes or bays, and identify vehicles that may need charging access.

## Use cases

### B2B

- **Parking and valet:** Screen arrivals by parking category, then compare the available length, width, and height against the facility's limits.
- **Fleet intake:** Start from the VIN or a gate photo and use the returned dimensions and weight class to assign a bay.
- **Logistics:** Use dimensions and published towing and payload ratings to plan vehicle moves.

### B2C

- **Parking apps:** Show drivers spaces that can fit their vehicle and identify charging options when the connector is available.

## Look up vehicle dimensions

Send `GET /v1/vehicle/dimensions` with your API key and exactly one set of identifiers.

| Query parameters | Description |
| --- | --- |
| `key` | Required CarsXE API key. |
| `vin` | The vehicle's 17-character VIN. |
| `plate` and `state` | A US license plate and its two-letter issuing code, such as `CA`. Both parameters are required for a plate lookup. |
| `year`, `make`, `model`, and `trim` | All four fields are required for a catalog lookup. A short trim can match multiple configurations; see below. |

<CodeGroup title="Look up dimensions by VIN" tag="GET" label="/v1/vehicle/dimensions">

```bash
curl -G 'https://api.carsxe.com/v1/vehicle/dimensions' \
  --data-urlencode 'key=YOUR_API_KEY' \
  --data-urlencode 'vin=3TMKB5FNXRM012539'
```

```js
const url = new URL("https://api.carsxe.com/v1/vehicle/dimensions");
url.searchParams.set("key", "YOUR_API_KEY");
url.searchParams.set("vin", "3TMKB5FNXRM012539");

const response = await fetch(url);
console.log(await response.json());
```

```python
import httpx

response = httpx.get(
    "https://api.carsxe.com/v1/vehicle/dimensions",
    params={"key": "YOUR_API_KEY", "vin": "3TMKB5FNXRM012539"},
)
print(response.json())
```

```php
<?php
$query = http_build_query(["key" => "YOUR_API_KEY", "vin" => "3TMKB5FNXRM012539"]);
$response = file_get_contents("https://api.carsxe.com/v1/vehicle/dimensions?" . $query);
print_r(json_decode($response, true));
```

```ruby
require "net/http"
require "json"

uri = URI("https://api.carsxe.com/v1/vehicle/dimensions")
uri.query = URI.encode_www_form(key: "YOUR_API_KEY", vin: "3TMKB5FNXRM012539")
puts JSON.parse(Net::HTTP.get(uri))
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	params := url.Values{"key": {"YOUR_API_KEY"}, "vin": {"3TMKB5FNXRM012539"}}
	resp, err := http.Get("https://api.carsxe.com/v1/vehicle/dimensions?" + params.Encode())
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
```

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpRequest request = HttpRequest.newBuilder(URI.create(
            "https://api.carsxe.com/v1/vehicle/dimensions?key=YOUR_API_KEY&vin=3TMKB5FNXRM012539")).build();
        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
```

```swift
import Foundation

var components = URLComponents(string: "https://api.carsxe.com/v1/vehicle/dimensions")!
components.queryItems = [
    URLQueryItem(name: "key", value: "YOUR_API_KEY"),
    URLQueryItem(name: "vin", value: "3TMKB5FNXRM012539"),
]
let (data, _) = try await URLSession.shared.data(from: components.url!)
print(String(decoding: data, as: UTF8.self))
```

```csharp
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var client = new HttpClient();
        var body = await client.GetStringAsync(
            "https://api.carsxe.com/v1/vehicle/dimensions?key=YOUR_API_KEY&vin=3TMKB5FNXRM012539");
        Console.WriteLine(body);
    }
}
```

</CodeGroup>

For a plate lookup, replace `vin` with `plate` and `state`. For a catalog lookup, pass `year`, `make`, `model`, and `trim` instead. When a short trim matches multiple styles that all agree on length, width, height, parking category, and weight class, the response contains the values they share. Otherwise the request returns `409` with the full style names in `trim_options`, and it is not charged. Retry with one of those names, or look one up in [YMM Options](/docs/products/ymm-options).

```json
{
  "success": false,
  "message": "Trim matches multiple configurations. Supply the full catalog style name.",
  "trim_options": ["XL 4dr Van LWB", "XL 4dr Van SWB"]
}
```

## Classify a vehicle from a plate image

Send `POST /v1/vehicle/classify` with `key` in the query and `upload_url` in the JSON body. Use a publicly accessible HTTP or HTTPS URL for a photo showing one US plate. The service reads the plate and issuing state, looks up the vehicle's VIN, and returns the same response shape as the dimensions endpoint.

<CodeGroup title="Classify a vehicle from a photo" tag="POST" label="/v1/vehicle/classify">

```bash
curl -X POST 'https://api.carsxe.com/v1/vehicle/classify?key=YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"upload_url":"https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public"}'
```

```js
const response = await fetch(
  "https://api.carsxe.com/v1/vehicle/classify?key=YOUR_API_KEY",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ upload_url: "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public" }),
  },
);
console.log(await response.json());
```

```python
import httpx

response = httpx.post(
    "https://api.carsxe.com/v1/vehicle/classify",
    params={"key": "YOUR_API_KEY"},
    json={"upload_url": "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public"},
)
print(response.json())
```

```php
<?php
$context = stream_context_create(["http" => [
    "method" => "POST",
    "header" => "Content-Type: application/json",
    "content" => json_encode(["upload_url" => "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public"]),
]]);
$response = file_get_contents("https://api.carsxe.com/v1/vehicle/classify?key=YOUR_API_KEY", false, $context);
print_r(json_decode($response, true));
```

```ruby
require "net/http"
require "json"

uri = URI("https://api.carsxe.com/v1/vehicle/classify?key=YOUR_API_KEY")
response = Net::HTTP.post(
  uri,
  { upload_url: "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public" }.to_json,
  "Content-Type" => "application/json",
)
puts JSON.parse(response.body)
```

```go
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	payload := []byte(`{"upload_url":"https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public"}`)
	resp, err := http.Post("https://api.carsxe.com/v1/vehicle/classify?key=YOUR_API_KEY", "application/json", bytes.NewReader(payload))
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
```

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        String json = "{\"upload_url\":\"https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public\"}";
        HttpRequest request = HttpRequest.newBuilder(URI.create(
                "https://api.carsxe.com/v1/vehicle/classify?key=YOUR_API_KEY"))
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(json))
            .build();
        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
```

```swift
import Foundation

var request = URLRequest(url: URL(string: "https://api.carsxe.com/v1/vehicle/classify?key=YOUR_API_KEY")!)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try JSONSerialization.data(withJSONObject: [
    "upload_url": "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public",
])
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))
```

```csharp
using System;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var client = new HttpClient();
        var response = await client.PostAsJsonAsync(
            "https://api.carsxe.com/v1/vehicle/classify?key=YOUR_API_KEY",
            new { upload_url = "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public" });
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
```

</CodeGroup>

Replace the sample URL with your image URL. A photo without exactly one readable US plate returns `422`, and it is not charged. If the application already has a verified plate and state, use the direct dimensions request to skip image recognition. Use [Plate Image Recognition](/docs/products/recognition#plate-image-recognition) when you need the raw OCR result, region, or alternate candidates.

## Response

Both endpoints return `success: true` and five objects. This example shows a Tacoma response after the catalog lookup completes. Availability varies by vehicle and source.

| Object | What it contains |
| --- | --- |
| `vehicle` | Year, make, model, and trim. |
| `dimensions` | Measurements in inches, weights in pounds, and cargo volume in cubic feet. |
| `classification` | Body style, size class, parking category, weight class, commercial status when reported, and passenger capacity. |
| `fuel_and_energy` | Fuel type, fuel economy in MPG, tank capacity in gallons, range in miles, and EV charging fields when applicable. |
| `towing_and_hauling` | Maximum towing and payload ratings in pounds, plus reported hitch status. |

```json
{
  "success": true,
  "vehicle": {
    "year": 2024,
    "make": "Toyota",
    "model": "Tacoma",
    "trim": "TRD Sport Double Cab 2WD"
  },
  "dimensions": {
    "length_in": 213,
    "width_in": 77.9,
    "height_in": 74.7,
    "wheelbase_in": 131.9,
    "curb_weight_lbs": 4265,
    "gvwr_lbs": 5775,
    "bed_length_in": 60.3,
    "cargo_volume_cuft": null,
    "ground_clearance_in": null
  },
  "classification": {
    "body_style": "extended_cab_pickup",
    "size_class": null,
    "parking_category": "full_size",
    "weight_class": "class_1",
    "is_commercial": null,
    "passenger_capacity": 5
  },
  "fuel_and_energy": {
    "fuel_type": "gasoline",
    "mpg_city": null,
    "mpg_highway": null,
    "mpg_combined": null,
    "tank_size_gal": 18.2,
    "range_miles": null,
    "ev_specs": null
  },
  "towing_and_hauling": {
    "max_towing_lbs": 6400,
    "max_payload_lbs": 1445,
    "has_trailer_hitch": false
  }
}
```

Use `null` as unavailable or inapplicable. For example, `bed_length_in` applies to pickups and trucks, while `cargo_volume_cuft` applies to SUVs, wagons, and vans when a figure is available. Commercial status, bed length, size class, hitch status, and payload depend on the source. A `200` always has at least one of length, width, or height. A VIN with none of them returns a free `404`.

### Parking categories

The API uses the first matching category in this table.

| Category | Length | Width |
| --- | ---: | ---: |
| `compact` | ≤ 185 in | ≤ 70 in |
| `standard` | ≤ 200 in | ≤ 75 in |
| `full_size` | ≤ 220 in | ≤ 80 in |
| `oversized` | Over 220 in | Or over 80 in |

One measurement above the oversized limit is enough to return `oversized`. If either measurement is missing and the other is within the limit, the category is `unknown`. Check length, width, and height against your facility's limits before confirming fit. `width_in` is the body width without mirrors. A width that includes mirrors is never reported, so `width_in` is `null` when no body width is published.

### Weight classes

The weight class uses GVWR or a vehicle weight class already reported by the source. If neither establishes a class, `weight_class` is `unknown`.

| Class | GVWR in pounds |
| --- | --- |
| `class_1` | Up to 6,000 |
| `class_2` | Over 6,000 through 10,000 |
| `class_3` | Over 10,000 through 14,000 |
| `class_4` | Over 14,000 through 16,000 |
| `class_5` | Over 16,000 through 19,500 |
| `class_6` | Over 19,500 through 26,000 |
| `class_7` | Over 26,000 through 33,000 |
| `class_8` | Over 33,000 |

### Fuel and charging

Combined MPG can be estimated from city and highway figures. When both tank capacity and combined MPG are available, the API can estimate fuel range. A battery-electric vehicle's range is its electric range. For a plug-in hybrid, use `ev_specs.range_miles` for the electric-only range.

For electric and plug-in hybrid vehicles, `ev_specs` can include battery capacity, electric range, charge port, peak DC power, Level 2 charging time, and DC 10–80% charging time. For supported matches, CarsXE fills missing electric range and Level 2 charging time from a matched record for the same powertrain and drivetrain. Individual fields can still be `null`.

## Billing

Each step bills at its own product's price on your plan. See [Pricing](https://carsxe.com/pricing) for current prices.

| Input | Steps charged |
| --- | --- |
| VIN | Specifications |
| Year, make, model, and trim | Year Make Model |
| US plate and state | US Plate Decoder and Specifications |
| Plate image | Plate Image Recognition, US Plate Decoder, and Specifications |

- A request is charged only when it returns `200` with dimensions. A `404`, `409`, `422`, or `503` charges no step, including the steps that ran before the failing one.
- For credit-billed accounts, a plate or photo request first checks that your balance covers the sum of its steps. If it does not, the request returns `402` and nothing is charged.
- A retry with the same `Idempotency-Key` header does not charge steps that already succeeded.
- Photos without a usable plate are free, up to 50 per account per hour. After that, image classification returns `429` until the hour ends.

See [Billing Units](/docs/guides/billing-units).

## Errors

| Status | What to check |
| --- | --- |
| `400` | Send one complete identifier set. For image classification, send a public HTTP or HTTPS URL in `upload_url`. |
| `401` | Check the API key and account. |
| `402` | Your credit balance does not cover the total for this input. Nothing was charged. |
| `403` | Vehicle dimensions are not enabled for the account. Contact support to enable them. |
| `404` | The lookup found no vehicle or usable VIN, the VIN has no known length, width, or height, or the US Plate Decoder is not enabled for the account. For a VIN without measurements, retry by year, make, model, and trim. Not charged. |
| `405` | Use `GET` for dimensions and `POST` for image classification. |
| `409` | The trim matches several catalog styles. Retry with one of the names in `trim_options`. Not charged. |
| `422` | Check that the URL serves an accessible image with one identifiable US plate and a readable state. If you know both values, submit them directly to the dimensions endpoint. Not charged. |
| `429` | Too many photos without a usable plate this hour. Retry after the `Retry-After` header. Not charged. |
| `503` | The vehicle catalog or an upstream service is temporarily unavailable. Not charged, so retrying after the `Retry-After` header is safe. |

For billing, rate limit, and provider errors, see the [Errors guide](/docs/guides/errors).

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
