Skip to navigation

🔍 Search Cities

Search cities by name, IATA code, or country

Performs a case-insensitive search across city names, IATA codes, country names, and country codes. Returns up to 50 matching results.

Query Parameters

  • q (required): Search query string

Response

Returns an object with:

  • success: Boolean indicating success
  • data: Array of matching city objects
  • count: Number of cities found

Search Behavior

  • Searches in: city name, IATA code, country name, country code
  • Case-insensitive matching
  • Partial matching (contains)
  • Results limited to 50 for performance
  • Results ordered by city name (ascending)

Examples

GET /cities/search?q=Dubai
GET /cities/search?q=DXB
GET /cities/search?q=United%20Arab%20Emirates
GET /cities/search?q=AE

Query parameters

qstringRequired

Search query (searches name, IATA, country)

Response

This endpoint returns an object.