Geographical Location Search

The Geography APIs provide you with access to geographic definitions and property mappings for over 600,000 regions and airports. Returns the geographic definition and property mappings of regions matching the specified parameters as a paginated response.

Parameters

Name

Description

Accept

string

( header )

*required application/json

Accept - Encoding

string

( header )

*required gzip

Authorization

string

( header )

*required Your API Key

*required Your PID Key

Customer-Ip

string

( header )

*required IP address of the customer, as captured by your integration. Send IPV4 addresses only.

Ensure your integration passes the customer’s IP, not your own. This value helps determine their location and other settings.

Also used for fraud recovery and other important analytics.

action

string

( query )

*required "getLocations" as a parameter

limit

number

( query )

*required Page limit.

Limit the number of records returned.

term

string

( query )

*required Relevent regions.

Specific information about the region e.g. whether it covers surrounding areas for a city. Only present when relevant for a region.

REQUEST

API Endpoint: https://your-end-point/api/v1/travel-api/hotels/

header: array(
'Content-Type:application/json',
'Accept-encoding: gzip',
'PID:'ADD-PID-KEY',
'x-api-key:'ADD-API-YOUR-KEY'
);

GET: https://your-end-point/api/v1/travel-api/hotels/?action=getLocations&limit=5&locale=en&term=del
					 

Response

The API returns an HTTP response, which generally includes the result of the request invocation

{
  "cities": [
    {
      "latinFullName": "New York, New York, United States of America",
      "regionid": 130452,
      "CountryCode": "US",
      "category": "cities",
      "class_Name": "cities",
      "search_type": 1,
      "PopularSearchCount": 13178
    },{
    
    ...
    
   },
    {
      "latinFullName": "Christchurch, New Zealand",
      "regionid": 144687,
      "CountryCode": "NZ",
      "category": "cities",
      "class_Name": "cities",
      "search_type": 1,
      "PopularSearchCount": 3639
    }
  ]
}