This guide will get you all set up and ready to use the CarsXE API. We'll cover how to get started using one of our
API clients and how to make your first API request. We'll also look at where to go next to find all the information
you need to take full advantage of our powerful REST API.

<Note>
  Before you can make requests to the CarsXE API, you will need to grab your API key from your dashboard. You find it
  under [Dashboard &raquo; Profile](https://api.carsxe.com/dashboard).
</Note>

## Choose your client

Before making your first API request, you need to pick which API client you will use. In addition to good ol' cURL HTTP requests, you can make an HTTP request using almost any programming language.

<CodeGroup>

```bash
# cURL is most likely already installed on your machine
curl --version
```

</CodeGroup>

## Making your first API request

After picking your preferred client, you are ready to make your first call to the CarsXE API. Below, you can see how to send a GET request to the Specifications endpoint to get a list of a vehicle's specification from a VIN. This is also known as VIN decoding.

<CodeGroup title="Request" tag="GET" label="/specs">

```bash
curl -G https://api.carsxe.com/specs \
    -d key=CARSXE_API_KEY \
    -d vin=WBAFR7C57CC811956
```

```js
const axios = require("axios");

const apiKey = "CARSXE_API_KEY";
const vin = "WBAFR7C57CC811956";
try {
  const { data } = await axios.get("https://api.carsxe.com/specs", {
    params: {
      key: apiKey,
      vin: vin,
    },
  });
} catch (e) {
  console.error(e);
}
```

```js
import { CarsXE } from "carsxe-api";

const carsxe = new CarsXE("CARSXE_API_KEY");
const vin = "WBAFR7C57CC811956";

try {
  const vehicle = await carsxe.specs({ vin });
  console.log(vehicle);
} catch (error) {
  console.error(error);
}
```

```python
import asyncio
from carsxe_api import CarsXE

carsxe = CarsXE('CARSXE_API_KEY')
vin = 'WBAFR7C57CC811956'

try:
    vehicle = asyncio.run(carsxe.specs({"vin": vin}))
    print(vehicle)
except Exception as e:
    print(f"Error: {e}")
```

```php
<?php
require_once __DIR__ . '/vendor/autoload.php';
use CarsxeDeveloper\Carsxe\Carsxe;

$API_KEY = 'CARSXE_API_KEY';
$carsxe = new Carsxe($API_KEY);
$vin = 'WBAFR7C57CC811956';

try {
    $vehicle = $carsxe->specs(['vin' => $vin]);
    print_r($vehicle);
} catch (Exception $error) {
    echo "Error: " . $error->getMessage();
}
```

```ruby
require 'carsxe'

API_KEY = 'CARSXE_API_KEY'
carsxe = Carsxe::CarsXE.new(api_key: API_KEY)
vin = 'WBAFR7C57CC811956'

begin
  vehicle = carsxe.specs('vin' => vin)
  puts vehicle
rescue StandardError => error
  puts "Error: #{error.message}"
end
```

```go
package main

import (
	"fmt"
	"github.com/carsxe/carsxe-go-package"
)

func main() {
	client := carsxe.New("CARSXE_API_KEY")
	vin := "WBAFR7C57CC811956"
	vehicle := client.Specs(map[string]string{"vin": vin})
	fmt.Println(vehicle)
}
```

```java
import io.github.carsxe.CarsXE;
import java.util.Map;
import java.util.HashMap;

public class Main {
    public static void main(String[] args) {
        CarsXE carsxe = new CarsXE("CARSXE_API_KEY");
        Map<String, String> params = new HashMap<>();
        params.put("vin", "WBAFR7C57CC811956");
        try {
            Map<String, Object> vehicle = carsxe.specs(params);
            System.out.println(vehicle);
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
        }
    }
}
```

```swift
import carsxe

let carsxe = CarsXE(apiKey: "CARSXE_API_KEY")
let vin = "WBAFR7C57CC811956"

do {
    let vehicle = try carsxe.specs(["vin": vin])
    print(vehicle)
} catch {
    print("Error: \(error)")
}
```

```csharp
using carsxe;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        string API_KEY = "CARSXE_API_KEY";
        CarsXE carsxe = new CarsXE(API_KEY);
        string vin = "WBAFR7C57CC811956";
        try
        {
            var vehicle = await carsxe.Specs(new Dictionary<string, string> { { "vin", vin } }).Result;
            Console.WriteLine(vehicle.RootElement);
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error: {ex.Message}");
        }
    }
}
```

</CodeGroup>

## What's next?

Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the CarsXE API:

- [Grab your API key from the CarsXE dashboard](https://api.carsxe.com/dashboard)
- [Check out the Specifications endpoint](/docs/v1/specifications)
- [Learn about the different error messages in CarsXE](/docs/errors)
