suggest
async
¶
suggest(
query_text: SensitiveString,
*,
config_overrides: Optional[AsyncGeoPlacesClientConfig] = None,
max_results: Optional[int] = None,
max_query_refinements: Optional[int] = None,
bias_position: Optional[Position] = None,
filter: Optional[SuggestFilter] = None,
additional_features: Optional[SuggestAdditionalFeatureList] = None,
language: Optional[LanguageTag] = None,
political_view: Optional[CountryCode] = None,
intended_use: Optional[SuggestIntendedUse] = None,
travel_mode: Optional[SuggestTravelMode] = None,
key: Optional[ApiKey] = None,
) -> SuggestResponse
Suggest provides intelligent predictions or recommendations based on the user's input or context, such as relevant places, points of interest, query terms or search category. It is designed to help users find places or point of interests candidates or identify a follow on query based on incomplete or misspelled queries. It returns a list of possible matches or refinements that can be used to formulate a more accurate query. Users can select the most appropriate suggestion and use it for further searching. The API provides options for filtering results by location and other attributes, and allows for additional features like phonemes and timezones. The response includes refined query terms and detailed place information.
For more information, see Suggest in the Amazon Location Service Developer Guide.
Parameters:
-
query_text(SensitiveString) –The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.
The fields
QueryTextandQueryIDare mutually exclusive. -
max_results(Optional[int], default:None) –An optional limit for the number of results returned in a single call.
Default value: 20
-
max_query_refinements(Optional[int], default:None) –Maximum number of query terms to be returned for use with a search text query. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
bias_position(Optional[Position], default:None) –The position, in longitude and latitude, that the results should be close to. Typically, place results returned are ranked higher the closer they are to this position. Stored in
[lng, lat]and in the WGS 84 format.The fields
BiasPosition,FilterBoundingBox, andFilterCircleare mutually exclusive. -
filter(Optional[SuggestFilter], default:None) –A structure which contains a set of inclusion/exclusion properties that results must possess in order to be returned as a result.
-
additional_features(Optional[SuggestAdditionalFeatureList], default:None) –A list of optional additional parameters, such as time zone, that can be requested for each result. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions support only theCoreandTimeZonevalues. -
language(Optional[LanguageTag], default:None) –A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions support only the following codes:en, id, km, lo, ms, my, pt, th, tl, vi, zh -
political_view(Optional[CountryCode], default:None) –The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
intended_use(Optional[SuggestIntendedUse], default:None) –Indicates if the query results will be persisted in customer infrastructure. Defaults to
SingleUse(not stored). Currently,Suggestdoes not support storage of results. -
travel_mode(Optional[SuggestTravelMode], default:None) –Indicates the mode of mobility used by the end user. This is used to improve the relevance of search results. Valid values are
Car,Scooter, andTruck. -
key(Optional[ApiKey], default:None) –Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action.
-
InternalServerException–The request processing has failed because of an unknown error, exception or failure.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by an AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_geo_places/_services/async_geo_places.py
898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 | |