이전에 Places Insights API라고 했던 Places Aggregate API가 이제 정식 버전 (GA)으로 제공됩니다.
첫 번째 요청하기
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 문서에서는 Places Aggregate API에 대한 기본 요청을 하고 일치하는 장소의 수를 포함한 응답을 이해하는 방법을 설명합니다.
사용해 보기
Places Aggregate API를 사용하려면 다음과 같이 computeInsights
엔드포인트에 HTTP POST 요청을 전송합니다.
https://areainsights.googleapis.com/v1:computeInsights
JSON 본문에 지역 및 유형 매개변수를 제공하여 요청을 구체화합니다. 이 예에서는 운영 중이고, 가격이 적당하며, 별점이 4~5개인 샌프란시스코 레스토랑의 수를 반환하는 요청을 보여줍니다.
curl --location 'https://areainsights.googleapis.com/v1:computeInsights' \
--header 'X-Goog-Api-Key: API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"insights":[
"INSIGHT_COUNT"
],
"filter":{
"locationFilter":{
"region":{
"place":"places/ChIJIQBpAG2ahYAR_6128GcTUEo"
}
},
"typeFilter":{
"includedTypes":[
"restaurant"
]
},
"operatingStatus":[
"OPERATING_STATUS_OPERATIONAL"
],
"priceLevels":[
"PRICE_LEVEL_INEXPENSIVE"
],
"ratingFilter":{
"minRating":4.0,
"maxRating":5.0
}
}
}'
Places Aggregate API 응답
위 예시 요청의 다음 응답은 기준과 일치하는 레스토랑 수를 보여줍니다.
{
"count": "850"
}
기능을 사용해 보세요.
API 탐색기를 사용하면 API 및 API 옵션에 익숙해지도록 샘플 요청을 할 수 있습니다.
- 페이지 오른쪽의 API 아이콘
을 선택합니다.
- 원하는 경우 표준 매개변수 표시를 펼쳐 매개변수를 설정합니다.
- 원하는 경우 요청 본문을 수정합니다.
- 실행 버튼을 선택합니다. 대화상자에서 요청을 보낼 때 사용할 계정을 선택합니다.
API 탐색기 패널에서 펼치기 아이콘
을 선택하여 API 탐색기 창을 펼칩니다.
다음 단계
- Places Aggregate API로 할 수 있는 작업의 예시를 자세히 알아보세요.
- 요청 매개변수를 자세히 살펴보세요.
- 전체 API 문서를 확인하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[],[],null,["# Make your first request\n\nThis document walks you through making a basic request to the Places Aggregate API\nand understanding the response, which includes a count of matching places.\n\n[Try it!](#try-it)\n\nTo use Places Aggregate API, send an HTTP POST request to the `computeInsights`\nendpoint as follows: \n\n```bash\nhttps://areainsights.googleapis.com/v1:computeInsights\n```\n\nRefine your [request](/maps/documentation/places-aggregate/reference/rest/v1/TopLevel/computeInsights#request-body) by providing region and type parameters in the JSON\nbody. This example shows a request to return the count of restaurants in San\nFrancisco that are operational, moderately priced, and rated between 4 and 5\nstars. \n\n```bash\ncurl --location 'https://areainsights.googleapis.com/v1:computeInsights' \\\n--header 'X-Goog-Api-Key: API_KEY' \\\n--header 'Content-Type: application/json' \\\n--data '{\n \"insights\":[\n \"INSIGHT_COUNT\"\n ],\n \"filter\":{\n \"locationFilter\":{\n \"region\":{\n \"place\":\"places/ChIJIQBpAG2ahYAR_6128GcTUEo\"\n }\n },\n \"typeFilter\":{\n \"includedTypes\":[\n \"restaurant\"\n ]\n },\n \"operatingStatus\":[\n \"OPERATING_STATUS_OPERATIONAL\"\n ],\n \"priceLevels\":[\n \"PRICE_LEVEL_INEXPENSIVE\"\n ],\n \"ratingFilter\":{\n \"minRating\":4.0,\n \"maxRating\":5.0\n }\n }\n}'\n```\n\nPlaces Aggregate API response\n-----------------------------\n\nThe following response from the example request above shows the count\nof restaurants that match the criteria. \n\n```json\n{\n \"count\": \"850\"\n}\n```\n\nTry it!\n-------\n\nThe API Explorer lets you make sample requests so\nthat you can get familiar with the API and the API options.\n\n1. Select the API icon, , on the right side of the page.\n2. Optionally expand **Show standard parameters** to set any parameters.\n3. Optionally edit the **Request body**.\n4. Select **Execute** button. In the dialog, choose the account that you want to use to make the request.\n5. In the API Explorer panel, select the expand icon,\n , to expand the API Explorer window.\n\nWhat's next\n-----------\n\n- Explore more [examples](/maps/documentation/places-aggregate/example-requests) of what you can achieve with Places Aggregate API.\n- Look at the [request parameters](/maps/documentation/places-aggregate/request-parameters) in more detail.\n- View the full [API documentation](/maps/documentation/places-aggregate/reference/rest)."]]