

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

# SearchNearby 사용 방법
<a name="search-nearby-how-to"></a>

이 섹션에는 SearchNearby 사용 방법을 안내하는 다양한 방법과 예제가 포함되어 있습니다.

**Topics**
+ [특정 위치에서 인근을 검색하는 방법](how-to-search-nearby.md)
+ [범주를 기준으로 가까운 장소를 검색하는 방법](how-to-search-nearby-category.md)
+ [음식 유형을 기준으로 가까운 장소를 검색하는 방법](how-to-search-nearby-food.md)
+ [비즈니스 체인을 기반으로 근처를 검색하는 방법](how-to-search-nearby-business.md)
+ [국가 내에서 인근을 검색하는 방법](how-to-search-nearby-country.md)
+ [지리 공간 컨텍스트를 사용하여 인근을 검색하는 방법](how-to-search-nearby-geospatial.md)

# 특정 위치에서 인근을 검색하는 방법
<a name="how-to-search-nearby"></a>

SearchNearby API를 사용하면 특정 텍스트를 입력하지 않고도 근처의 모든 장소 및 관심 지점(POI)을 쿼리할 수 있습니다. 사용자는 이 API를 사용하여 주변 지역을 탐색하고 POI를 검색하는 등의 작업을 수행할 수 있습니다. 디바이스의 위치, IP 기반 위치 또는 맵 뷰포트 중심을 나타낼 수 있는 `QueryPosition`이 필요합니다. 또는 사용자가 도시 또는 장소를 지정하여 해당 위치의 지리 좌표에 따라 결과를 편향시킬 수 있습니다.

## 잠재적 사용 사례
<a name="potential-use"></a>
+ **가까운 POI 탐색:** 현재 위치 근처의 모든 관심 지점을 봅니다.
+ **가까운 장소 탐색:** 지정된 위치 근처의 모든 위치 또는 장소를 봅니다.

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

### 특정 위치에서 인근 검색
<a name="search-nearby-from-position"></a>

이 예제에서는 위도가 25.26951이고 경도가 55.30884인 두바이의 특정 위치에서 검색을 수행합니다.

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

```
{
    "QueryPosition": [
        55.30884,
        25.26951
    ]
}
```

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

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "هما",
            "Address": {
                "Label": "هما, شارع مستشفى آل مكتوم, نايف دبي, الإمارات العربية المتحدة",
                "Country": {
                    "Code2": "AE",
                    "Code3": "ARE",
                    "Name": "الإمارات العربية المتحدة"
                },
                "SubRegion": {
                    "Name": "دبي"
                },
                "Locality": "دبي",
                "District": "نايف",
                "Street": "شارع مستشفى آل مكتوم",
                "StreetComponents": [
                    {
                        "BaseName": "مستشفى آل مكتوم",
                        "Type": "شارع",
                        "TypePlacement": "BeforeBaseName",
                        "TypeSeparator": " ",
                        "Language": "ar"
                    }
                ]
            },
            "Position": [
                55.30884,
                25.26951
            ],
            "Distance": 0,
            "Categories": [
                {
                    "Id": "department_store",
                    "Name": "Department Store",
                    "LocalizedName": "مول تجاري",
                    "Primary": true
                }
            ],
            "BusinessChains": [
                {
                    "Name": "HEMA",
                    "Id": "HEMA"
                }
            ]
        },
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "Locality",
            "Title": "دبي, الإمارات العربية المتحدة",
            "Address": {
                "Label": "دبي, الإمارات العربية المتحدة",
                "Country": {
                    "Code2": "AE",
                    "Code3": "ARE",
                    "Name": "الإمارات العربية المتحدة"
                },
                "SubRegion": {
                    "Name": "دبي"
                },
                "Locality": "دبي"
            },
            "Position": [
                55.30884,
                25.26951
            ],
            "Distance": 0,
            "MapView": [
                54.64906,
                24.62308,
                55.7371,
                25.36995
            ]
        }
    ]
}
```

------
#### [ 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": [
        55.30884,
        25.26951
    ],
    "MaxResults": 2
}'
```

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

```
aws geo-places search-nearby --key ${YourKey} \
--query-position 55.30884 25.26951 \
--max-results 2
```

------

# 범주를 기준으로 가까운 장소를 검색하는 방법
<a name="how-to-search-nearby-category"></a>

SearchNearby API를 사용하면 지정된 범주를 포함하거나 제외하여 관심 지점(POI)을 쿼리할 수 있습니다. 이를 통해 사용자는 주변 지역을 탐색하고 로컬 POI를 검색하는 등의 작업을 수행할 수 있습니다. API에는 디바이스의 위치, IP 위치 또는 맵 뷰포트의 중심을 기반으로 할 수 있는 `QueryPosition`이 필요합니다. 또는 사용자가 도시 또는 장소를 지정할 수 있으며 애플리케이션은 해당 위치의 좌표에 따라 결과를 편향합니다.

지원되는 범주에 대한 자세한 내용은 [카테고리 필터](places-filtering.md#place-categories) 섹션을 참조하세요.

## 가능한 사용 사례
<a name="potential-use"></a>
+ **로컬 시설 탐색:** 인근에서 사용 가능한 시설을 찾습니다.
+ **관광 명소 찾기:** 도시 내의 관광 명소를 식별합니다.
+ **도시 내 여행 계획:** 선택한 도시 내의 다양한 POI를 중심으로 여행을 준비합니다.

## 예제
<a name="search-nearby-category-examples"></a>

### 범주 포함
<a name="include-category"></a>

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

```
{
    "QueryPosition": [
        4.35609,
        50.84439
    ],
    "Filter": {
        "IncludeCategories": ["airport"]
    }
}
```

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

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "Brussels Airport",
            "Address": {
                "Label": "Brussels Airport, A201, 1930 Zaventem, België",
                "Country": {
                    "Code2": "BE",
                    "Code3": "BEL",
                    "Name": "België"
                },
                "Region": {
                    "Code": "VLG",
                    "Name": "Vlaanderen"
                },
                "SubRegion": {
                    "Name": "Vlaams Brabant"
                },
                "Locality": "Zaventem",
                "PostalCode": "1930",
                "Street": "A201",
                "StreetComponents": [
                    {
                        "BaseName": "A201",
                        "Language": "nl"
                    }
                ]
            },
            "Position": [
                4.47767,
                50.89452
            ],
            "Distance": 10191,
            "Categories": [
                {
                    "Id": "airport",
                    "Name": "Airport",
                    "LocalizedName": "Luchthaven",
                    "Primary": true
                }
            ]
        },
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "Internationale Luchthaven Antwerpen",
            "Address": {
                "Label": "Internationale Luchthaven Antwerpen, Luchthavenlei 1, 2100 Antwerpen, België",
                "Country": {
                    "Code2": "BE",
                    "Code3": "BEL",
                    "Name": "België"
                },
                "Region": {
                    "Code": "VLG",
                    "Name": "Vlaanderen"
                },
                "SubRegion": {
                    "Name": "Antwerpen"
                },
                "Locality": "Antwerpen",
                "District": "Deurne",
                "PostalCode": "2100",
                "Street": "Luchthavenlei",
                "StreetComponents": [
                    {
                        "BaseName": "Luchthaven",
                        "Type": "lei",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": "",
                        "Language": "nl"
                    }
                ],
                "AddressNumber": "1"
            },
            "Position": [
                4.45083,
                51.18867
            ],
            "Distance": 38852,
            "Categories": [
                {
                    "Id": "airport",
                    "Name": "Airport",
                    "LocalizedName": "Luchthaven",
                    "Primary": true
                }
            ]
        }
    ]
}
```

------
#### [ 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": [
        4.35609,
        50.84439
    ],
    "Filter": {
        "IncludeCategories": ["airport"]
    },
    "MaxResults": 2
}
```

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

```
aws geo-places search-nearby --key ${YourKey} \
--query-position 4.35609 50.84439 \
--filter '{"IncludeCategories": ["airport"]}' \
--max-results 2
```

------

### 범주 제외
<a name="exclude-category"></a>

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

```
{
    "QueryPosition": [
        4.35609,
        50.84439
    ],
    "Filter": {
        "ExcludeCategories": ["airport"]
    }
}
```

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

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "Socialbrands Module 2",
            "Address": {
                "Label": "Socialbrands Module 2, Albertinaplein, 1000 Brussel, België",
                "Country": {
                    "Code2": "BE",
                    "Code3": "BEL",
                    "Name": "België"
                },
                "Region": {
                    "Code": "BRU",
                    "Name": "Brussel"
                },
                "SubRegion": {
                    "Name": "Brussel"
                },
                "Locality": "Brussel",
                "District": "Koningswijk",
                "PostalCode": "1000",
                "Street": "Albertinaplein",
                "StreetComponents": [
                    {
                        "BaseName": "Albertina",
                        "Type": "plein",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": "",
                        "Language": "nl"
                    }
                ]
            },
            "Position": [
                4.35609,
                50.84439
            ],
            "Distance": 0,
            "Categories": [
                {
                    "Id": "commercial_services",
                    "Name": "Commercial Services",
                    "LocalizedName": "Commerciële diensten",
                    "Primary": true
                }
            ],
            "Contacts": {
                "Websites": [
                    {
                        "Value": "https://oneread.net"
                    }
                ]
            },
            "AccessPoints": [
                {
                    "Position": [
                        4.35609,
                        50.84439
                    ]
                }
            ]
        },
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "Barman Privé",
            "Address": {
                "Label": "Barman Privé, Albertinaplein, 1000 Brussel, België",
                "Country": {
                    "Code2": "BE",
                    "Code3": "BEL",
                    "Name": "België"
                },
                "Region": {
                    "Code": "BRU",
                    "Name": "Brussel"
                },
                "SubRegion": {
                    "Name": "Brussel"
                },
                "Locality": "Brussel",
                "District": "Koningswijk",
                "PostalCode": "1000",
                "Street": "Albertinaplein",
                "StreetComponents": [
                    {
                        "BaseName": "Albertina",
                        "Type": "plein",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": "",
                        "Language": "nl"
                    }
                ]
            },
            "Position": [
                4.35609,
                50.84439
            ],
            "Distance": 0,
            "Categories": [
                {
                    "Id": "catering_and_other_food_services",
                    "Name": "Catering and Other Food Services",
                    "LocalizedName": "Catering- en horecadiensten",
                    "Primary": true
                }
            ],
            "Contacts": {
                "Phones": [
                    {
                        "Value": "+32476891634"
                    }
                ]
            },
            "OpeningHours": [
                {
                    "Display": [
                        "ma-zo: 00:00 - 24:00"
                    ],
                    "OpenNow": true,
                    "Components": [
                        {
                            "OpenTime": "T000000",
                            "OpenDuration": "PT24H00M",
                            "Recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA,SU"
                        }
                    ]
                }
            ],
            "AccessPoints": [
                {
                    "Position": [
                        4.35609,
                        50.84439
                    ]
                }
            ]
        }
    ]
}
```

------
#### [ 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": [
        4.35609,
        50.84439
    ],
    "Filter": {
        "ExcludeCategories": ["airport"]
    }
}
```

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

```
aws geo-places search-nearby --key ${YourKey} \
--query-position 4.35609 50.84439 \
--filter '{"ExcludeCategories": ["airport"]}' \
--max-results 2
```

------

# 음식 유형을 기준으로 가까운 장소를 검색하는 방법
<a name="how-to-search-nearby-food"></a>

`SearchNearby` API를 사용하면 특정 유형의 음식을 제공하는 인근 레스토랑을 쿼리할 수 있습니다. 또한 결과에서 음식 유형을 제외할 수도 있습니다.

SearchNearby API를 사용하면 최종 사용자가 주변 지역을 탐색하고 관심 장소를 찾을 수 있습니다. API에는 QueryPosition이 필요하며 이 위치는 디바이스 위치, IP 위치 또는 맵의 뷰 포트 중심일 수 있습니다. 또 다른 방법은 최종 사용자가 도시 이름 또는 장소 이름을 제공하도록 하는 것이며 애플리케이션은 지리 좌표에 따라 결과를 편향시킬 수 있습니다.

음식 유형에 대한 자세한 내용은 [음식 종류 필터](places-filtering.md#food-type) 섹션을 참조하세요.

## 가능한 사용 사례
<a name="potential-use-search-nearby-04"></a>
+ 인근에서 제공되는 음식 유형을 탐색합니다.
+ 알레르기가 있는 음식 유형을 제공하는 레스토랑 옵션은 제외합니다.

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

### 음식 유형별로 가까운 장소 검색
<a name="search-nearby-food-example"></a>

다음 예제에서는 음식 유형에 따라 가까운 장소를 검색하는 방법을 보여줍니다.

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

이 요청은 지정된 좌표 근처에서 중국 음식을 제공하는 레스토랑을 검색합니다.

```
{
    "QueryPosition": [
        12.49563,
        41.90325
    ],
    "Filter": {
        "IncludeFoodTypes": ["chinese"]
    }
}
```

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

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "Bufala e Pachino",
            "Address": {
                "Label": "Bufala e Pachino, Via Firenze, 53, 00184 Roma RM, Italia",
                "Country": {
                    "Code2": "IT",
                    "Code3": "ITA",
                    "Name": "Italia"
                }
            },
            "Position": [
                12.49409,
                41.90237
            ],
            "Distance": 161,
            "Categories": [
                {
                    "Id": "restaurant",
                    "Name": "Restaurant",
                    "LocalizedName": "Ristorante",
                    "Primary": true
                }
            ],
            "FoodTypes": [
                {
                    "LocalizedName": "Pizza",
                    "Id": "pizza",
                    "Primary": true
                },
                {
                    "LocalizedName": "Cinese",
                    "Id": "chinese",
                    "Primary": false
                }
            ]
        }
    ]
}
```

------
#### [ 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": {
        "IncludeFoodTypes": ["chinese"]
    }
}'
```

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

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

------

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

# 비즈니스 체인을 기반으로 근처를 검색하는 방법
<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`를 사용하여 결과에서 특정 비즈니스 체인을 제외할 수 있습니다.
+ 여러 비즈니스 체인을 제외 또는 포함할 수 있습니다.

# 국가 내에서 인근을 검색하는 방법
<a name="how-to-search-nearby-country"></a>

SearchNearby API를 사용하면 특정 국가 내에서 가까운 장소를 검색할 수 있습니다. API를 사용하려면 다음과 같은 QueryPosition을 제공해야 합니다.
+ 디바이스 위치
+ IP 기반 위치
+ 맵의 뷰포트 중심

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

## 가능한 사용 사례
<a name="potential-use-search-nearby-country"></a>
+ 국가 내에서 사업체 탐색
+ 국가 내에서 가까운 B2B 고객 찾기
+ 국가 내 관광지 탐색

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

### 캐나다에서 골프 코스 검색
<a name="search-nearby-country-example"></a>

다음 예제는 캐나다 내에서 지정된 좌표에 가까운 골프 코스를 검색하는 방법을 보여줍니다.

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

이 요청은 캐나다에서 지정된 위치 근처의 골프 코스를 검색합니다.

```
{
    "QueryPosition": [
            -122.741803, 
            49.002478
    ],
    "Filter" : {
        "IncludeCategories": ["golf_course"],
        "IncludeCountries": ["CAN"]
    }
}
```

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

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "Peace Portal Golf Course",
            "Address": {
                "Label": "Peace Portal Golf Course, 16900 * Ave, Surrey, BC V*Z *P*, Canada",
                "Country": {
                    "Code2": "CA",
                    "Code3": "CAN",
                    "Name": "Canada"
                },
                "Region": {
                    "Code": "BC",
                    "Name": "British Columbia"
                },
                "SubRegion": {
                    "Name": "Metro Vancouver"
                },
                "Locality": "Surrey",
                "District": "South Surrey",
                "PostalCode": "V*Z *P*",
                "Street": "* Ave",
                "StreetComponents": [
                    {
                        "BaseName": "4",
                        "Type": "Ave",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": " ",
                        "Language": "en"
                    }
                ],
                "AddressNumber": "16900"
            },
            "Position": [
                -122.75086,
                49.00921
            ],
            "Distance": 998,
            "Categories": [
                {
                    "Id": "golf_course",
                    "Name": "Golf Course",
                    "LocalizedName": "Golf Course",
                    "Primary": true
                }
            ],
            "Contacts": {
                "Phones": [
                    {
                        "Value": "+16045384818"                    }
                ],
                "Websites": [
                    {
                        "Value": "http://www.peaceportalgolf.com"
                    }
                ]
            },
            "AccessPoints": [
                {
                    "Position": [
                        -122.75087,
                        49.00935
                    ]
                }
            ]
        }
    ]
}
```

------
#### [ 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": [
         -122.741803, 
         49.002478
        ],
        "Filter" : {
        "IncludeCategories": ["golf_course"],
              "IncludeCountries": ["CAN"]
    }
    
}'
```

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

```
aws geo-places search-nearby --key ${YourKey} \
--query-position -122.741803 49.002478 \
--filter '{"IncludeCategories": ["golf_course"], "IncludeCountries": ["CAN"]}'
```

------

# 지리 공간 컨텍스트를 사용하여 인근을 검색하는 방법
<a name="how-to-search-nearby-geospatial"></a>

SearchNearby API를 사용하면 지리 공간 컨텍스트(예: 원 또는 경계 상자) 내에서 결과를 제한하면서 인근을 탐색할 수 있습니다.

SearchNearby API를 사용하면 원 및 경계 상자와 같은 지리 공간 컨텍스트를 사용하여 결과를 필터링할 수 있습니다. 이러한 지리적 경계를 정의하면 검색 결과를 특정 영역으로 제한할 수 있습니다.

## 가능한 사용 사례
<a name="potential-use-search-nearby-geospatial"></a>
+ 검색 결과를 특정 지리적 영역으로 제한
+ 사용자 정의 경계 내에서 검색
+ 대상 지역 또는 지구에 결과 집중

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

### 쿼리 반경을 사용하여 검색
<a name="search-nearby-geospatial-example"></a>

다음 예제에서는 지정된 좌표의 반경 1,000미터 내에 있는 학교를 검색하는 방법을 보여줍니다.

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

이 요청은 반경 1,000미터(1킬로미터) 내에 있는 학교를 검색합니다.

```
{
    "QueryPosition": [
                 -122.741803, 
         49.002478
        ],
        "QueryRadius":1000,
        "Filter" : {
            "IncludeCategories": ["school"]
    }
    
}
```

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

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "Grace Lutheran Church",
            "Address": {
                "Label": "Grace Lutheran Church, 702 G St, Blaine, WA 98230-5125, United States",
                "Country": {
                    "Code2": "US",
                    "Code3": "USA",
                    "Name": "United States"
                },
                "Region": {
                    "Code": "WA",
                    "Name": "Washington"
                },
                "SubRegion": {
                    "Name": "Whatcom"
                },
                "Locality": "Blaine",
                "PostalCode": "98230-5125",
                "Street": "G St",
                "StreetComponents": [
                    {
                        "BaseName": "G",
                        "Type": "St",
                        "TypePlacement": "AfterBaseName",
                        "TypeSeparator": " ",
                        "Language": "en"
                    }
                ],
                "AddressNumber": "702"
            },
            "Position": [
                -122.74157,
                48.99533
            ],
            "Distance": 795,
            "Categories": [
                {
                    "Id": "church",
                    "Name": "Church",
                    "LocalizedName": "Church",
                    "Primary": true
                },
                {
                    "Id": "kindergarten_and_childcare",
                    "Name": "Kindergarten and Childcare",
                    "LocalizedName": "Kindergarten & Childcare",
                    "Primary": false
                },
                {
                    "Id": "school",
                    "Name": "School",
                    "LocalizedName": "School",
                    "Primary": false
                }
            ]
        }
        ...
    ]
}
```

------
#### [ 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": [
         -122.741803, 
         49.002478
    ],
    "QueryRadius": 1000,
    "Filter": {
        "IncludeCategories": ["school"]
    }
}'
```

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

```
aws geo-places search-nearby --key ${YourKey} \
--query-position -122.741803 49.002478 \
--query-radius 1000 \
--filter '{"IncludeCategories": ["school"]}'
```

------

## 개발자 팁
<a name="search-nearby-geospatial-developer-tips"></a>
+ 또는 경계 상자 필터를 사용할 수 있습니다.