> ## Documentation index
> Fetch the complete documentation index at: https://docs.motormetrics.app/llms.txt
> Ask it with GET https://docs.motormetrics.app/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.
> Feature requests: https://docs.motormetrics.app/api/feature-requests.md lists what users asked for and how to vote for a request or add one.
> Page rating: `GET https://docs.motormetrics.app/feedback?path=/api/cars&helpful={true|false}&comment={comment}` records whether this page helped. The `comment` (URL-encoded, at most 500 characters) says what helped, or what was missing or wrong; a `helpful=false` rating needs it. It is anonymous and needs no key. Comments hold no code, secrets or personal data.

# Cars

> Car registration data endpoints

Access Singapore vehicle registration data including monthly registrations by make, fuel type, and vehicle type.

## List Car Registrations

```
GET /cars
```

Returns paginated car registration data aggregated by month, make, fuel type, and vehicle type.

### Query Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `month` | string | - | Filter by month (YYYY-MM format) |
| `page` | integer | 1 | Page number |
| `limit` | integer | 20 | Items per page (max 100) |

### Response

```json
{
  "success": true,
  "data": [
    {
      "month": "2025-01",
      "make": "TOYOTA",
      "fuelType": "Petrol-Electric",
      "vehicleType": "Multi-purpose Vehicle",
      "number": 245
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 1500,
    "totalPages": 75,
    "hasNextPage": true,
    "hasPrevPage": false
  }
}
```

### Example

```bash
# Get registrations for January 2025
curl "https://api.motormetrics.app/cars?month=2025-01&limit=10"
```

---

## List Makes

```
GET /cars/makes
```

Returns a list of all car makes in the database.

### Response

```json
{
  "success": true,
  "data": [
    "ALFA ROMEO",
    "ASTON MARTIN",
    "AUDI",
    "BENTLEY",
    "BMW",
    "..."
  ]
}
```

---

## Get Make Details

```
GET /cars/makes/{make}
```

Returns registration details for a specific car make.

### Path Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `make` | string | Car make name (URL encoded) |

### Query Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `month` | string | Filter by month (YYYY-MM format) |

### Response

```json
{
  "success": true,
  "data": {
    "total": 12500,
    "data": [
      {
        "month": "2025-01",
        "fuelType": "Petrol-Electric",
        "vehicleType": "Sports Utility Vehicle",
        "count": 180
      }
    ]
  }
}
```

### Example

```bash
# Get Toyota registrations for January 2025
curl "https://api.motormetrics.app/cars/makes/TOYOTA?month=2025-01"
```

---

## List Fuel Types

```
GET /cars/fuel-types
```

Returns all fuel types in the database.

### Response

```json
{
  "success": true,
  "data": [
    "Diesel",
    "Electric",
    "Petrol",
    "Petrol-Electric"
  ]
}
```

---

## List Vehicle Types

```
GET /cars/vehicle-types
```

Returns all vehicle types in the database.

### Response

```json
{
  "success": true,
  "data": [
    "Coupe/Convertible",
    "Hatchback",
    "Multi-purpose Vehicle",
    "Saloon",
    "Sports Utility Vehicle",
    "Station-wagon"
  ]
}
```
