Place search (type-ahead)
suggest_placesSearch for a place by partial name, misspelled name, or partial code — the resolver that turns what a person typed into something the other tools can look up. Fuzzy matching is built in: "beverley hills" finds Beverly Hills, "san fransisco" finds San Francisco, and a partial code like "902" finds the ZIP Codes starting with it. Matches US ZIP Codes, cities, USPS city names, counties, metropolitan areas, states, school districts, Canadian FSAs and Canadian postal codes, ranked, with the total number of matches. Reach for this FIRST when the place is vague, misspelled or partial, then pass the resolved code to zip_lookup, radius_search or distance. Restrict the kinds of place with types, or bias results towards a location with near. Coverage is broad rather than deep — it returns names and codes, not the full record.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"q": "<q>"
},
"name": "suggest_places"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | What the user typed. At least one character, at most 200. | |
| near | No | Bias results towards somewhere. Accepts 'latitude,longitude', a 5-digit ZIP Code, a 3-character Canadian FSA, or a two-letter state or province abbreviation. | |
| limit | No | How many results to return. Defaults to 10; free-tier and demo callers are capped at 15, paid keys reach 500. With a key the credit cost follows the requested limit (up to 15: 1 credit; 50: 2; 150: 3; 500: 5), whether or not anything matches; demo calls are not charged. | |
| state | No | Restrict to one US state or Canadian province, as a two-letter abbreviation such as CA, NY or ON. | |
| types | No | Restrict to these kinds of place. Omit to search all of them. | |
| api_key | No | Your ZIP-Codes.com API key, only when you cannot send it as the X-Api-Key or Authorization: Bearer header (for example a key bought with buy_credits in this conversation). Leave it out to use the free tier. It is never shown back in a response. | |
| country | No | Restrict to one country. Omit to search both. |