> ## Documentation Index
> Fetch the complete documentation index at: https://docs.osintcat.net/llms.txt
> Use this file to discover all available pages before exploring further.

# VIN Decoder

> Decode VINs and look up makes, models and manufacturers

Decodes vehicle identification numbers and answers catalogue questions (makes, models, manufacturers, vehicle variables). Choose what to do with `type`.

## Parameters

**type** `string` (default: decode)

`decode` (default), `batch`, `wmi`, `makes`, `manufacturers`, `variables` or `canadian`.

**query** `string`

The VIN (`decode`), VINs separated by new lines, up to 50 (`batch`), a WMI (`wmi`), or the make / manufacturer / variable name the chosen `search_type` needs. Not needed for `makes`+`all`, `manufacturers`+`all`/`parts`, `variables`+`list` and `canadian`.

**model\_year** `number`

`decode`: model year, improves accuracy.

**extended** `boolean`

`decode`: `true` for the extended field set.

**search\_type** `string`

`makes`: `all`, `manufacturer`, `vehicletype`, `models`, `vehicletypes`. `manufacturers`: `all`, `details`, `wmis`, `parts`. `variables`: `list`, `values`.

**year** `number`

`makes` with `manufacturer`/`models`, and `canadian`: model year.

**vehicle\_type** `string`

`makes`+`models` and `manufacturers`+`wmis`: vehicle type filter.

**mfr\_type** `string`

`manufacturers`+`all`: manufacturer type filter.

**page** `number`

`manufacturers`+`all`/`parts`: page number.

**parts\_type** `string`

`manufacturers`+`parts`: CFR part, default `565`.

**from\_date** `string`

`manufacturers`+`parts`: start date (required there).

**to\_date** `string`

`manufacturers`+`parts`: end date (required there).

**make** `string`

`canadian`: make.

**model** `string`

`canadian`: model.

**units** `string`

`canadian`: `Metric` (default) or `US`.

## Headers

**X-API-KEY** `string` *required*

Your API key.

## Usage

Counts as one lookup against your plan's daily allowance (Max: unlimited). When the allowance is used up, the lookup can continue at a per-lookup price charged to your balance (the module's page in the dashboard shows the price). The price applies even when the lookup finds nothing; a lookup that fails because of an error on our side is not charged.

## Example request

```bash cURL theme={null}
curl "https://www.osintcat.net/api/vin?type=decode&query=1HGCM82633A004352" \
     -H "X-API-KEY: YOUR_API_KEY"
```

```python Python theme={null}
import requests

url = "https://www.osintcat.net/api/vin"
params = {"type": "decode", "query": "1HGCM82633A004352"}
headers = {"X-API-KEY": "YOUR_API_KEY"}

response = requests.get(url, params=params, headers=headers, timeout=60)
print(response.status_code, response.json())
```

```javascript JS & TS theme={null}
const response = await fetch("https://www.osintcat.net/api/vin?type=decode&query=1HGCM82633A004352", {
  headers: { "X-API-KEY": "YOUR_API_KEY" },
});
console.log(response.status, await response.json());
```

```php PHP theme={null}
<?php
$curl = curl_init("https://www.osintcat.net/api/vin?type=decode&query=1HGCM82633A004352");
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-KEY: YOUR_API_KEY"],
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
echo $status . " " . $response;
```

```go Go theme={null}
package main

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

func main() {
    req, _ := http.NewRequest("GET", "https://www.osintcat.net/api/vin?type=decode&query=1HGCM82633A004352", nil)
    req.Header.Set("X-API-KEY", "YOUR_API_KEY")
    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(resp.StatusCode, string(body))
}
```

## SDK example

The same request with the [official SDKs](https://docs.osintcat.net/sdks.md). Each one reads your key from `OSINTCAT_API_KEY`.

```typescript JS & TS theme={null}
import { OsintCatClient } from "osintcat";

const client = new OsintCatClient(); // reads OSINTCAT_API_KEY

const result = await client.vin.query({
    query: "1HGCM82633A004352"
});
console.log(result);
```

```python Python theme={null}
from osintcat import OsintCat

client = OsintCat()  # reads OSINTCAT_API_KEY

result = client.vin.query(
    query="1HGCM82633A004352",
)
print(result)
```

```go Go theme={null}
package main

import (
	"context"
	"fmt"

	osintcat "github.com/OsintCatHQ/osintcat-go"
	osintcatclient "github.com/OsintCatHQ/osintcat-go/client"
)

func main() {
	client := osintcatclient.NewClient() // reads OSINTCAT_API_KEY
	request := &osintcat.QueryVinRequest{
		Query: osintcat.String(
			"1HGCM82633A004352",
		),
	}
	result, err := client.Vin.Query(context.Background(), request)
	if err != nil {
		panic(err)
	}
	fmt.Printf("%+v\n", result)
}
```

```php PHP theme={null}
<?php
require __DIR__ . '/vendor/autoload.php';

use OsintCat\OsintCatClient;
use OsintCat\Vin\Requests\QueryVinRequest;

$client = new OsintCatClient(); // reads OSINTCAT_API_KEY

$result = $client->vin->query(
    new QueryVinRequest([
        'query' => '1HGCM82633A004352',
    ]),
);
echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL;
```

## Response

The answer depends on `type`: `decode` and `wmi` return one object with the decoded fields (empty strings for fields the VIN does not carry); `batch` and the catalogue types return a list. Decoded VINs are cached for an hour.

```json 200 theme={null}
{
  "VIN": "1HGCM82633A004352",
  "Make": "HONDA",
  "Model": "Accord",
  "ModelYear": "2003",
  "Manufacturer": "AMERICAN HONDA MOTOR CO., INC.",
  "BodyClass": "Coupe",
  "ABS": ""
}
```

## Errors

| Status | Error | When |
| - | - | - |
| 400 | `query parameter is required` | `query` missing where the chosen type needs it. |
| 400 | `Maximum 50 VINs allowed` | `batch` with more than 50 VINs. |
| 400 | `Invalid query type / Invalid search_type` | Unknown `type` or `search_type`. |

See [Errors](https://docs.osintcat.net/api-reference/introduction.md#errors) for the responses every endpoint can return.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.