The CarsXE Go package provides a simple and powerful way to integrate vehicle data into your Go applications. This guide will help you get started quickly.

For more information, see the <a href="https://pkg.go.dev/github.com/carsxe/carsxe-go-package" target="\_blank" style={{textDecoration: 'underline'}}>package on pkg.go.dev</a>.

## Installation

Install the CarsXE Go package using go get:

`go get -u github.com/carsxe/carsxe-go-package`

## Setup

First, import the CarsXE client and initialize it with your API key:

<CodeGroup title="main.go">
```go
package main
import (
	"fmt"
	"github.com/carsxe/carsxe-go-package"
)
func main() {
	// Initialize the client
	client := carsxe.New("YOUR_API_KEY_HERE")
}
```
</CodeGroup>

## Basic Usage

### VIN Specifications

<CodeGroup title="main.go">
```go
vin := "WBAFR7C57CC811956"
vehicle := client.Specs(map[string]string{"vin": vin})
fmt.Println(vehicle["input"].(map[string]interface{})["vin"])
```
</CodeGroup>

### International VIN Decoder

<CodeGroup title="main.go">
```go
intvin := client.InternationalVINDecoder(map[string]string{
	"vin": "WF0MXXGBWM8R43240",
})
fmt.Println(intvin)
```
</CodeGroup>

### Market Value

<CodeGroup title="main.go">
```go
marketvalue := client.MarketValue(map[string]string{
	"vin": "WBAFR7C57CC811956",
})
fmt.Println(marketvalue)
```
</CodeGroup>

### Vehicle History

<CodeGroup title="main.go">
```go
history := client.History(map[string]string{
	"vin": "WBAFR7C57CC811956",
})
fmt.Println(history)
```
</CodeGroup>

### License Plate Decoder

<CodeGroup title="main.go">
```go
decodedPlate := client.PlateDecoder(map[string]string{
	"plate":   "7XER187",
	"state":   "CA",
	"country": "US",
})
fmt.Println(decodedPlate)
```
</CodeGroup>

### Vehicle Images

<CodeGroup title="main.go">
```go
images := client.Images(map[string]string{
	"make":  "BMW",
	"model": "X5",
	"year":  "2019",
})
fmt.Println(images)
```
</CodeGroup>

### Vehicle Recalls

<CodeGroup title="main.go">
```go
recalls := client.Recalls(map[string]string{
	"vin": "1C4JJXR64PW696340",
})
fmt.Println(recalls)
```
</CodeGroup>

### Plate Image Recognition

<CodeGroup title="main.go">
```go
plateimg := client.PlateImageRecognition(map[string]string{
	"upload_url": "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public",
})
fmt.Println(plateimg)
```
</CodeGroup>

### VIN OCR from Image

<CodeGroup title="main.go">
```go
vinocr := client.VinOCR(map[string]string{
	"upload_url": "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public",
})
fmt.Println(vinocr)
```
</CodeGroup>

### Year-Make-Model Search

<CodeGroup title="main.go">
```go
yymm := client.YearMakeModel(map[string]string{
	"year":  "2012",
	"make":  "BMW",
	"model": "5 Series",
})
fmt.Println(yymm)
```
</CodeGroup>

### OBD Code Decoder

<CodeGroup title="main.go">
```go
obdcode := client.ObdCodesDecoder(map[string]string{
	"code": "P0115",
})
fmt.Println(obdcode)
```
</CodeGroup>

### Lien and Theft

<CodeGroup title="main.go">
```go
lienAndTheft := client.LienAndTheft(map[string]string{
	"vin": "2C3CDXFG1FH762860",
})
fmt.Println(lienAndTheft)
```
</CodeGroup>

Start building powerful automotive applications with CarsXE's Go package!
