API / Search
GET /search

Search API.

Autocomplete search across indexed places and POIs.

Use q for the query, optionally filter by types=place,poi, bias by lat/lon, and control result count with size.

Example request
curl "https://YOUR-RAPIDAPI-HOST/search?q=cape&types=place,poi&lat=-33.9249&lon=18.4241&size=10" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: YOUR_RAPIDAPI_HOST"

Query Parameters

q
string
Yes
Search query text. Minimum length: 2.
types
string
No
Comma-separated values, commonly place,poi.
lat
number
No
Latitude used to bias results by proximity.
lon
number
No
Longitude used to bias results by proximity.
size
integer
No
Maximum number of results. Default: 10. Range: 1 to 25.

Result Fields

id
string
Returned
Document ID.
score
number
Returned
Search relevance score.
index
string
Returned
Source index containing the result.
doc_type
string or null
Returned
Document type, commonly place or poi.
display_name
string or null
Returned
Full display name.
name
string or null
Returned
Primary name.
name_en
string or null
Returned
English name when available.
place_class
string or null
Returned
Place classification.
category
string or null
Returned
POI category when available.
importance
number or null
Returned
Ranking importance.
location
object or null
Returned
{ "lat": number, "lon": number }
canonical_id
string or null
Returned
Canonical document ID.
source
string or null
Returned
Data source such as osm or overture.
Example response
{
  "query": "cape",
  "total": 123,
  "took_ms": 8,
  "results": [
    {
      "id": "osm:place:123",
      "score": 42.21,
      "index": "africa",
      "doc_type": "place",
      "display_name": "Cape Town, Western Cape, South Africa",
      "name": "Cape Town",
      "name_en": "Cape Town",
      "place_class": "city",
      "category": null,
      "importance": 80,
      "location": {"lat": -33.9249, "lon": 18.4241},
      "canonical_id": "osm:place:123",
      "source": "osm"
    }
  ]
}