

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 비즈니스 체인을 기반으로 근처를 검색하는 방법
<a name="how-to-search-nearby-business"></a>

SearchNearby API를 사용하면 가까운 비즈니스 체인을 쿼리할 수 있습니다. 검색에 특정 비즈니스 체인을 포함하거나 제외할 수 있습니다. 이 기능을 사용하면 최종 사용자가 주변 지역을 탐색하고 관심 지점을 발견하는 등의 작업을 수행할 수 있습니다.

SearchNearby API를 사용하려면 다음과 같은 QueryPosition을 제공해야 합니다.
+ 디바이스 위치
+ IP 기반 위치
+ 맵의 뷰포트 중심

또는 사용자가 도시 이름이나 장소를 제공할 수 있으며 애플리케이션은 해당 위치의 지역 좌표에 따라 결과를 편향시킬 수 있습니다.

지원되는 비즈니스 체인에 대한 자세한 내용은 [비즈니스 체인 필터](places-filtering.md#business-chains) 섹션을 참조하세요.

## 가능한 사용 사례
<a name="potential-use-search-nearby-business"></a>
+ 인근의 사업체 탐색
+ 가까운 B2B 고객을 찾아 비즈니스 확장

## 예제
<a name="search-neaby-business-examples"></a>

### 비즈니스 체인별로 가까운 장소 검색
<a name="search-nearby-business-example"></a>

다음 예제에서는 가까운 Starbucks 위치를 검색하는 방법을 보여줍니다.

------
#### [ Sample request ]

이 요청은 지정된 좌표 근처의 Starbucks 위치를 검색합니다.

```
{
    "QueryPosition": [
        12.49563,
        41.90325
    ],
    "Filter" : {
        "IncludeBusinessChains": ["Starbucks"]
    }    
}
```

------
#### [ Sample response ]

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "Starbucks",
            "Address": {
                "Label": "Starbucks, Via Giovanni Giolitti, 2, 00185 Roma RM, Italia",
                "Country": {
                    "Code2": "IT",
                    "Code3": "ITA",
                    "Name": "Italia"
                },
                "Region": {
                    "Name": "Lazio"
                },
                "SubRegion": {
                    "Code": "RM",
                    "Name": "Roma"
                },
                "Locality": "Roma",
                "District": "Esquilino",
                 "PostalCode": "00185",
                "Street": "Via Giovanni Giolitti",
                "StreetComponents": [
                    {
                        "BaseName": "Giovanni Giolitti",
                        "Type": "Via",
                        "TypePlacement": "BeforeBaseName",
                        "TypeSeparator": " ",
                        "Language": "it"
                    }
                ],
                "AddressNumber": "2"
            },
            "Position": [
                12.50102,
                41.90093
            ],
            "Distance": 515,
            "Categories": [
                {
                    "Id": "coffee_shop",
                    "Name": "Coffee Shop",
                    "LocalizedName": "Bar",
                    "Primary": true
                }
            ],
            "BusinessChains": [
                {
                    "Name": "Starbucks",
                    "Id": "Starbucks"
                }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://places.geo.eu-central-1.amazonaws.com/v2/search-nearby?key=Your_Key' \
  --header 'Content-Type: application/json' \
  --data '{
    "QueryPosition": [
                12.49563,
                41.90325
        ],
        "Filter" : {
        "IncludeBusinessChains": ["Starbucks"]
    }    
}'
```

------
#### [ AWS CLI ]

```
aws geo-places search-nearby --key ${YourKey} \
--query-position 12.49563 41.90325 \
--filter '{"IncludeBusinessChains": ["Starbucks"]}'
```

------

## 개발자 팁
<a name="search-nearby-business-developer-tips"></a>
+ `ExcludeBusinessChains`를 사용하여 결과에서 특정 비즈니스 체인을 제외할 수 있습니다.
+ 여러 비즈니스 체인을 제외 또는 포함할 수 있습니다.