Places
Search
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
Param | Required? | Data Type | Description |
---|---|---|---|
query | Yes | String | the term to search |
types | No | Array of String(s) | the type of place to search. Either city, airport, country, state, district, or hotel. default is city and airport. |
min_airports | No | Number | filter places based on minimum airports count. defaults to 1 . doesn't apply to type hotel |
min_hotels | No | Number | filter places based on minimum hotels count. defaults to 1 . doesn't apply to types other than hotel |
airline_code | No | String | filter places that has route to the given IATA airline code. |
language | No | String | The language that the response will be in. en as default |
per_page | No | Number | number of results to return. defaults to 20 |
page | No | Number | the page to return for multiple page results. defaults to 1 |
key_transform | No | String | Format 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
}
]
Popular Cities for Flights
GET https://affiliate-api.wego.com/places/cities/popular/flights
Parameters
Param | Required? | Data Type | Description |
---|---|---|---|
code | Yes (if no country_code) | String | IATA city code |
country_code | Yes (if no code) | String | Coutry code |
language | No | String | The language that the response will be in. en as default |
per_page | No | Number | number of results to return. defaults to 20 |
page | No | Number | the page to return for multiple page results. defaults to 1 |
key_transform | No | String | Format of json keys. camelLower or underscore |
geoType | No | String | Possible values are: domestic , international , all (the method will return international if no value specified) |
currencyCode | No | String | Currency 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"
}
}
]
Popular Cities for Hotels
GET https://affiliate-api.wego.com/places/cities/popular/hotels
Parameters
Param | Required? | Data Type | Description |
---|---|---|---|
code | Yes (if no country_code) | String | IATA city code |
country_code | Yes (if no code) | String | Coutry code |
language | No | String | The language that the response will be in. en as default |
per_page | No | Number | number of results to return. defaults to 20 |
page | No | Number | the page to return for multiple page results. defaults to 1 |
key_transform | No | String | Format of json keys. camelLower or underscore |
domestic | No | Boolean | True 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"
}
]