Skip to main content

Search Places

WHR Location API — v1.1 (1.1.0)

Download OpenAPI specification:Download

Search for locations (cities, venues, or states) by name.

Search Locations

Search for cities, venues, or states matching a query string.

Authorizations:
(UsernameHeaderPasswordHeader)
query Parameters
q
required
string
Example: q=mumbai

Search term to match against location names.

type
required
string
Enum: "city" "venue" "state"
Example: type=city

The kind of location to search for.

country
string
Example: country=IN

ISO country code to scope the search to a single country.

Responses

Response Schema: application/json
Array
id
string

Google Places API place ID for this location.

name
string

Display name of the location.

lat
number <float>

Latitude.

lon
number <float>

Longitude.

Array of objects (LocationEntity)

The location's parent hierarchy (state, country).

type
string
Enum: "state" "city" "venue"

The kind of entity this result element represents.

Request samples

curl -X GET "https://api.10times.com/v1.1/place/search?q=mumbai&type=city" \
  -H "Username: your_username" \
  -H "Password: your_password" \
  -H "Accept: application/json"

Response samples

Content type
application/json
Example
{
  • "0": {
    • "id": "ChIJwe1EZjDG5zsRaYxkjY_tpF0",
    • "name": "Mumbai",
    • "type": "city",
    • "lat": 19.076,
    • "lon": 72.8777,
    • "entity": {
      • "0": {
        • "type": "state",
        • "id": "ChIJA9KNRIfxzzsRVW4mVzbUNVg",
        • "name": "Maharashtra"
        },
      • "1": {
        • "type": "country",
        • "id": "IN",
        • "name": "India"
        }
      }
    }
}