Skip to main content
Search for available trips across both driver-created trips and company trips. Returns a unified list with trip type discriminators.
curl -X GET "https://api.masareagles.com/api/trips/search/unified?from=Riyadh&to=Jeddah&dateFrom=2026-03-15T00:00:00Z" \
  -H "Authorization: Bearer YOUR_TOKEN"

Endpoint

method
string
required
GET
url
string
required
/api/trips/search/unified

Query Parameters

from
string
Origin city or location name to filter trips
to
string
Destination city or location name to filter trips
dateFrom
string
Start of date range for trip departure (ISO 8601 format)
dateTo
string
End of date range for trip departure (ISO 8601 format)
minPrice
decimal
Minimum price filter
maxPrice
decimal
Maximum price filter
requiredSeats
integer
Minimum number of available seats required
tripType
string
Filter by trip type:
  • driver - Only driver-created trips
  • company - Only company trips
  • all - Both types (default)

Response

trips
array
Array of trip results. Each trip includes a tripType discriminator field.
totalCount
integer
Total number of trips found
driverTripsCount
integer
Number of driver trips in results
companyTripsCount
integer
Number of company trips in results
{
  "trips": [
    {
      "tripType": "Driver",
      "id": "trip_abc123",
      "from": "Riyadh",
      "to": "Jeddah",
      "departureTime": "2026-03-15T08:00:00Z",
      "arrivalTime": "2026-03-15T16:00:00Z",
      "price": 150.00,
      "currency": "SAR",
      "currencyInfo": {
        "code": "SAR",
        "symbol": "ر.س",
        "nameAr": "ريال سعودي",
        "nameEn": "Saudi Riyal"
      },
      "totalSeats": 3,
      "availableSeats": 2,
      "driverId": "drv_xyz789",
      "driverName": "Ahmed Al-Salem",
      "driverImage": "https://cdn.example.com/drivers/ahmed.jpg",
      "driverRating": 4.8,
      "driverTotalReviews": 127,
      "vehicleId": "veh_abc123",
      "vehicleModel": "Toyota Camry 2024",
      "vehicleImageUrl": "https://cdn.example.com/vehicles/camry.jpg",
      "vehicleDescription": "Comfortable sedan with AC",
      "fromLatitude": 24.7136,
      "fromLongitude": 46.6753,
      "toLatitude": 21.5433,
      "toLongitude": 39.1728,
      "stops": [
        {
          "name": "Buraydah",
          "latitude": 26.3260,
          "longitude": 43.9751,
          "order": 1
        }
      ]
    },
    {
      "tripType": "Company",
      "id": "comptrip_def456",
      "from": "Riyadh",
      "to": "Jeddah",
      "departureTime": "2026-03-15T09:00:00Z",
      "price": 180.00,
      "currency": "SAR",
      "currencyInfo": {
        "code": "SAR",
        "symbol": "ر.س",
        "nameAr": "ريال سعودي",
        "nameEn": "Saudi Riyal"
      },
      "totalSeats": 10,
      "availableSeats": 7,
      "companyId": "comp_xyz123",
      "companyName": "Eagle Express Transport",
      "companyLogo": "https://cdn.example.com/companies/eagle.png",
      "companyRating": 4.6,
      "companyReviewsCount": 543,
      "driverId": "drv_comp456",
      "driverName": "Mohammed Al-Otaibi",
      "driverPhoto": "https://cdn.example.com/drivers/mohammed.jpg",
      "vehicleId": "veh_bus789",
      "vehicleModel": "Mercedes Sprinter",
      "vehicleImageUrl": "https://cdn.example.com/vehicles/sprinter.jpg",
      "fromCityId": "city_riyadh",
      "fromAddress": "King Khalid International Airport",
      "toCityId": "city_jeddah",
      "toAddress": "King Abdulaziz International Airport",
      "description": "Direct luxury service",
      "status": "Active"
    }
  ],
  "totalCount": 2,
  "driverTripsCount": 1,
  "companyTripsCount": 1
}

Legacy Search Trips

Search for driver trips only (legacy endpoint). For unified search including company trips, use the Unified Trip Search endpoint above.
curl -X GET "https://api.masareagles.com/api/trips/search?from=Riyadh&to=Dammam&dateFrom=2026-03-15T00:00:00Z&minPrice=50&maxPrice=200" \
  -H "Authorization: Bearer YOUR_TOKEN"

Endpoint

method
string
required
GET
url
string
required
/api/trips/search

Query Parameters

from
string
Origin location filter
to
string
Destination location filter
dateFrom
string
Start date for search range
dateTo
string
End date for search range
minPrice
decimal
Minimum price filter
maxPrice
decimal
Maximum price filter

Response

success
boolean
Indicates search success
message
string
Result message
data
object
Search results container
{
  "success": true,
  "message": "تم العثور على الرحلات",
  "data": {
    "trips": [
      {
        "id": "trip_abc123",
        "from": "Riyadh",
        "to": "Dammam",
        "departureTimeUtc": "2026-03-15T10:00:00Z",
        "price": 120.00,
        "currency": "SAR",
        "availableSeats": 3,
        "driverId": "drv_xyz789",
        "driverName": "Fahad Al-Qahtani",
        "driverRating": 4.7
      }
    ],
    "totalCount": 1
  }
}
For new integrations, use the Unified Trip Search endpoint (/api/trips/search/unified) to search across both driver and company trips.

Build docs developers (and LLMs) love