Base URL

All API requests should be made to:

https://api.sgcarstrends.com

Authentication

Most endpoints require authentication using Bearer tokens. See the Authentication guide for details.

Authorization: Bearer YOUR_API_KEY

Response Format

All API responses follow a consistent JSON structure:

Success Response

{
  "success": true,
  "data": [...],
  "total": 100,
  "page": 1,
  "limit": 50
}

Error Response

{
  "success": false,
  "error": "Error message",
  "code": 400
}

Endpoint Categories

Rate Limits

AuthenticationRate LimitWindow
Authenticated100 requests1 minute
Unauthenticated10 requests1 minute

Common Query Parameters

Pagination

ParameterTypeDescriptionDefault
pageintegerPage number (1-based)1
limitintegerResults per page (max 100)50

Filtering

ParameterTypeDescriptionExample
monthstringFilter by month (YYYY-MM)2024-01
makestringFilter by car manufacturerToyota
fuel_typestringFilter by fuel typeElectric
vehicle_typestringFilter by vehicle typePassenger Cars

Date Range

ParameterTypeDescriptionExample
fromstringStart date (YYYY-MM)2024-01
tostringEnd date (YYYY-MM)2024-12

HTTP Status Codes

CodeStatusDescription
200OKRequest successful
400Bad RequestInvalid request parameters
401UnauthorizedAuthentication required or invalid
404Not FoundResource not found
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error

Data Types

Car Registration Data

{
  "month": "2024-01",
  "make": "Toyota",
  "fuel_type": "Petrol",
  "vehicle_type": "Passenger Cars",
  "number": 245
}

COE Bidding Data

{
  "month": "2024-01",
  "bidding_no": 1,
  "vehicle_class": "Category A",
  "quota": 1000,
  "bids_success": 950,
  "bids_received": 1200,
  "premium": 85000
}

COE PQP Data

{
  "month": "2024-01",
  "vehicle_class": "Category A",
  "pqp": 87500
}

OpenAPI Specification

The complete OpenAPI specification is available at:

https://api.sgcarstrends.com/docs/openapi.json

You can also access the interactive API documentation at:

https://api.sgcarstrends.com/docs

SDKs and Libraries

Currently, the API is accessed via standard HTTP requests. We recommend using your preferred HTTP client library:

  • JavaScript: fetch(), axios
  • Python: requests, httpx
  • PHP: cURL, Guzzle
  • Java: OkHttp, HttpClient
  • Go: net/http

Next Steps

Base URL

All API requests should be made to:

https://api.sgcarstrends.com

Authentication

Most endpoints require authentication using Bearer tokens. See the Authentication guide for details.

Authorization: Bearer YOUR_API_KEY

Response Format

All API responses follow a consistent JSON structure:

Success Response

{
  "success": true,
  "data": [...],
  "total": 100,
  "page": 1,
  "limit": 50
}

Error Response

{
  "success": false,
  "error": "Error message",
  "code": 400
}

Endpoint Categories

Rate Limits

AuthenticationRate LimitWindow
Authenticated100 requests1 minute
Unauthenticated10 requests1 minute

Common Query Parameters

Pagination

ParameterTypeDescriptionDefault
pageintegerPage number (1-based)1
limitintegerResults per page (max 100)50

Filtering

ParameterTypeDescriptionExample
monthstringFilter by month (YYYY-MM)2024-01
makestringFilter by car manufacturerToyota
fuel_typestringFilter by fuel typeElectric
vehicle_typestringFilter by vehicle typePassenger Cars

Date Range

ParameterTypeDescriptionExample
fromstringStart date (YYYY-MM)2024-01
tostringEnd date (YYYY-MM)2024-12

HTTP Status Codes

CodeStatusDescription
200OKRequest successful
400Bad RequestInvalid request parameters
401UnauthorizedAuthentication required or invalid
404Not FoundResource not found
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error

Data Types

Car Registration Data

{
  "month": "2024-01",
  "make": "Toyota",
  "fuel_type": "Petrol",
  "vehicle_type": "Passenger Cars",
  "number": 245
}

COE Bidding Data

{
  "month": "2024-01",
  "bidding_no": 1,
  "vehicle_class": "Category A",
  "quota": 1000,
  "bids_success": 950,
  "bids_received": 1200,
  "premium": 85000
}

COE PQP Data

{
  "month": "2024-01",
  "vehicle_class": "Category A",
  "pqp": 87500
}

OpenAPI Specification

The complete OpenAPI specification is available at:

https://api.sgcarstrends.com/docs/openapi.json

You can also access the interactive API documentation at:

https://api.sgcarstrends.com/docs

SDKs and Libraries

Currently, the API is accessed via standard HTTP requests. We recommend using your preferred HTTP client library:

  • JavaScript: fetch(), axios
  • Python: requests, httpx
  • PHP: cURL, Guzzle
  • Java: OkHttp, HttpClient
  • Go: net/http

Next Steps