如何获取Google Place API business type与Google MyBusiness Profile business category映射关系?
If you’re trying to connect granular categories like "Event Venue" or "Pub" to official business types (such as restaurant), here are practical ways to build that mapping:
Fetch Place Details for Sample Locations
Use theplace/detailsendpoint to pull data for places matching the categories you care about. The response includes two critical arrays:types: The official business types recognized by the API (e.g.,restaurant,bar)categories: Specific, often localized category labels (e.g., "Pub", "Event Venue")
By collecting these pairs from multiple sample places, you can spot consistent mappings. For example, a "Pub" might commonly havetypesvalues likebarandrestaurant.
Reverse-Engineer via Text/Autocomplete Searches
Run text searches using terms like "Pub" or "Event Venue" with thetextsearchendpoint, then retrieve details for each result. This lets you bulk-collect category-type pairs to build your own reference table.Adjust Your Filter Logic
Since the API’stypeparameter only accepts official business types, expand your filter to include relevant categories using thekeywordparameter. For example, to include Pubs in your restaurant-focused results, combinetype=restaurantwithkeyword=pub.Account for Localized Categories
Use thelanguageparameter in requests to get region-specific category labels, as some categories may vary by location.
Note: Google does not publish a public, comprehensive mapping between all categories and business types, so building your own dataset via sampling is the most reliable approach.
内容的提问来源于stack exchange,提问作者Werner Huijboom

