/search Autocomplete search across addresses, streets, places, and POIs. Optimised for sub-20ms latency.
Also known as forward geocoding - takes a text query and returns ranked results with coordinates, structured address components, and confidence scores. Fuzzy-matched and proximity-aware.
Part of the Search API family alongside Reverse Search and Search Detail.
# Address autocomplete - call on keystroke after 2 chars
curl "https://api.farun.one/search" \
-H "X-RapidAPI-Key: YOUR_KEY" \
-H "X-RapidAPI-Host: farun-maps.p.rapidapi.com" \
-G \
--data-urlencode "q=Bree Street" \
--data-urlencode "types=address,street" \
--data-urlencode "lat=-33.92" \
--data-urlencode "lon=18.42" \
--data-urlencode "size=5" Latency
< 20ms typical
Min query
2 characters
Max results
25 per request
Search engine
The search engine runs three query layers simultaneously - edge-ngram autocomplete for typing speed, per-field matching for accuracy, and fuzzy fallback for typo tolerance. Results are ranked by a combination of text relevance, place importance, and proximity to your provided location.
Layer 1
Matches partial word prefixes against a pre-indexed edge-ngram field. This is the primary driver, catches typing in progress ('Cape T…' → 'Cape Town') with the lowest latency.
Boost: 6x. Main driver for live search. Layer 2
Runs individual matches against street, name, suburb, city, housename, and postcode fields with field-level boosts. Exact postcode matches are boosted highest (8x) to surface administrative areas cleanly.
Boosts: street 4x, suburb 3x, postcode 8x. Layer 3
When layers 1 and 2 don't produce confident matches, a fuzzy query with AUTO fuzziness and prefix_length=1 catches typos and transpositions. Kicks in only when needed, doesn't slow down the common case.
Fuzziness: AUTO. Prefix length: 1. Result ranking
Every result is scored by a combination of text relevance, place rank, and optional proximity. Place rank weights cities and towns above raw address records so "Cape Town" appears before "12 Cape Town Street" when the query is ambiguous.
{
"query": "Bree Street",
"total": 42,
"took_ms": 8,
"results": [
{
"id": "way/123456789",
"score": 24.871,
"doc_type": "street",
"display_name": "Bree Street, Cape Town City Bowl",
"street": "Bree Street",
"suburb": "Cape Town City Bowl",
"city": "Cape Town",
"postcode": "8001",
"province": "Western Cape",
"country": "ZA",
"location": { "lat": -33.9249, "lon": 18.4241 },
"osm_id": "123456789"
}
// … more results
]
} Note: geometry is excluded from list results. Use Search Detail to fetch GeoJSON geometry for a selected result.
Who uses it
The Search API is the entry point for any location-aware input field. It converts what a user types into a coordinate and structured address which then feeds routing, isochrones, map rendering, or any other spatial workflow downstream.
Dispatch & Logistics
Let dispatchers or drivers type a delivery address and resolve it to a coordinate before passing to the Routing API. Use lat/lon to bias results toward the fleet's current operating region.
SaaS Products
Power any address input with live autocomplete. Call on every keystroke from character 2 onwards. Filter by types=address to restrict to physical addresses only, or include poi for business search.
Insurance
Resolve a declared property address to coordinates and structured components at submission time. Cross-check street, suburb, and postcode fields against the form input to catch mis-declared locations.
Field Operations
Let field crews search for fuel depots, hospitals, weigh stations, or operational landmarks by name. Use types=poi to restrict results to points of interest rather than addresses.
Endpoint reference
https://api.farun.one/search Query parameters
q req types lat lon size Response fields
id Document ID - pass to /search/detail/{id} to fetch full geometry score Relevance score from Elasticsearch - use to rank or filter results doc_type address · street · place · poi display_name Full human-readable result label location {"lat": float, "lon": float} - coordinate of the result street Street name component suburb Suburb / neighbourhood component city City component postcode Postal code took_ms Elasticsearch internal query time in milliseconds Response codes
200 application/json Results array. Empty array if no matches within query. 400 Bad request q missing or shorter than 2 characters. 401 Unauthorized Missing or invalid RapidAPI key. 429 Rate limited Daily pool exhausted. Upgrade on RapidAPI. 503 Service unavailable Search backend unavailable. Integration example
// Call via a server-side proxy - never expose key client-side
let debounce: ReturnType<typeof setTimeout>;
async function onInput(value: string, userLoc: {lat: number; lon: number}) {
clearTimeout(debounce);
if (value.length < 2) return;
debounce = setTimeout(async () => {
const params = new URLSearchParams(
q: value,
lat: String(userLoc.lat),
lon: String(userLoc.lon),
size: '7',
);
const res = await fetch(`/api/search-proxy?$${params}`);
const data = await res.json();
renderDropdown(data.results.map(r => (
label: r.display_name,
lat: r.location.lat,
lon: r.location.lon,
id: r.id, // pass to /search/detail for geometry
)));
}, 180); // 180ms debounce
} Always proxy server-side. Never call the Search API directly from client-side JavaScript, your RapidAPI key would be exposed. Route requests through your own backend.
Min query length
2 characters
Typical latency
< 20ms (ES internal)
Max results
25 per request
Doc types
address · street · place · poi
Proximity bias
Gaussian decay, 15km scale
Geometry
Excluded - use Search Detail
Search API family
Often used together
Pass the location from a search result directly as route origin or destination.
Convert multiple searched addresses into coordinates and calculate travel times between all of them.
Generate a reachability zone from a geocoded origin - service area planning from an address input.
Render a map centred on the search result coordinate using the bbox field to set the viewport.
Start building
Free tier on RapidAPI. 1,000 requests per day across all non-tile APIs combined. No credit card required.