search_nearby
¶
search_nearby(
query_position: Position,
*,
config_overrides: Optional[GeoPlacesClientConfig] = None,
query_radius: Optional[DistanceMeters] = None,
max_results: Optional[int] = None,
filter: Optional[SearchNearbyFilter] = None,
additional_features: Optional[SearchNearbyAdditionalFeatureList] = None,
language: Optional[LanguageTag] = None,
political_view: Optional[CountryCode] = None,
intended_use: Optional[SearchNearbyIntendedUse] = None,
next_token: Optional[Token] = None,
key: Optional[ApiKey] = None,
) -> SearchNearbyResponse
SearchNearby queries for points of interest within a radius from a central coordinates, returning place results with optional filters such as categories, business chains, food types and more. The API returns details such as a place name, address, phone, category, food type, contact, opening hours. Also, the API can return phonemes, time zones and more based on requested parameters. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers.
For more information, see Search Nearby in the Amazon Location Service Developer Guide.
Parameters:
-
query_position(Position) –The position in World Geodetic System (WGS 84) format: [longitude, latitude] for which you are querying nearby results for. Results closer to the position will be ranked higher then results further away from the position
-
query_radius(Optional[DistanceMeters], default:None) –The maximum distance in meters from the QueryPosition from which a result will be returned.
The fields
QueryText, andQueryIDare mutually exclusive. -
max_results(Optional[int], default:None) –An optional limit for the number of results returned in a single call.
Default value: 20
-
filter(Optional[SearchNearbyFilter], 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[SearchNearbyAdditionalFeatureList], default:None) –A list of optional additional parameters, such as time zone, that can be requested for each result.
-
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.
-
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.
-
intended_use(Optional[SearchNearbyIntendedUse], default:None) –Indicates if the query results will be persisted in customer infrastructure. Defaults to
SingleUse(not stored). Not supported inap-southeast-1andap-southeast-5regions for GrabMaps customers.When storing
SearchNearbyresponses, 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. -
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/geo_places.py
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | |