---
title: "OBD Codes Decoder"
description: "Decode an OBD-II diagnostic trouble code into a readable diagnosis."
canonical_url: "https://docs.carsxe.com/docs/products/obd-codes-decoder"
markdown_url: "https://docs.carsxe.com/docs/products/obd-codes-decoder.md"
last_updated: "1980-01-01"
---

# OBD Codes Decoder
URL: /docs/products/obd-codes-decoder
LLM index: /llms.txt
Description: Decode an OBD-II diagnostic trouble code into a readable diagnosis.

Task: Help users with CarsXE OBD Codes Decoder.
Related: /docs/get-started, /docs/guides/agents

Map a diagnostic trouble code (DTC) read from an OBD-II scanner to readable diagnosis text. The `/obdcodesdecoder` endpoint takes the code alone — no VIN or vehicle identity required.

## Parameters

| Parameter | Required | Description |
|---|---|---|
| `code` | Yes | OBD-II diagnostic trouble code, for example `P0115` |
| `key` | Yes | Your CarsXE API key |
| `format` | No | `json` by default, or `xml` if supported by your endpoint configuration |

## Example

<CodeGroup title="Decode an OBD-II code" tag="GET" label="/obdcodesdecoder">

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

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

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

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

```python
import asyncio
from carsxe_api import CarsXE

carsxe = CarsXE("YOUR_API_KEY")
code = "P0115"

try:
    obd = asyncio.run(carsxe.obd_codes_decoder({"code": code}))
    print(obd)
except Exception as e:
    print(f"Error: {e}")
```

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

$carsxe = new Carsxe("YOUR_API_KEY");
$code = "P0115";

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

```ruby
require "carsxe"

carsxe = Carsxe::CarsXE.new(api_key: "YOUR_API_KEY")
code = "P0115"

begin
  obd = carsxe.obd_codes_decoder("code" => code)
  puts obd
rescue StandardError => error
  puts "Error: #{error.message}"
end
```

```go
package main

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

func main() {
	client := carsxe.New("YOUR_API_KEY")
	code := "P0115"
	obd := client.ObdCodesDecoder(map[string]string{"code": code})
	fmt.Println(obd)
}
```

```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("YOUR_API_KEY");
        Map<String, String> params = new HashMap<>();
        params.put("code", "P0115");

        try {
            Map<String, Object> obd = carsxe.obdcodesdecoder(params);
            System.out.println(obd);
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
        }
    }
}
```

```swift
import carsxe

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

do {
    let obd = try carsxe.obdCodesDecoder(["code": code])
    print(obd)
} 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)
    {
        CarsXE carsxe = new CarsXE("YOUR_API_KEY");
        string code = "P0115";

        try
        {
            var obd = await carsxe.ObdCodesDecoder(new Dictionary<string, string> { { "code", code } });
            Console.WriteLine(obd);
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error: {ex.Message}");
        }
    }
}
```

```bash {{ title: "Response" }}
{
  "success": true,
  "diagnosis": "Engine Coolant Temperature Circuit Malfunction",
  "date": "2020-07-04T21:44:39.767Z",
  "code": "P0115"
}
```

</CodeGroup>

For the full interactive reference, try it live in the [API Reference](/api-reference/year-make-model/obd-codes-decoder).

## Response

<Properties>
  <Property name="success" type="boolean">
    Whether the code was decoded.
  </Property>
  <Property name="diagnosis" type="string">
    Diagnostic description for the trouble code.
  </Property>
  <Property name="date" type="string">
    Lookup timestamp or date returned by the API.
  </Property>
  <Property name="code" type="string">
    Normalized OBD code returned by the API.
  </Property>
</Properties>

## Errors

See the [Errors guide](/docs/guides/errors) for the full list.

- **400** - Missing OBD code.
- **401** - API key is missing, invalid, disabled, or unauthorized.
- **404** - The code is not in the reference table, either a typo or a manufacturer-specific code.
- **429** - Usage limit exceeded.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
