FX-Port API
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

ParameterTypeRequiredDefaultDescription
querystringYes—City, destination, or hotel-area text
localestringNoenResponse language
limitintegerNo10Max 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

FieldDescription
latitude / longitudePass these directly into search_advanced's latitude / longitude fields
cityCity name, for display
countryCodeISO 3166-1 alpha-2
typelocation 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.

On this page