Setting the file. One moment.
Chapter 13 · Mapbox Search Patterns
Subchapter 13.1
references/advanced-params.mdMarkdown3 KBView on GitHub
search_and_geocode_tool: Narrow generic searches
{
"q": "lunch",
"poi_category": ["restaurant", "cafe"],
"proximity": { "longitude": -122.4194, "latitude": 37.7749 }
}When to use:
category_search_tool: Use poi_category_exclusions instead
{
"category": "food_and_drink",
"poi_category_exclusions": ["bar", "nightclub"]
}When to use:
Request estimated time of arrival to results
Parameters:
eta_type: Set to "navigation"navigation_profile: "driving" | "walking" | "cycling"origin: Starting coordinatesUse when:
Example:
{
"q": "grocery stores",
"proximity": { "longitude": -122.4194, "latitude": 37.7749 },
"eta_type": "navigation",
"navigation_profile": "driving",
"origin": { "longitude": -122.4194, "latitude": 37.7749 }
}Returns: Results with eta (travel time in seconds)
Warning: Requires routing calculation per result (counts toward API quota)
When NOT to use:
Choose output format:
| Format | Returns | Use When |
|---|---|---|
formatted_text (default) | Human-readable text | Displaying to user directly |
json_string | GeoJSON as JSON string | Need to parse/process results |
Example:
formatted_text:
1. Blue Bottle Coffee
Address: 66 Mint St, San Francisco, CA
Coordinates: 37.7825, -122.4052
Type: poijson_string:
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {"type": "Point", "coordinates": [-122.4052, 37.7825]},
"properties": {"name": "Blue Bottle Coffee", ...}
}]
}Decision:
formatted_textjson_string (parse and use coordinates)json_stringISO language codes (e.g., “en”, “es”, “fr”, “de”, “ja”, “zh”)
Use when:
Example:
{
"q": "東京タワー",
"language": "ja"
}
// Returns results in JapaneseDefault: English (if not specified)
Tip: Match user’s locale for best experience