Skip to main content

Places

Wego is using this for autocomplete in our search form. You can use this endpoint to provide better experience when user is filling out the search form.

Parameters

ParamRequired?Data TypeDescription
queryYesStringthe term to search
typesNoArray of String(s)the type of place to search. Either city, airport, country, state, district, or hotel. default is city and airport.
min_airportsNoNumberfilter places based on minimum airports count. defaults to 1. doesn't apply to type hotel
min_hotelsNoNumberfilter places based on minimum hotels count. defaults to 1. doesn't apply to types other than hotel
airline_codeNoStringfilter places that has route to the given IATA airline code.
languageNoStringThe language that the response will be in. en as default
per_pageNoNumbernumber of results to return. defaults to 20
pageNoNumberthe page to return for multiple page results. defaults to 1
key_transformNoStringFormat of json keys. camelLower or underscore

Examples

  • https://affiliate-api.wego.com/places/search?query=singa
  • https://affiliate-api.wego.com/places/search?query=singa&types[]=city&types[]=country
  • https://affiliate-api.wego.com/places/search?query=new&types[]=city&types[]=airport&min_airports=1
  • https://affiliate-api.wego.com/places/search?query=new&types[]=city&types[]=district&min_hotels=1
  • https://affiliate-api.wego.com/places/search?query=new&types[]=city&types[]=airport&min_airports=1&airline_code=AA

For flights search:

  • https://affiliate-api.wego.com/places/search?language=en&domain=kw-beta.wegostaging.com&site_code=KW&locales[]=ar&locales[]=en&query=san f&min_airports=1

For hotels search:

  • https://affiliate-api.wego.com/places/search?language=en&domain=kw-beta.wegostaging.com&site_code=KW&locales[]=ar&locales[]=en&types[]=city&types[]=district&types[]=hotel&query=man&min_hotels=1

Response

[
{
"id": 69,
"code": "NL",
"name": "Newfoundland and Labrador",
"permalink": "newfoundland-and-labrador",
"countryId": 39,
"countryCode": "CA",
"countryName": "Canada",
"countryPermalink": "canada",
"worldRegionId": 5,
"worldRegionCode": "n",
"worldRegionName": "North America",
"worldRegionPermalink": "north-america",
"airportCount": 17,
"hotelCount": 12,
"type": "state",
"stationType": "state",
"distance": 0.0
},
{
"id": 65,
"code": "NB",
"name": "New Brunswick",
"permalink": "new-brunswick",
"countryId": 39,
"countryCode": "CA",
"countryName": "Canada",
"countryPermalink": "canada",
"worldRegionId": 5,
"worldRegionCode": "n",
"worldRegionName": "North America",
"worldRegionPermalink": "north-america",
"airportCount": 0,
"hotelCount": 109,
"type": "state",
"stationType": "state",
"distance": 0.0
}
]

GET https://affiliate-api.wego.com/places/cities/popular/flights

Parameters

ParamRequired?Data TypeDescription
codeYes (if no country_code)StringIATA city code
country_codeYes (if no code)StringCoutry code
languageNoStringThe language that the response will be in.
en as default
per_pageNoNumbernumber of results to return. defaults to 20
pageNoNumberthe page to return for multiple page results. defaults to 1
key_transformNoStringFormat of json keys. camelLower or underscore
geoTypeNoStringPossible values are: domestic, international, all (the method will return international if no value specified)
currencyCodeNoStringCurrency code in which you want the Price to be in. USD as default. Must be ISO currency code format

Examples

  • https://affiliate-api.wego.com/places/cities/popular/flights?site_code=SG&per_page=10
  • https://affiliate-api.wego.com/places/cities/popular/flights?site_code=SA&geoType=all

Response

[
{
"id": 3356,
"code": "JED",
"name": "Jeddah",
"permalink": "jeddah",
"cityId": 3356,
"cityCode": "JED",
"cityName": "Jeddah",
"cityPermalink": "jeddah",
"worldRegionId": 9,
"worldRegionName": "Middle East",
"worldRegionPermalink": "middle-east",
"worldRegionCode": "m",
"countryId": 192,
"countryName": "Saudi Arabia",
"countryPermalink": "saudi-arabia",
"countryCode": "SA",
"lat": 21.5169,
"long": 39.2192,
"type": "city",
"hotelCount": 453,
"airportCount": 1,
"timeZone": "+03:00",
"stationType": "city",
"enName": "Jeddah",
"enPermalink": "jeddah",
"cityEnName": "Jeddah",
"cityEnPermalink": "jeddah",
"worldRegionEnName": "Middle East",
"worldRegionEnPermalink": "middle-east",
"countryEnName": "Saudi Arabia",
"countryEnPermalink": "saudi-arabia",
"price": {
"amountUsd": 38.6753,
"amount": 38.6753,
"currencyCode": "USD"
}
},
{
"id": 6422,
"code": "RUH",
"name": "Riyadh",
"permalink": "riyadh",
"cityId": 6422,
"cityCode": "RUH",
"cityName": "Riyadh",
"cityPermalink": "riyadh",
"worldRegionId": 9,
"worldRegionName": "Middle East",
"worldRegionPermalink": "middle-east",
"worldRegionCode": "m",
"countryId": 192,
"countryName": "Saudi Arabia",
"countryPermalink": "saudi-arabia",
"countryCode": "SA",
"lat": 24.6408,
"long": 46.7728,
"type": "city",
"hotelCount": 634,
"airportCount": 1,
"timeZone": "+03:00",
"stationType": "city",
"enName": "Riyadh",
"enPermalink": "riyadh",
"cityEnName": "Riyadh",
"cityEnPermalink": "riyadh",
"worldRegionEnName": "Middle East",
"worldRegionEnPermalink": "middle-east",
"countryEnName": "Saudi Arabia",
"countryEnPermalink": "saudi-arabia",
"price": {
"amountUsd": 38.6753,
"amount": 38.6753,
"currencyCode": "USD"
}
}
]

GET https://affiliate-api.wego.com/places/cities/popular/hotels

Parameters

ParamRequired?Data TypeDescription
codeYes (if no country_code)StringIATA city code
country_codeYes (if no code)StringCoutry code
languageNoStringThe language that the response will be in.
en as default
per_pageNoNumbernumber of results to return. defaults to 20
pageNoNumberthe page to return for multiple page results. defaults to 1
key_transformNoStringFormat of json keys. camelLower or underscore
domesticNoBooleanTrue would return only cities within the same country ( based from country_code or the country of the city code)

Examples

  • https://affiliate-api.wego.com/places/cities/popular/hotels?site_code=SG&per_page=10
  • https://affiliate-api.wego.com/places/cities/popular/hotels?site_code=SA&domestic=true

Response

[
{
"id": 3356,
"code": "JED",
"name": "Jeddah",
"permalink": "jeddah",
"cityId": 3356,
"cityCode": "JED",
"cityName": "Jeddah",
"cityPermalink": "jeddah",
"worldRegionId": 9,
"worldRegionName": "Middle East",
"worldRegionPermalink": "middle-east",
"worldRegionCode": "m",
"countryId": 192,
"countryName": "Saudi Arabia",
"countryPermalink": "saudi-arabia",
"countryCode": "SA",
"lat": 21.5169,
"long": 39.2192,
"type": "city",
"hotelCount": 453,
"airportCount": 1,
"timeZone": "+03:00",
"stationType": "city",
"enName": "Jeddah",
"enPermalink": "jeddah",
"cityEnName": "Jeddah",
"cityEnPermalink": "jeddah",
"worldRegionEnName": "Middle East",
"worldRegionEnPermalink": "middle-east",
"countryEnName": "Saudi Arabia",
"countryEnPermalink": "saudi-arabia"
}
]