Hotels
GET /api/v1/hotels/locations/search
Search cities and destinations by name and get back usable geo coordinates for hotel availability search.
Turn a free-text city, destination, or hotel-area query into geo coordinates you can pass to
search_advanced.
Permission: Read
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | — | City, destination, or hotel-area text |
locale | string | No | en | Response language |
limit | integer | No | 10 | Max results, 1–50 |
Request example
curl --get \
--url https://api.fx-port.com/api/v1/hotels/locations/search \
--header 'Authorization: Bearer fxp_test_YOUR_KEY' \
--data-urlencode 'query=Oran' \
--data-urlencode 'locale=en' \
--data-urlencode 'limit=5'Response example
{
"environment": "sandbox",
"success": true,
"query": "Oran",
"resultsCount": 5,
"locations": [
{
"id": "20461",
"name": "Oran",
"displayName": "Oran, Algeria",
"city": "Oran",
"countryCode": "DZ",
"latitude": 35.69111,
"longitude": -0.64167,
"type": "location"
}
]
}Field reference
| Field | Description |
|---|---|
latitude / longitude | Pass these directly into search_advanced's latitude / longitude fields |
city | City name, for display |
countryCode | ISO 3166-1 alpha-2 |
type | location for most results — can be a city, region, or point of interest |
Each result also includes a raw object with the underlying provider payload (additional
metadata such as timezone, region codes, and imagery) — treat it as best-effort, unlisted fields
may change.
Next step
Use the returned latitude / longitude with a radius (in meters) on
search_advanced to search hotels around that point.