---
title: "OBD Codes Decoder"
description: "Decode an OBD-II diagnostic trouble code into a readable diagnosis."
canonical_url: "https://docs-staging.carsxe.com/docs/products/obd-codes-decoder"
markdown_url: "https://docs-staging.carsxe.com/docs/products/obd-codes-decoder.md"
last_updated: "1980-01-01"
x_farming_labs_generated_preamble: true
agent:
  task: "Help users with CarsXE OBD Codes Decoder."
  outcome: "A OBD Codes Decoder request returns the documented successful vehicle-data response for the supplied input."
  prerequisites:
    - "A valid CarsXE API key with access to this endpoint."
    - "The vehicle identifier or request inputs required by the OBD Codes Decoder example."
  verification:
    - "Run one documented OBD Codes Decoder request and confirm the response is successful and contains the fields described on this page."
  failureModes:
    - symptom: "The OBD Codes Decoder request is rejected or does not return the expected data."
      resolution: "Check the API key, plan access, supported input format, and the returned status code against the error guide before retrying."
---

# 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.
Related: /docs/products, /docs/get-started

<!-- farming-labs:agent-contract:start -->
## Agent Contract

Task: Help users with CarsXE OBD Codes Decoder.
Outcome: A OBD Codes Decoder request returns the documented successful vehicle-data response for the supplied input.

### Prerequisites

- A valid CarsXE API key with access to this endpoint.
- The vehicle identifier or request inputs required by the OBD Codes Decoder example.

### Verification

- Run one documented OBD Codes Decoder request and confirm the response is successful and contains the fields described on this page.

### Failure Modes

- The OBD Codes Decoder request is rejected or does not return the expected data. — Recovery: Check the API key, plan access, supported input format, and the returned status code against the error guide before retrying.
<!-- farming-labs:agent-contract:end -->

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.

## Who uses this API

Repair shops, telematics platforms, and warranty providers call this endpoint to turn a scanner code into plain-language diagnosis text — no VIN required.

## Use cases

### B2B

- **Repair shops — scan-tool intake:** Translate a DTC on the work order into a readable diagnosis for the advisor and technician.
- **Telematics — in-vehicle alerts:** Decode codes reported by a connected device so fleet or warranty dashboards show a cause, not just `P0115`.
- **Warranty — claim context:** Attach a human-readable code description when a claim is opened from a diagnostic event.

### B2C

- **DIY OBD apps:** Let a vehicle owner look up a code from a cheap scanner and see what it means.
- **Consumer mechanic apps:** Show diagnosis text next to a saved vehicle after a scan.

## 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).
