Mapbox Search Patterns logo

Mapbox Search Patterns

Organization
mapbox
mapbox-search-patterns

Expert guidance on choosing the right Mapbox search tool and parameters for geocoding, POI search, and location discovery

Overview

Publishermapbox
Repositorymapbox-agent-skills
Skill namemapbox-search-patterns
Stars
78
Forks
17
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by mapbox on GitHub. Read the source before you install it.

Installation

Install the Mapbox Search Patterns AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mapbox/mapbox-agent-skills.git /tmp/mapbox-agent-skills
mkdir -p .claude/skills
cp -r /tmp/mapbox-agent-skills/skills/mapbox-search-patterns .claude/skills/mapbox-search-patterns
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Mapbox Search Patterns in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Mapbox Search Patterns on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Mapbox Search Patterns is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Mapbox Search Patterns Skill

Expert guidance for AI assistants on using Mapbox search tools effectively. Covers tool selection, parameter optimization, and best practices for geocoding, POI search, and location discovery.

Available Search Tools

1. search_and_geocode_tool

Best for: Specific places, addresses, brands, named locations

Use when query contains:

  • Specific names: "Starbucks on 5th Avenue", "Empire State Building"
  • Brand names: "McDonald's", "Whole Foods"
  • Addresses: "123 Main Street, Seattle", "1 Times Square"
  • Chain stores: "Target"
  • Cities/places: "San Francisco", "Portland"

Don't use for: Generic categories ("coffee shops", "museums")

2. category_search_tool

Best for: Generic place types, categories, plural queries

Use when query contains:

  • Generic types: "coffee shops", "restaurants", "gas stations"
  • Plural forms: "museums", "hotels", "parks"
  • Is-a phrases: "any coffee shop", "all restaurants", "nearby pharmacies"
  • Industry terms: "electric vehicle chargers", "ATMs"

Don't use for: Specific names or brands

3. reverse_geocode_tool

Best for: Converting coordinates to addresses, cities, towns, postcodes

Use when:

  • Have GPS coordinates, need human-readable address
  • Need to identify what's at a specific location
  • Converting user location to address

Tool Selection Decision Matrix

User QueryToolReasoning
"Find Starbucks on Main Street"search_and_geocode_toolSpecific brand name
"Find coffee shops nearby"category_search_toolGeneric category, plural
"What's at 37.7749, -122.4194?"reverse_geocode_toolCoordinates to address
"Empire State Building"search_and_geocode_toolSpecific named POI
"hotels in downtown Seattle"category_search_toolGeneric type + location
"Target store locations"search_and_geocode_toolBrand name (even plural)
"any restaurant near me"category_search_toolGeneric + "any" phrase
"123 Main St, Boston, MA"search_and_geocode_toolSpecific address
"electric vehicle chargers"category_search_toolIndustry category
"McDonald's"search_and_geocode_toolBrand name

Parameter Guidance

Proximity vs Bbox vs Country

Three ways to spatially constrain search results:

1. proximity (STRONGLY RECOMMENDED)

What it does: Biases results toward a location, but doesn't exclude distant matches

Use when:

  • User says "near me", "nearby", "close to"
  • Have a reference point but want some flexibility
  • Want results sorted by relevance to a point

Example:

json
{
  "q": "pizza",
  "proximity": {
    "longitude": -122.4194,
    "latitude": 37.7749
  }
}

Why this works: API returns SF pizza places first, but might include famous NYC pizzerias if highly relevant

Critical: Always set proximity when you have a reference location! Without it, results are IP-based or global.

2. bbox (Bounding Box)

What it does: Hard constraint - ONLY returns results within the box

Use when:

  • User specifies an area: "in downtown", "within this neighborhood"
  • Have a defined service area
  • Need to guarantee results are within bounds

Example:

json
{
  "q": "hotel",
  "bbox": [-122.51, 37.7, -122.35, 37.83] // [minLon, minLat, maxLon, maxLat]
}

Why this works: Guarantees all hotels are within SF's downtown area

Watch out: Too small = no results; too large = irrelevant results

3. country

What it does: Limits results to specific countries

Use when:

  • User specifies country: "restaurants in France"
  • Building country-specific features
  • Need to respect regional boundaries
  • Or it is otherwise clear they want results within a specific country

Example:

json
{
  "q": "Paris",
  "country": ["FR"] // ISO 3166 alpha-2 codes
}

Why this works: Finds Paris, France (not Paris, Texas)

Can combine: proximity + country + bbox or any combination of the three

Decision Matrix: Spatial Filters

ScenarioUseWhy
"Find coffee near me"proximityBias toward user location
"Coffee shops in downtown Seattle"proximity + bboxCenter on downtown, limit to area
"Hotels in France"countryHard country boundary
"Best pizza in San Francisco"proximity + country ["US"]Bias to SF, limit to US
"Gas stations along this route"bbox around routeHard constraint to route corridor
"Restaurants within 5 miles"proximity (then filter by distance)Bias nearby, filter results

Setting limit Parameter

category_search_tool only (1-25, default 10)

Use CaseLimitReasoning
Quick suggestions5Fast, focused results
Standard list10Default, good balance
Comprehensive search25Maximum allowed
Map visualization25Show all nearby options
Dropdown/autocomplete5Don't overwhelm UI

Performance tip: Lower limits = faster responses

types Parameter (search_and_geocode_tool)

Filter by feature type:

TypeWhat It IncludesUse When
poiPoints of interest (businesses, landmarks)Looking for POIs, not addresses
addressStreet addressesNeed specific address
placeCities, neighborhoods, regionsLooking for area/region
streetStreet names without numbersNeed street, not specific address
postcodePostal codesSearching by ZIP/postal code
districtDistricts, neighborhoodsArea-based search
localityTowns, villagesMunicipality search
countryCountry namesCountry-level search

Example combinations:

json
// Only POIs and addresses, no cities
{"q": "Paris", "types": ["poi", "address"]}
// Returns Paris Hotel, Paris Street, not Paris, France

// Only places (cities)
{"q": "Paris", "types": ["place"]}
// Returns Paris, France; Paris, Texas; etc.

Default behavior: All types included (usually what you want)

auto_complete Parameter (search_and_geocode_tool)

What it does: Enables partial/fuzzy matching

SettingBehaviorUse When
trueMatches partial words, typosUser typing in real-time
false (default)Exact matchingFinal query, not autocomplete

Example:

json
// User types "starb"
{ "q": "starb", "auto_complete": true }
// Returns: Starbucks, Starboard Tavern, etc.

Use for:

  • Search-as-you-type interfaces
  • Handling typos ("mcdonalds" -> McDonald's)
  • Incomplete queries

Don't use for:

  • Final/submitted queries (less precise)
  • When you need exact matches

Anti-Patterns to Avoid

Don't: Use category_search for brands

javascript
// BAD
category_search_tool({ category: 'starbucks' });
// "starbucks" is not a category, returns error

// GOOD
search_and_geocode_tool({ q: 'Starbucks' });

Don't: Use search_and_geocode for generic categories

javascript
// BAD
search_and_geocode_tool({ q: 'coffee shops' });
// Less precise, may return unrelated results

// GOOD
category_search_tool({ category: 'coffee_shop' });

Don't: Forget proximity for local searches

javascript
// BAD - Results may be anywhere globally
category_search_tool({ category: 'restaurant' });

// GOOD - Biased to user location
category_search_tool({
  category: 'restaurant',
  proximity: { longitude: -122.4194, latitude: 37.7749 }
});

Don't: Geocode ambiguous place names without proximity (REST too)

This applies to Mapbox Geocoding API v5 / Search Box in browser apps — not only MCP tools.

javascript
// BAD — limit=1 without proximity can resolve "Lincoln Memorial" to Illinois
fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(q)}.json?access_token=${token}&limit=1`);

// GOOD — bias to map center (and optional bbox)
fetch(
  `https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(q)}.json` +
    `?access_token=${token}&proximity=-77.0369,38.9072&bbox=-77.15,38.79,-76.90,38.99&limit=1`
);

Also debounce search inputs (clearTimeout + setTimeout) so every keystroke does not fire a geocode.

Don't: Use bbox when you mean proximity

javascript
// BAD - Hard boundary may exclude good nearby results
search_and_geocode_tool({
  q: 'pizza',
  bbox: [-122.42, 37.77, -122.41, 37.78] // Tiny box
});

// GOOD - Bias toward point, but flexible
search_and_geocode_tool({
  q: 'pizza',
  proximity: { longitude: -122.4194, latitude: 37.7749 }
});

Don't: Request ETA unnecessarily

javascript
// BAD - Costs API quota for routing calculations
search_and_geocode_tool({
  q: 'museums',
  eta_type: 'navigation',
  navigation_profile: 'driving'
});
// User didn't ask for travel time!

// GOOD - Only add ETA when needed
search_and_geocode_tool({ q: 'museums' });
// If user asks "how long to get there?", then add ETA

Don't: Set limit too high for UI display

javascript
// BAD - Overwhelming for simple dropdown
category_search_tool({
  category: 'restaurant',
  limit: 25
});
// Returns 25 restaurants for a 5-item dropdown

// GOOD - Match UI needs
category_search_tool({
  category: 'restaurant',
  limit: 5
});

Quick Reference

Tool Selection Flowchart

User query contains...

-> Specific name/brand (Starbucks, Empire State Building)
  -> search_and_geocode_tool

-> Generic category/plural (coffee shops, museums, any restaurant)
  -> category_search_tool

-> Coordinates -> Address
  -> reverse_geocode_tool

-> Address -> Coordinates
  -> search_and_geocode_tool with types: ["address"]

Essential Parameters Checklist

For local searches, ALWAYS set:

  • proximity (or bbox if strict boundary needed)

For category searches, consider:

  • limit (match UI needs)
  • format (json_string if plotting on map)

For disambiguation, use:

  • country (when geographic context matters)
  • types (when feature type matters)

For travel-time ranking:

  • eta_type, navigation_profile, origin (costs API quota)

Common Mistakes

  1. Forgetting proximity -> Results are global/IP-based (or wrong state for ambiguous memorial/park names)
  2. Using wrong tool -> category_search for "Starbucks" (use search_and_geocode)
  3. Invalid category -> Check category_list first
  4. Bbox too small -> No results; use proximity instead
  5. Requesting ETA unnecessarily -> Adds API cost
  6. Limit too high for UI -> Overwhelming user
  7. Not filtering types -> Get cities when you want POIs
  8. No debounce on typeahead -> Quota burn and racy UI

Reference Files

Load these for deeper guidance on specific topics:

  • references/advanced-params.md — poi_category, ETA, format, and language parameters
  • references/workflows.md — Common patterns: Near Me, Branded, Geocoding, Category+Area, Reverse, Route-Based, Multilingual
  • references/optimization-combining.md — Performance optimization, combining tools, handling no results, category list resource

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Mapbox Search Patterns AI skill do?

Expert guidance on choosing the right Mapbox search tool and parameters for geocoding, POI search, and location discovery

Why use Mapbox Search Patterns on TypingMind?

Because you install it once and use it with any model. Mapbox Search Patterns is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Mapbox Search Patterns in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mapbox/mapbox-agent-skills/tree/main/skills/mapbox-search-patterns. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Mapbox Search Patterns?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Mapbox Search Patterns?

As many as you like. As long as a model supports skills, you can use Mapbox Search Patterns with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Mapbox Search Patterns AI skill free?

Yes. It is published on GitHub by mapbox under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇