Getting Started with the Xeni Activities APIHow to Book an ActivityHow to Browse Activity Tags and CategoriesHow to Cancel an Activity BookingHow to Check Activity AvailabilityHow to Get Activity DetailsHow to Retrieve Activity Booking DetailsHow to Search for Activities with FiltersHow to Search for Activity DestinationsCar Rental API - Getting StartedCar Rental API - Understanding Response FieldsHow to Book a Car RentalHow to Get Rental Car Details and Equipment Add-OnsHow to Retrieve or Cancel a Car Rental BookingHow to Search for Available Rental CarsHow to Search for Pickup LocationsHow to Use Car Rental Search FiltersDeals API Best Practices for IntegrationDeals API Frequently Asked QuestionsGetting Started with the Xeni Deals APIDeals API Request Parameters and Headers ReferenceDeals API Supported Currencies and LocalizationHow to Display Deals in Your ApplicationHow to Fetch Hotel Deals by LocationFlights API Error Codes and TroubleshootingGetting Started with the Xeni Flights APIHow to Book a FlightHow to Check Flight Availability and PricingHow to Confirm or Cancel a Flight BookingHow to Retrieve Fare Rules for a FlightHow to Retrieve Flight Booking DetailsHow to Search for Airports Using AutocompleteHow to Search for FlightsHow to Use Flight Search Filters, Sorting, and PaginationHow to Check Room Availability and PricingHow to Filter Vacation Rental ResultsHow to Get Resort Property Details, Amenities, and AccessibilityHow to Hold and Confirm a Resort BookingHow to Release a Resort HoldHow to Retrieve Resort Booking DetailsHow to Search for Available ResortsHow to Search for Resort DestinationsHow to Search for Vacation Rental LocationsHow to Search for Vacation RentalsHow to Use Resort Search Filters and SortingGetting Started with the Xeni Resorts APIResorts API: Understanding Booking Statuses and PoliciesGetting Started with the Vacation Rentals APIVacation Rentals Frequently Asked QuestionsVacation Rentals Supported Property TypesUnderstanding Async Search for Vacation RentalsAuthentication & API SignaturesBooking Hotels — Direct API & SSO CheckoutError Handling, Rate Limits & Best PracticesGetting Started with the Xeni Hotels APIManaging Bookings: Status, Retrieval & CancellationPricing Confirmation & Token LifecycleRetrieving Hotel Details & Room AvailabilitySearching for Hotels: Locations, Filters & PaginationSearching for HotelsSession Management & Correlation IDsAPI authentication and getting your API keys

How to Search for Pickup Locations

Last updated: 2026-03-03

How to Search for Pickup Locations

Before searching for available rental cars, you need geographic coordinates for the pickup and drop-off locations. The Autocomplete endpoint lets users search by city or airport name and returns matching locations with the coordinates required by the search endpoint.

Endpoint

GET /cars/api/v2/autocomplete?key={search_term}

Request Parameters

ParameterTypeRequiredDescription
keystringYesPartial or full name of a city or airport.
The key parameter supports partial matching, so results will appear as the user types. For example, key=new yo will return results for New York area locations.

Example Request

HTTP
GET /cars/api/v2/autocomplete?key=new yo
x-api-key: YOURAPIKEY
x-correlation-id: 550e8400-e29b-41d4-a716-446655440000
Authorization: Bearer YOUR_SIGNATURE

Example Response

JSON
{
  "message": "success",
  "data": [
    {
      "id": "1001",
      "name": "John F. Kennedy International Airport",
      "city_name": "New York",
      "country_name": "United States",
      "iata_code": "JFK",
      "type": "airport",
      "coordinates": {
        "lat": 40.6413,
        "lon": -73.7781
      },
      "region_id": "us-east"
    },
    {
      "id": "1002",
      "name": "New York City",
      "city_name": "New York",
      "country_name": "United States",
      "iata_code": null,
      "type": "city",
      "coordinates": {
        "lat": 40.7128,
        "lon": -74.006
      },
      "region_id": "us-east"
    },
    {
      "id": "1003",
      "name": "LaGuardia Airport",
      "city_name": "New York",
      "country_name": "United States",
      "iata_code": "LGA",
      "type": "airport",
      "coordinates": {
        "lat": 40.7772,
        "lon": -73.8726
      },
      "region_id": "us-east"
    }
  ]
}

Response Fields

FieldTypeDescription
idstringUnique identifier for the location.
namestringFull name of the airport or city.
citynamestringCity where the location is situated.
countrynamestringCountry name.
iatacodestringIATA airport code. Present for airport results, null for cities.
typestringEither "airport" or "city".
coordinatesobjectContains lat (latitude) and lon (longitude).
regionidstringInternal region identifier.

City vs. Airport Results

The type field distinguishes between two kinds of results:

  • "airport" — A specific airport location. These results include an iata_code and correspond to on-airport rental counters. Use airport coordinates when the traveler is picking up directly at the terminal.
  • "city" — A general city location. The coordinates represent the city center. Use city coordinates when the traveler wants to search for rental locations near a city area, which may include off-airport branches.

Using Coordinates in the Search Endpoint

The lat and lon values from the autocomplete response map directly to the pickupcode and returncode parameters in the Search Rentals endpoint:

GET /cars/api/v2/rentals?pickuptype=geo&pickupcode=40.7128,-74.006&returntype=geo&returncode=40.7128,-74.006&...

The coordinates are passed as a comma-separated lat,lon pair.

Best Practices

  • Trigger autocomplete after 2-3 characters to reduce unnecessary API calls while still providing relevant suggestions.
  • Display the type field in your UI so users can distinguish between airport and city results (for example, with an airplane icon for airports).
  • Store the selected coordinates — you will need them for the search request in the next step.
  • Allow different pickup and return locations by running two separate autocomplete queries and passing different coordinates for pickupcode and returncode.

Was this article helpful?