---
title: "Latency & Regions"
description: "Cut transatlantic latency from Europe by calling the EU deployment — the eu-api.carsxe.com hostname, the /eu path prefix, and which endpoints are available in each region."
canonical_url: "https://docs.carsxe.com/docs/guides/latency-and-regions"
markdown_url: "https://docs.carsxe.com/docs/guides/latency-and-regions.md"
last_updated: "1980-01-01"
x_farming_labs_generated_preamble: true
agent:
  task: "Route CarsXE requests from Europe to the EU deployment instead of the US region."
  outcome: "A request from Europe uses eu-api.carsxe.com or the /eu path prefix, returns the same JSON shape as the US form, and a US-only path on the EU hostname returns 404."
  appliesTo:
    version:
      - "CarsXE API v1 and v2"
  prerequisites:
    - "A valid CarsXE API key."
    - "A client that can change the request hostname or path prefix."
    - "An internationally available endpoint (plate decoder, recognition, international VIN decoder, VIN OCR, or images)."
  verification:
    - "GET https://eu-api.carsxe.com/v1/international-vin-decoder with a valid key and VIN returns a successful JSON body with the same fields as the US host."
    - "GET https://api.carsxe.com/eu/v1/international-vin-decoder with the same parameters also succeeds."
    - "GET https://eu-api.carsxe.com/specs (or another US-only path) returns 404."
  failureModes:
    - symptom: "Requests from Europe still hit api.carsxe.com and show 80–150 ms of extra latency."
      resolution: "Switch the client base URL to https://eu-api.carsxe.com or prefix the path with /eu."
    - symptom: "An EU-hostname request returns 404."
      resolution: "Confirm the path is in the EU-available list; call US-only endpoints on https://api.carsxe.com without the /eu prefix."
    - symptom: "The EU and US responses disagree on auth or billing."
      resolution: "Stop and compare hosts — parameters, response shapes, authentication, and billing are identical; a mismatch means the client is not hitting the documented EU form."
---

# Latency & Regions
URL: /docs/guides/latency-and-regions
LLM index: /llms.txt
Description: Cut transatlantic latency from Europe by calling the EU deployment — the eu-api.carsxe.com hostname, the /eu path prefix, and which endpoints are available in each region.
Related: /docs/get-started, /docs/guides/supported-countries, /docs/products/plate-decoder

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

Task: Route CarsXE requests from Europe to the EU deployment instead of the US region.
Outcome: A request from Europe uses eu-api.carsxe.com or the /eu path prefix, returns the same JSON shape as the US form, and a US-only path on the EU hostname returns 404.

### Applies To

- Version: `CarsXE API v1 and v2`

### Prerequisites

- A valid CarsXE API key.
- A client that can change the request hostname or path prefix.
- An internationally available endpoint (plate decoder, recognition, international VIN decoder, VIN OCR, or images).

### Verification

- GET https://eu-api.carsxe.com/v1/international-vin-decoder with a valid key and VIN returns a successful JSON body with the same fields as the US host.
- GET https://api.carsxe.com/eu/v1/international-vin-decoder with the same parameters also succeeds.
- GET https://eu-api.carsxe.com/specs (or another US-only path) returns 404.

### Failure Modes

- Requests from Europe still hit api.carsxe.com and show 80–150 ms of extra latency. — Recovery: Switch the client base URL to https://eu-api.carsxe.com or prefix the path with /eu.
- An EU-hostname request returns 404. — Recovery: Confirm the path is in the EU-available list; call US-only endpoints on https://api.carsxe.com without the /eu prefix.
- The EU and US responses disagree on auth or billing. — Recovery: Stop and compare hosts — parameters, response shapes, authentication, and billing are identical; a mismatch means the client is not hitting the documented EU form.
<!-- farming-labs:agent-contract:end -->

Task: Route CarsXE requests from Europe to the EU deployment instead of the US region.

Prerequisites:
- A valid CarsXE API key.
- A client that can change the request hostname or path prefix.
- An internationally available endpoint (plate decoder, recognition, international VIN decoder, VIN OCR, or images).

Outcome: A request from Europe uses `eu-api.carsxe.com` or the `/eu` path prefix, returns the same JSON shape as the US form, and a US-only path on the EU hostname returns `404`.

Verification:
- `GET https://eu-api.carsxe.com/v1/international-vin-decoder` with a valid key and VIN returns a successful JSON body with the same fields as the US host.
- `GET https://api.carsxe.com/eu/v1/international-vin-decoder` with the same parameters also succeeds.
- `GET https://eu-api.carsxe.com/specs` (or another US-only path) returns `404`.

Related: /docs/guides/latency-and-regions, /docs/guides/supported-countries, /docs/products/international-vin-decoder

The CarsXE API is hosted in the United States (Iowa, `us-central1`). For customers based in the US this is already low-latency. For customers in Europe, every request would otherwise pay a transatlantic round-trip on top of the actual processing time — typically 80–150 ms before the request even reaches our servers.

This page describes how to keep that overhead off your hot path.

## Use the EU endpoint from Europe

Internationally relevant endpoints — the photo-based recognition APIs, the multi-country plate decoder, and the international VIN decoder — are also deployed in `europe-west1` (Belgium). There are two equivalent ways to reach that deployment; pick whichever is easier to configure in your client.

| Form | Example | Notes |
|---|---|---|
| Regional hostname | `https://eu-api.carsxe.com/v1/international-vin-decoder` | Swap the hostname, keep the path. Easiest when your HTTP client is configured with a base URL. |
| `/eu` path prefix | `https://api.carsxe.com/eu/v1/international-vin-decoder` | Keep the hostname, prefix the path. Easiest when your client hardcodes the host. |

Both forms execute in `europe-west1` against an EU-local cache replica. Parameters, response shapes, authentication, and billing are identical to the US form.

## eu-api.carsxe.com (regional hostname)

Swap the hostname; keep the path identical to the US form. The EU hostname terminates in GCP `europe-west1` and proxies straight to the EU function deployment.

<CodeGroup title="Request" tag="GET" label="/v1/international-vin-decoder">

```bash
curl -G https://eu-api.carsxe.com/v1/international-vin-decoder \
  -d key=YOUR_API_KEY \
  -d vin=WF0MXXGBWM8R43240
```

```js
const { data } = await axios.get("https://eu-api.carsxe.com/v1/international-vin-decoder", {
  params: { key: apiKey, vin },
});
```

```python
import httpx

params = {
    "key": "YOUR_API_KEY",
    "vin": "WF0MXXGBWM8R43240",
}

with httpx.Client(base_url="https://eu-api.carsxe.com", timeout=30.0) as client:
    response = client.get("/v1/international-vin-decoder", params=params)
    response.raise_for_status()
    data = response.json()
```

```php
<?php

require_once __DIR__ . '/vendor/autoload.php';

$client = new GuzzleHttp\Client([
    'base_uri' => 'https://eu-api.carsxe.com',
    'timeout' => 30,
]);

$response = $client->get('/v1/international-vin-decoder', [
    'query' => [
        'key' => 'YOUR_API_KEY',
        'vin' => 'WF0MXXGBWM8R43240',
    ],
]);

$data = json_decode($response->getBody()->getContents(), true);
```

```ruby
require 'json'
require 'net/http'
require 'uri'

uri = URI('https://eu-api.carsxe.com/v1/international-vin-decoder')
uri.query = URI.encode_www_form(
  key: 'YOUR_API_KEY',
  vin: 'WF0MXXGBWM8R43240'
)

response = Net::HTTP.get_response(uri)
data = JSON.parse(response.body)
```

```go
package main

import (
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
)

func main() {
	params := url.Values{}
	params.Set("key", "YOUR_API_KEY")
	params.Set("vin", "WF0MXXGBWM8R43240")

	endpoint := "https://eu-api.carsxe.com/v1/international-vin-decoder?" + params.Encode()
	resp, err := http.Get(endpoint)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	var data map[string]any
	if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
		panic(err)
	}

	fmt.Println(data)
}
```

```java
import java.net.URI;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;

String query = "key=" + URLEncoder.encode("YOUR_API_KEY", StandardCharsets.UTF_8)
    + "&vin=" + URLEncoder.encode("WF0MXXGBWM8R43240", StandardCharsets.UTF_8);

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://eu-api.carsxe.com/v1/international-vin-decoder?" + query))
    .GET()
    .build();

HttpResponse<String> response = HttpClient.newHttpClient()
    .send(request, HttpResponse.BodyHandlers.ofString());
```

```swift
import Foundation

var components = URLComponents(string: "https://eu-api.carsxe.com/v1/international-vin-decoder")!
components.queryItems = [
    URLQueryItem(name: "key", value: "YOUR_API_KEY"),
    URLQueryItem(name: "vin", value: "WF0MXXGBWM8R43240"),
]

let (data, _) = try await URLSession.shared.data(from: components.url!)
let result = try JSONSerialization.jsonObject(with: data)
```

```csharp
using System.Net.Http.Json;

using HttpClient client = new()
{
    BaseAddress = new Uri("https://eu-api.carsxe.com")
};

var url = $"/v1/international-vin-decoder?key={Uri.EscapeDataString("YOUR_API_KEY")}&vin={Uri.EscapeDataString("WF0MXXGBWM8R43240")}";
var data = await client.GetFromJsonAsync<object>(url);
```

</CodeGroup>

## /eu path prefix

Keep `api.carsxe.com` and prefix the endpoint path with `/eu`. Useful when the host is baked into your client or SDK configuration and only the path is easy to change.

```bash
curl -G https://api.carsxe.com/eu/v1/international-vin-decoder \
  -d key=YOUR_API_KEY \
  -d vin=WF0MXXGBWM8R43240
```

The prefix applies to the endpoint path only — `key`, all other query parameters, and the response body are unchanged.

## Endpoints available in EU

The EU deployment covers the APIs whose data is meaningful outside the US:

- `/platedecoder`, `/v2/platedecoder` — multi-country plate decoder
- `/platerecognition` — plate recognition from photos
- `/v1/international-vin-decoder` — non-US VIN decoder
- `/v1/vinocr` — VIN OCR from photos
- `/images` — vehicle image search

<Note>
  Other product endpoints (`/specs`, `/marketvalue`, `/v1/recalls`, `/history`, `/v1/lien-theft`, `/v1/ymm`,
  `/obdcodesdecoder`, etc.) are US-only — call them on `https://api.carsxe.com/...` without the `/eu` prefix.
  Requesting a US-only path on `eu-api.carsxe.com` returns `404`.
</Note>

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