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.
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. | |
| country | No | Restrict to one country. Omit to search both. |