Search API
Query and filter vehicle listings with advanced search capabilities.
Endpoints Overview
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/search | Full-text search with filters | No |
| GET | /api/search/suggestions | Autocomplete suggestions | No |
Search Endpoint
http
GET /api/searchQuery Parameters
Basic Filters
| Parameter | Type | Description |
|---|---|---|
q | string | Keyword search |
category | string | Category slug |
subcategory | string | Subcategory slug |
brand | string | Brand slug |
model | string | Model name |
Price Filters
| Parameter | Type | Description |
|---|---|---|
min_price | number | Minimum price |
max_price | number | Maximum price |
currency | string | Currency code |
Year & Mileage
| Parameter | Type | Description |
|---|---|---|
min_year | integer | Minimum year |
max_year | integer | Maximum year |
min_mileage | integer | Minimum mileage |
max_mileage | integer | Maximum mileage |
Specifications
| Parameter | Type | Description |
|---|---|---|
fuel_type | string | diesel, petrol, electric, hybrid |
transmission | string | manual, automatic, semi_automatic |
drive_type | string | 4x2, 6x2, 6x4, 8x4 |
euro_standard | string | euro3, euro4, euro5, euro6 |
condition | string | new, used, certified |
Location
| Parameter | Type | Description |
|---|---|---|
country | string | Country code |
region | string | Region/state |
city | string | City name |
lat | float | Latitude for radius search |
lng | float | Longitude for radius search |
radius | integer | Radius in km |
Features
| Parameter | Type | Description |
|---|---|---|
features | string | Comma-separated feature codes |
Pagination & Sorting
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 20) |
sort | string | Sort field |
order | string | asc or desc |
Sort Options
| Value | Description |
|---|---|
relevance | Search relevance (default) |
price | Price |
year | Manufacturing year |
mileage | Mileage/kilometers |
created_at | Listing date |
views | View count |
Example Requests
Basic Search
bash
GET /v1/search?q=volvo+truckCategory Search
bash
GET /v1/search?category=trucks&brand=volvo&min_price=50000&max_price=100000Location-Based Search
bash
GET /v1/search?lat=48.1351&lng=11.5820&radius=100&category=trucksAdvanced Search
bash
GET /v1/search?
category=trucks&
brand=volvo,scania,mercedes&
min_year=2019&
max_year=2024&
fuel_type=diesel&
transmission=automatic&
euro_standard=euro6&
min_price=50000&
max_price=150000&
features=sleeper_cab,air_conditioning&
country=DE&
sort=price&
order=asc&
limit=20Response Format
json
{
"success": true,
"data": {
"results": [
{
"id": "lst_abc123",
"title": "2021 Volvo FH 500 Euro 6",
"price": 85000,
"currency": "EUR",
"year": 2021,
"mileage": 245000,
"category": {
"slug": "trucks",
"name": "Trucks"
},
"brand": {
"slug": "volvo",
"name": "Volvo"
},
"location": {
"country": "Germany",
"city": "Munich"
},
"thumbnail": "https://cdn.menonmobility.com/thumb1.jpg",
"featured": true,
"seller": {
"name": "ABC Trucks",
"verified": true
},
"score": 0.95
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 156,
"total_pages": 8
},
"facets": {
"categories": [
{ "slug": "trucks", "count": 120 },
{ "slug": "buses", "count": 36 }
],
"brands": [
{ "slug": "volvo", "count": 45 },
{ "slug": "scania", "count": 38 }
],
"price_ranges": [
{ "min": 0, "max": 50000, "count": 32 },
{ "min": 50000, "max": 100000, "count": 78 }
],
"years": [
{ "year": 2024, "count": 12 },
{ "year": 2023, "count": 28 }
]
}
}
}Faceted Search
What Are Facets?
Facets provide aggregated counts for filters, enabling dynamic filter UI.
Available Facets
| Facet | Description |
|---|---|
categories | Category distribution |
brands | Brand distribution |
price_ranges | Price range counts |
years | Year distribution |
fuel_types | Fuel type counts |
transmissions | Transmission counts |
locations | Location distribution |
Requesting Specific Facets
bash
GET /v1/search?category=trucks&facets=brands,price_ranges,yearsAutocomplete
Search Suggestions
bash
GET /v1/search/autocomplete?q=volResponse
json
{
"success": true,
"data": {
"suggestions": [
{ "type": "brand", "value": "Volvo", "slug": "volvo" },
{ "type": "model", "value": "Volvo FH", "brand": "volvo" },
{ "type": "model", "value": "Volvo FM", "brand": "volvo" }
]
}
}Saved Searches
Create Saved Search
bash
POST /v1/search/saved
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"name": "Euro 6 Trucks Under 100k",
"query": {
"category": "trucks",
"euro_standard": "euro6",
"max_price": 100000
},
"alerts": true,
"alert_frequency": "daily"
}List Saved Searches
bash
GET /v1/search/saved
Authorization: Bearer YOUR_API_KEYDelete Saved Search
bash
DELETE /v1/search/saved/srch_123
Authorization: Bearer YOUR_API_KEYPerformance Tips
Optimize Queries
Use Specific Filters
More specific filters return faster results.
Limit Fields
Request only needed fields:
GET /v1/search?fields=id,title,price,thumbnailCache Results
Cache search results client-side when appropriate.
Error Handling
| Error | Description |
|---|---|
INVALID_FILTER | Invalid filter parameter |
INVALID_SORT | Invalid sort field |
LOCATION_NOT_FOUND | Location could not be resolved |

