search_text
async
¶
search_text(
*,
config_overrides: Optional[AsyncGeoPlacesClientConfig] = None,
query_text: Optional[SensitiveString] = None,
query_id: Optional[SensitiveString] = None,
max_results: Optional[int] = None,
bias_position: Optional[Position] = None,
filter: Optional[SearchTextFilter] = None,
additional_features: Optional[SearchTextAdditionalFeatureList] = None,
language: Optional[LanguageTag] = None,
political_view: Optional[CountryCode] = None,
intended_use: Optional[SearchTextIntendedUse] = None,
next_token: Optional[Token] = None,
travel_mode: Optional[SearchTextTravelMode] = None,
key: Optional[ApiKey] = None,
) -> SearchTextResponse
SearchText searches for geocode and place information. You can then complete a follow-up query suggested from the Suggest API via a query id.
For more information, see Search Text in the Amazon Location Service Developer Guide.
Parameters:
-
query_text(Optional[SensitiveString], default:None) –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.
Exactly one of the following fields must be set:
QueryTextorQueryId. -
query_id(Optional[SensitiveString], default:None) –The query Id returned by the suggest API. If passed in the request, the SearchText API will preform a SearchText query with the improved query terms for the original query made to the suggest API. Not available in
ap-southeast-1andap-southeast-5regions for GrabMaps customers.Exactly one of the following fields must be set:
QueryTextorQueryId. -
max_results(Optional[int], default:None) –An optional limit for the number of results returned in a single call.
Default value: 20
-
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.Exactly one of the following fields must be set:
BiasPosition,Filter.BoundingBox, orFilter.Circle. -
filter(Optional[SearchTextFilter], 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[SearchTextAdditionalFeatureList], 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 theTimeZonevalue. -
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 available in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
intended_use(Optional[SearchTextIntendedUse], default:None) –Indicates if the query results will be persisted in customer infrastructure. Defaults to
SingleUse(not stored).When storing
SearchTextresponses, you must set this field toStorageto comply with the terms of service. These requests will be charged at a higher rate. Please review the user agreement and service pricing structure to determine the correct setting for your use case. -
next_token(Optional[Token], default:None) –If
nextTokenis returned, there are more results available. The value ofnextTokenis a unique pagination token for each page. -
travel_mode(Optional[SearchTextTravelMode], 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
774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 | |