주소 작성 방법 - Amazon Location Service

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

주소 작성 방법

자동 완성 API를 사용하면 부분적으로 입력된 주소를 완성하여 최종 사용자에게 표준화된 입력을 제공하고 데이터 입력 시 효율성을 개선할 수 있습니다.

잠재적 사용 사례

  • 체크아웃 중 주소 작성: 고객이 체크아웃 양식에 입력할 때 정확하고 빠른 주소 입력을 용이하게 합니다.

  • 국가별 주소 완성: 규정 준수 또는 사용자 위치와의 관련성을 위해 특정 국가로 제안을 제한합니다.

예시

이 예제에서는 응답을 간결하고 비용 효율적으로 유지하기 위해 최소 데이터가 반환됩니다. 전체 장소 세부 정보는 나중에 GetPlace API와 함께 PlaceId를 사용하여 검색할 수 있습니다.

Sample request
{ "QueryText": "100 McCullum Rd" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointAddress", "Title": "United Kingdom, E3 5JB, London, 100 McCullum Road" } ], "QueryRefinements": [] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/autocomplete?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText": "100 McCullum Rd" }'
AWS CLI
aws geo-places autocomplete --key ${YourKey} --query-text "100 McCullum Rd"

이 예제에서는 여러 주소 제안을 반환하여 사용자가 양식 필드를 정확하게 채우기 위해 표준화된 주소 형식을 선택할 수 있도록 합니다.

Sample request
{ "QueryText": "100 McCullum Rd", "AdditionalFeatures": [ "Core" ] }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointAddress", "Title": "United Kingdom, E3 5JB, London, 100 McCullum Road", "Address": { "Label": "100 McCullum Road, London, E3 5JB, United Kingdom", "Country": { "Code2": "GB", "Code3": "GBR", "Name": "United Kingdom" }, "Region": { "Name": "England" }, "SubRegion": { "Code": "LDN", "Name": "London" }, "Locality": "London", "District": "Bow", "PostalCode": "E3 5JB", "Street": "McCullum Road", "StreetComponents": [ { "BaseName": "McCullum", "Type": "Road", "TypePlacement": "AfterBaseName", "TypeSeparator": " ", "Language": "en" } ], "AddressNumber": "100" }, "Language": "en", "Highlights": { "Title": [ { "StartIndex": 32, "EndIndex": 35, "Value": "100" }, { "StartIndex": 36, "EndIndex": 49, "Value": "McCullum Road" } ], "Address": { "Label": [ { "StartIndex": 0, "EndIndex": 3, "Value": "100" }, { "StartIndex": 4, "EndIndex": 17, "Value": "McCullum Road" } ], "Street": [ { "StartIndex": 0, "EndIndex": 13, "Value": "McCullum Road" } ], "AddressNumber": [ { "StartIndex": 0, "EndIndex": 3, "Value": "100" } ] } } }, ... ], "QueryRefinements": [] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/autocomplete?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText": "100 McCullum Rd", "AdditionalFeatures": [ "Core" ] }'
AWS CLI
aws geo-places autocomplete --key ${YourKey} --query-text "100 McCullum Rd" --additional-features "Core"