Places Aggregate API は、場所、タイプ、営業状況、価格帯、ユーザー評価などの条件に基づいて、指定されたエリア内の場所に関する分析情報を提供するサービスです。このサービスは、特定の場所の周辺にある特定の場所タイプの密度を分析し、「この場所から半径 5 km 以内に、5 つ星評価の $$$ レストランが何軒あるか」などの質問に回答するのに役立ちます。
結果は、検索対象エリア内の集計数または特定されたプレイス ID として返されます。ユーザーは Place Details API を使用して、これらの Place ID に関する詳細情報を取得できます。
Places Aggregate API を使用する理由
Places Aggregate API を使用すると、さまざまな場所に関する包括的な情報に基づいて、データドリブンな意思決定を行うことができます。正確で最新のプレイス モデルを活用し、次の主なユースケースをサポートします。
このセクションでは、Places Aggregate API のユースケースの例について説明し、各例の動作コードを示します。
新しいカフェのオープン
レストランのオーナーが新しいカフェをオープンしたいと考えています。そのため、まずカフェのホットスポットを可視化して、高密度エリアと低密度エリアを特定し、ビジネス上の意思決定に役立てたいと考えています。Places Aggregate API を使用すると、営業状況、価格帯、顧客の評価などの属性に基づいて、特定の半径内のカフェの数を分析し、次の店舗をどこにオープンするかについてデータに基づいた意思決定を行うことができます。
ある不動産投資会社が、財務モデルを強化し、計画している不動産投資の ROI を正確に把握したいと考えています。Places Aggregate API を使用すると、ATM、病院、交通機関の駅、食料品店など、投資対象となる可能性のある物件の近くにあるアメニティに関する詳細なデータを収集し、投資対象となる可能性のある物件の近くにあるアメニティを把握できます。
Places Aggregate API では、フィルタを指定して検索条件を絞り込むことができます。分析情報のタイプとして INSIGHT_COUNT または INSIGHT_PLACES を選択したら、次のフィルタ条件を追加できます。
地域: 円、地域、カスタム ポリゴンを使用して、対象地域を定義します。
タイプ: 興味のある場所のタイプを指定します。
営業状況: 営業状況に基づいて場所をフィルタします。
価格帯: 価格帯に基づいて場所をフィルタします。
評価: ユーザーの評価に基づいて場所をフィルタします。
API レスポンスの ComputeInsightsResponse オブジェクトには、リクエストの分析結果が含まれます。たとえば、INSIGHT_COUNT を選択した場合は、レスポンスに場所の合計数が含まれ、INSIGHT_PLACES を選択した場合は、レスポンスにプレイス ID のリストが含まれます。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-05 UTC。"],[],[],null,["# Overview\n\n\u003cbr /\u003e\n\nThe Places Aggregate API is a service that provides insights about places within a\nspecified area based on criteria such as location, type, operating status, price\nlevel, and user ratings. This service can help analyze the density of specific\n[Place Types](/maps/documentation/places/web-service/place-types) around a given location, and answer questions like \"What, or\nhow many, 5-star rated $$$ restaurants are within a 5km radius of this\nlocation?\"\n\nResults are returned as either aggregated counts or the identified place IDs in\nthe search area of interest. Users can use the [Place Details API](/maps/documentation/places/web-service/place-details) to\nretrieve more information about those Place IDs.\n\nWhy use the Places Aggregate API\n--------------------------------\n\nThe Places Aggregate API empowers your users to make data-driven decisions based on\nthe comprehensive information you provide about various places. It leverages\naccurate and up-to-date place models, which supports the following key use\ncases:\n\n- **Businesses**: Analyze competition and potential locations for new branches.\n- **Developers**: Build applications that provide personalized recommendations.\n- **Researchers**: Examine trends and patterns in specific areas.\n\nWhat you can do with the Places Aggregate API\n---------------------------------------------\n\nWith the Places Aggregate API, you can get the following information:\n\n- **Counts**: Retrieve the number of places that match your criteria.\n- **Places IDs** : Retrieve [Place IDs](/maps/documentation/places/web-service/place-id) of specific places that match your criteria.\n\nYou can also use **filtering** to refine your search based on various attributes\nsuch as place types, operating hours, price levels, and customer ratings.\n| **Note:** Place IDs are returned only if the `count` is 100 or lower.\n\nExamples\n--------\n\nThis section describes example uses case for Places Aggregate API and includes\nworking code for each example.\n| **Tip:** The [Google Maps Platform Architecture Center](/maps/architecture) contains example use cases to help you build apps with Google Maps Platform. For an example using Places Aggregate API, see [Use Places Aggregate API to create a\n| custom location score](/maps/architecture/places-aggregate-location-score). This score will instantly communicate how suitable a location is for your customer's needs.\n\n### Opening a new cafe\n\nA restaurant owner wants to open a new cafe. To do so, they first want to\nvisualize where the hotspots of cafes are so that they can identify areas of\nhigh and low concentration to inform their business decision. The\nPlaces Aggregate API can help analyze the number of cafes within a specific radius\nbased on attributes like operation status, price levels, and customer ratings to\nmake a data-backed decision on where to open their next location.\n\n[View Sample](https://jsfiddle.net/29wufjrt/)\n\n### Real estate investment firm\n\nA real estate investment firm wants to enhance their financial models and\naccurately determine the ROI on their planned property investments. By using\nthe Places Aggregate API, they can gather detailed data on the amenities near\npotential investment properties, such as ATMs, hospitals, transit stations, and\ngrocery stores, so that they can understand the amenities near potential\ninvestment properties.\n\n### Retail delivery service\n\nWhen expanding into a new city, a retail delivery service needs to determine the\nnumber of delivery drivers to allocate to a region based on the density of\npopular consumer destinations, such as restaurants, convenience stores and\nliquor stores. Using the API, the delivery service counts the total number of\nthese establishments throughout the city so that they can plan and allocate\nresources effectively.\n\n[View Sample](https://jsfiddle.net/yb7c9q23/)\n\nHow the Places Aggregate API works\n----------------------------------\n\nThe Places Aggregate API lets you specify filters to narrow your search criteria.\nAfter you select an **Insight Type** of either `INSIGHT_COUNT` or\n`INSIGHT_PLACES`, you can add filter criteria, including the following:\n\n- **Location**: Define the area of interest using circles, regions, or custom polygons.\n- **Type**: Specify the types of places you're interested in.\n- **Operations Status**: Filter places based on their operational status.\n- **Price levels**: Filter places based on price levels.\n- **Ratings**: Filter places based on user ratings.\n\nThe API response [`ComputeInsightsResponse`](/maps/documentation/places-aggregate/reference/rest/v1/TopLevel/computeInsights#response-body) object contains the results of\nthe request insight. For example, if you selected `INSIGHT_COUNT`, the response\ncontains a total number of places, and if you selected `INSIGHT_PLACES`, the\nresponse contains a list of Place IDs.\n\nHow to use the Places Aggregate API\n-----------------------------------\n\n|---|---------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Get set up.** | Start with [Set up your Google Cloud project](/maps/documentation/places-aggregate/cloud-setup) and complete the instructions that follow. |\n| 2 | **Make a request to get the count of matching places.** | See [Make your first request](/maps/documentation/places-aggregate/make-your-first-request). |\n| 3 | **Learn about request parameters.** | See [Request parameters](/maps/documentation/places-aggregate/request-parameters). |\n\nWhat's next\n-----------\n\n- [Review pricing and usage limits](/maps/documentation/places-aggregate/usage-and-billing)\n- [View the API reference](/maps/documentation/places-aggregate/reference/rest)\n- [Review the FAQ](/maps/documentation/places-aggregate/faq)\n- [Review support options](/maps/documentation/places-aggregate/support)"]]