So suchen Sie anhand des Kategorienamens oder der Lebensmittelart - Amazon Location Service

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

So suchen Sie anhand des Kategorienamens oder der Lebensmittelart

Mit der SearchText API können Sie nach dem Namen einer Kategorie suchen, z. B. nach Restaurants, Schulen und mehr. Sie können auch nach Lebensmittelart suchen.

Eine Möglichkeit, die SearchText API zu verwenden, besteht darin, Endbenutzern die Suche nach Namen (Kategorie und Lebensmittelart) und der Voreingenommenheit einer Anwendungsgruppe zu ermöglichen. Bei diesen Verzerrungen kann es sich um eine Geräteposition, eine IP-Position oder den Mittelpunkt des Kartenansichtsfensters handeln. Darüber hinaus können Endbenutzer den Namen oder den Ort der Stadt angeben, und die Anwendung kann die Ergebnisse anhand von Geokoordinaten verzerren.

Weitere Informationen erhalten Sie unter Filter für Kategorien und Filter für den Lebensmitteltyp.

Mögliche Anwendungsfälle

  • Suchen Sie im Rahmen der Erkundung einer Nachbarschaft nach einem bestimmten POI oder Ort.

  • Suchen Sie nach einem bestimmten Touristenort für die Reiseplanung.

  • Suchen Sie nach Restaurants, die ein bestimmtes Essen servieren.

Beispiele

Sample request
{ "QueryText": "Nursing Home", "BiasPosition": [ -123.11336, 49.26038 ], }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointOfInterest", "Title": "Diamond Geriatrics Inc", "Address": { "Label": "Diamond Geriatrics Inc, 288 W 8th Ave, Vancouver, BC V5Y 1N5, Canada", "Country": { "Code2": "CA", "Code3": "CAN", "Name": "Canada" }, "Region": { "Code": "BC", "Name": "British Columbia" }, "SubRegion": { "Name": "Metro Vancouver" }, "Locality": "Vancouver", "District": "Mt Pleasant", "PostalCode": "V5Y 1N5", "Street": "W 8th Ave", "StreetComponents": [ { "BaseName": "8th", "Type": "Ave", "TypePlacement": "AfterBaseName", "TypeSeparator": " ", "Prefix": "W", "Language": "en" } ], "AddressNumber": "288" }, "Position": [ -123.11061, 49.2636 ], "Distance": 410, "Categories": [ { "Id": "nursing_home", "Name": "Nursing Home", "LocalizedName": "Nursing Home", "Primary": true }, { "Id": "social_service", "Name": "Social Service", "LocalizedName": "Social Services", "Primary": false } ] }, { "PlaceId": "<Redacted>", "PlaceType": "PointOfInterest", "Title": "Para Med Home Health Care", "Address": { "Label": "Para Med Home Health Care, 601 W Broadway, Vancouver, BC V5Z 4C2, Canada", "Country": { "Code2": "CA", "Code3": "CAN", "Name": "Canada" }, "Region": { "Code": "BC", "Name": "British Columbia" }, "SubRegion": { "Name": "Metro Vancouver" }, "Locality": "Vancouver", "District": "Fairview", "PostalCode": "V5Z 4C2", "Street": "W Broadway", "StreetComponents": [ { "BaseName": "Broadway", "Prefix": "W", "Language": "en" } ], "AddressNumber": "601" }, "Position": [ -123.11772, 49.26343 ], "Distance": 464, "Categories": [ { "Id": "nursing_home", "Name": "Nursing Home", "LocalizedName": "Nursing Home", "Primary": true }, { "Id": "hospital_or_health_care_facility", "Name": "Hospital or Health Care Facility", "LocalizedName": "Hospital or Health Care Facility", "Primary": false } ] } ... ... ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/search-text?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText": "Nursing Home", "BiasPosition": [ -123.11336, 49.26038 ] }'
AWS CLI
aws geo-places search-text --key ${YourKey} --query-text "Nursing Home" --bias-position -123.11336 49.26038

Geben Sie einen Lebensmitteltyp anQueryText, um Restaurants nach Lebensmittelart auszuwählen. Durch die Filterung nach Lebensmittelart können Restaurants nach Lebensmittelart indexiert, abgefragt und angezeigt werden.

Sample request
{ "QueryText": "Sushi", "BiasPosition": [ -123.11336, 49.26038 ] }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointOfInterest", "Title": "Sushi Tomy", "Address": { "Label": "Sushi Tomy, 555 W 12th Ave, Vancouver, BC V5Z 3X7, Canada", "Country": { "Code2": "CA", "Code3": "CAN", "Name": "Canada" }, "Region": { "Code": "BC", "Name": "British Columbia" }, "SubRegion": { "Name": "Metro Vancouver" }, "Locality": "Vancouver", "District": "Fairview", "PostalCode": "V5Z 3X7", "Street": "W 12th Ave", "StreetComponents": [ { "BaseName": "12th", "Type": "Ave", "TypePlacement": "AfterBaseName", "TypeSeparator": " ", "Prefix": "W", "Language": "en" } ], "AddressNumber": "555" }, "Position": [ -123.11629, 49.26086 ], "Distance": 219, "Categories": [ { "Id": "deli", "Name": "Deli", "LocalizedName": "Deli", "Primary": true }, { "Id": "restaurant", "Name": "Restaurant", "LocalizedName": "Restaurant", "Primary": false }, { "Id": "casual_dining", "Name": "Casual Dining", "LocalizedName": "Casual Dining", "Primary": false } ], "FoodTypes": [ { "LocalizedName": "Japanese - Sushi", "Id": "japanese-sushi", "Primary": true }, { "LocalizedName": "Canadian", "Id": "canadian", "Primary": false }, { "LocalizedName": "Japanese", "Id": "japanese", "Primary": false } ] }, { "PlaceId": "<Redacted>" "PlaceType": "PointOfInterest", "Title": "Shiro Japanese Restaurant", "Address": { "Label": "Shiro Japanese Restaurant, 3096 Cambie St, Vancouver, BC V5Z 2V9, Canada", "Country": { "Code2": "CA", "Code3": "CAN", "Name": "Canada" }, "Region": { "Code": "BC", "Name": "British Columbia" }, "SubRegion": { "Name": "Metro Vancouver" }, "Locality": "Vancouver", "District": "Mt Pleasant", "PostalCode": "V5Z 2V9", "Street": "Cambie St", "StreetComponents": [ { "BaseName": "Cambie", "Type": "St", "TypePlacement": "AfterBaseName", "TypeSeparator": " ", "Language": "en" } ], "AddressNumber": "3096" }, "Position": [ -123.11461, 49.25797 ], "Distance": 283, "Categories": [ { "Id": "casual_dining", "Name": "Casual Dining", "LocalizedName": "Casual Dining", "Primary": true }, { "Id": "restaurant", "Name": "Restaurant", "LocalizedName": "Restaurant", "Primary": false } ], "FoodTypes": [ { "LocalizedName": "Japanese - Sushi", "Id": "japanese-sushi", "Primary": true }, { "LocalizedName": "Asian", "Id": "asian", "Primary": false }, { "LocalizedName": "Japanese", "Id": "japanese", "Primary": false } ] }, ... ... ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/search-text?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText": "Sushi", "BiasPosition": [ -123.11336, 49.26038 ] }'
AWS CLI
aws geo-places search-text --key ${YourKey} --query-text "Sushi" --bias-position -123.11336 49.26038