The OBD Codes Decoder API provides access to a library of over 3000 OBD codes and their matching vehicle diagnosis.

The OBD Codes Decoder API matches the code to the vehicle trouble or diagnosis.

---

<Row>
  <Col>

    This endpoint allows you to retrieve a vehicle's license plate number or registration number from an image of the plate.

    ## Required attributes

    <Properties>
      <Property name="key" type="string">
        Your CarsXE API key.
      </Property>
      <Property name="code" type="string">
        The OBD code.
      </Property>
    </Properties>

    ---

    ## Response attributes

    <Properties>
      <Property name="success" type="boolean">
        Whether we could retrieve code information.
      </Property>
      <Property name="diagnosis" type="string">
        The diagnosis of the OBD code.
      </Property>
      <Property name="date" type="string">
        The date of the search.
      </Property>
      <Property name="code" type="string">
        The OBD Code.
      </Property>
    </Properties>

    <FAQ faqs={[{question: "Is the OBD Decoder API included in the free trial?", answer: <>Yes! The OBD Decoder API is included in the 7-day free trial. For more information visit our <a href='/pricing'>pricing</a> page.</>}]} hidePadding />

  </Col>
  <Col sticky>

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

    ```bash
    curl -G https://api.carsxe.com/obdcodesdecoder \
      -d key=CARSXE_API_KEY \
      -d code=P0115
    ```

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

    const carsxe = new CarsXE("CARSXE_API_KEY");
    const code = "P0115";

    try {
      const obdCode = await carsxe.obdcodesdecoder({ code });
      console.log(obdCode);
    } catch (error) {
      console.error(error);
    }
    ```

    ```python
    import asyncio
    from carsxe_api import CarsXE

    carsxe = CarsXE('CARSXE_API_KEY')
    code = 'P0115'

    try:
        obd_code = asyncio.run(carsxe.obd_codes_decoder({"code": code}))
        print(obd_code)
    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);
    $code = 'P0115';

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

    ```ruby
    require 'carsxe'

    API_KEY = 'CARSXE_API_KEY'
    carsxe = Carsxe::CarsXE.new(api_key: API_KEY)
    code = 'P0115'

    begin
      obd_code = carsxe.obd_codes_decoder('code' => code)
      puts obd_code
    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")
    	code := "P0115"
    	obdCode := client.ObdCodesDecoder(map[string]string{"code": code})
    	fmt.Println(obdCode)
    }
    ```

    ```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("code", "P0115");
            try {
                Map<String, Object> obdCode = carsxe.obdcodesdecoder(params);
                System.out.println(obdCode);
            } catch (Exception e) {
                System.err.println("Error: " + e.getMessage());
            }
        }
    }
    ```

    ```swift
    import carsxe

    let carsxe = CarsXE(apiKey: "CARSXE_API_KEY")
    let code = "P0115"

    do {
        let obdCode = try carsxe.obdCodesDecoder(["code": code])
        print(obdCode)
    } 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 code = "P0115";
            try
            {
                var obdCode = await carsxe.ObdCodesDecoder(new Dictionary<string, string> { { "code", code } });
                Console.WriteLine(obdCode);
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error: {ex.Message}");
            }
        }
    }
    ```

    </CodeGroup>

    <CodeGroup title="Response">
    ```json showLineNumbers
    {
      "success": true,
      "diagnosis": "Engine Coolant Temperature Circuit Malfunction",
      "date": "2020-07-04T21:44:39.767Z",
      "code": "P0115"
    }
    ```
    </CodeGroup>

  </Col>
</Row>
