Stay organized with collections Save and categorize content based on your preferences.
IntroductionPlace icons indicate the various types of places (for example coffee shops, libraries, and museums). You can request URLs for icons in PNG or SVG format, as well as the corresponding icon background color, with Find Place, Place Details, Nearby Search, and Text Search requests. Icons can be used inline.
Each icon is defined by two response fields:
.svg
or .png
to the URI to request the icon.icon
response field. Don't use icon
field but instead use icon_background_color
and icon_mask_base_uri
with Places API (Legacy). Example
The following examples show how to request an icon URI and background color for Places API (New) and Places API (Legacy). Notice that the request and responses are different for the two versions of the API.
Places API (New)The following example uses Text Search (New) to return the display name of a place as well as the iconMaskBaseUri
and iconBackgroundColor
response fields:
curl -X POST -d '{ "textQuery" : "skog haus", "maxResultCount" : 1 }' \ -H 'Content-Type: application/json' -H 'X-Goog-Api-Key: API_KEY' \ -H 'X-Goog-FieldMask: places.displayName,places.iconMaskBaseUri,places.iconBackgroundColor' \ 'https://places.googleapis.com/v1/places:searchText'
The response is in the form:
{ "places": [ { "iconMaskBaseUri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet", "iconBackgroundColor": "#FF9E67", "displayName": { "text": "SKÖG Haus Coffee & Tea", "languageCode": "en" } } ] }Places API (Legacy)
The following example shows a Find Place (Legacy) request which includes the icon_mask_base_uri
and icon_background_color
fields:
https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=skog%20haus&inputtype=textquery&fields=name,icon_mask_base_uri,icon_background_color&key=API_KEY
The following example shows how the icon_mask_base_uri
and icon_background_color
fields appear in a response from a Find Place (Legacy) request.
{ "candidates" : [ { "icon_background_color" : "#FF9E67", "icon_mask_base_uri" : "https://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet", "name" : "SKÖG Haus Coffee", } ], "status" : "OK" }XML
<FindPlaceFromTextResponse> <candidates> <name>SKÖG Haus Coffee</name> <icon_background_color>#FF9E67</icon_background_color> <icon_mask_base_uri>https://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet</icon_mask_base_uri> </candidates> <status>OK</status> </FindPlaceFromTextResponse>
To display an icon, append the file type extension (.png or .svg) you want to the returned icon URI, and combine the icon with the returned background color. For example, to display the .svg icon on a web page:
<style> .icons-food-drink { background-color: #ff9e67; width: 88px; height: 88px; padding: 5px; } </style> <img src="https://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet.svg" alt="Cafe" class="icons-food-drink"/>Place icon and background color requests
The following tables show all of the available place icons by category. By default these display with a black glyph. The icon background color is dictated by the place's category.
Place category: Food and drinkExcept as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["Place icons, available in PNG or SVG formats, visually represent various place types like restaurants and libraries, and can be requested using Find Place, Place Details, Nearby Search, and Text Search requests."],["Each icon is identified by an icon base URI (requiring `.svg` or `.png` appended for the full URL) and an icon background color, represented by a HEX color code."],["While the older Places API uses `icon`, `icon_mask_base_uri`, and `icon_background_color` fields, the new Places API uses `iconMaskBaseUri` and `iconBackgroundColor`."],["To display an icon, combine the icon base URI with the desired file type extension and apply the icon background color as the background of the image element."],["Place icons are categorized, such as Food and drink or Tourist, with each category having a specific background color."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4