# Search Vehicle by VIN



The Vehicle Registration API allows you to search for a vehicle by supplying its VIN. The request requires a VIN provided as a path variable. This will return either a matching vehicle or a null.

It is critical that the confidence of the match is checked.  MotorWeb will seek to always provide a match however there may be instances where a definitive match is not possible, or the vehicle is very rare and not in our database.

Possible confidence scores are:

* standard
* reduced
* unsupported
* failed

Any confidence score below standard should be investigated.

In all cases, and importantly if a matching vehicle is unable to be identified, we will return the upstream\_vehicle field allowing you to identify how the relevant road transport authority describes the vehicle.&#x20;

Depending on your use case you may wish to allow front-end users to manually classify the vehicle using the upstream\_vehicle as a guide to fill out a Facet-style search.

### Features

The API has a series of optional features that augment the response payload.  Please note that these features do incur an additional cost.  An example of the API is as follows:

{% embed url="https://api.motorweb.app/market-data/v1/vehicles/vin/:vin?features=vsrr,odo_history,odo_prediction" %}

#### vsrr

This feature will return information on the vehicle's fuel economy, emissions, pollutants and safety as recorded by NZTA.

Example output:

```json
"vsrr": {
        "fuel_economy": {
            "star_rating": 6
        },
        "emissions": {
            "co2": 0,
            "star_rating": 6
        },
        "pollutants": {
            "star_rating": 6,
            "test_regime": "EXEMPT"
        },
        "safety": {
            "driver": {
                "test_regime": "Based on 2019 ANCAP rating for 19-23 models"
            }
        }
    },
```

#### odo\_history

This feature will return information on the vehicle's mileage as recorded by NZTA and any other mileage information we may have access to.

Example output:

```json
"odo_history": [
        {
            "read_date": "2021-09-23",
            "odometer": 7
        },
        {
            "read_date": "2024-09-17",
            "odometer": 7230
        }
    ],
```

#### odo\_prediction

This feature utilises prior mileage history plus our custom algorithm to return a prediction of the vehicle's mileage as at today.

Example output:

```json
"odo_prediction": {
        "prediction": 7269,
        "days_since_read": 6,
        "increase_since_read": 39,
        "avg_yearly": 2420,
        "avg_daily": 6.63,
        "ag_market_avg": 47412
    }
```





{% openapi src="https://4230925532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh1RFBcUkMm2GbX1aUo7G%2Fuploads%2FIvtLO9LgaKA9YYgzZ67u%2Fapigee-openapi.yml?alt=media&token=13778615-0f89-4891-9440-43552dd5c4ec" path="/v1/vehicles/vin/{vin}" method="get" %}
[apigee-openapi.yml](https://4230925532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh1RFBcUkMm2GbX1aUo7G%2Fuploads%2FIvtLO9LgaKA9YYgzZ67u%2Fapigee-openapi.yml?alt=media&token=13778615-0f89-4891-9440-43552dd5c4ec)
{% endopenapi %}
