|
6 | 6 |
|
7 | 7 | The point around which to retrieve place information. This must be specified as `latitude,longitude`. |
8 | 8 |
|
| 9 | +- <h3 class="parameter-name" id="radius">radius</h3> |
| 10 | + |
| 11 | + Defines the distance (in meters) within which to return place results. You may bias results to a specified circle by passing a `location` and a `radius` parameter. Doing so instructs the Places service to *prefer* showing results within that circle; results outside of the defined area may still be displayed. |
| 12 | + |
| 13 | + The radius will automatically be clamped to a maximum value depending on the type of search and other parameters. |
| 14 | + |
| 15 | + - Autocomplete: 50,000 meters |
| 16 | + - Nearby Search: |
| 17 | + - with `keyword` or `name`: 50,000 meters |
| 18 | + - without `keyword` or `name` |
| 19 | + - Up to 50,000 meters, adjusted dynamically based on area density, independent of `rankby` parameter. |
| 20 | + - When using `rankby=distance`, the radius parameter will not be accepted, and will result in an `INVALID_REQUEST`. |
| 21 | + - Query Autocomplete: 50,000 meters |
| 22 | + - Text Search: 50,000 meters |
| 23 | + |
| 24 | +- <h3 class="parameter-name" id="type">type</h3> |
| 25 | + |
| 26 | + Restricts the results to places matching the specified type. Only one type may be specified. If more than one type is provided, all types following the first entry are ignored. |
| 27 | + |
| 28 | + - `type=hospital|pharmacy|doctor` becomes `type=hospital` |
| 29 | + - `type=hospital,pharmacy,doctor` is ignored entirely |
| 30 | + |
| 31 | + See the list of [supported types](https://developers.google.com/maps/documentation/places/web-service/supported_types). |
| 32 | + |
| 33 | + <div class="note">Note: Adding both `keyword` and `type` with the same value (`keyword=cafe&type=cafe` or `keyword=parking&type=parking`) can yield `ZERO_RESULTS`.</div> |
| 34 | + |
9 | 35 | <h2 id="optional-parameters">Optional parameters</h2> |
10 | 36 |
|
11 | 37 | - <h3 class="parameter-name" id="keyword">keyword</h3> |
|
50 | 76 |
|
51 | 77 | Returns up to 20 results from a previously run search. Setting a `pagetoken` parameter will execute a search with the same parameters used previously — all parameters other than pagetoken will be ignored. |
52 | 78 |
|
53 | | -- <h3 class="parameter-name" id="radius">radius</h3> |
54 | | - |
55 | | - Defines the distance (in meters) within which to return place results. You may bias results to a specified circle by passing a `location` and a `radius` parameter. Doing so instructs the Places service to *prefer* showing results within that circle; results outside of the defined area may still be displayed. |
56 | | - |
57 | | - The radius will automatically be clamped to a maximum value depending on the type of search and other parameters. |
58 | | - |
59 | | - - Autocomplete: 50,000 meters |
60 | | - - Nearby Search: |
61 | | - - with `keyword` or `name`: 50,000 meters |
62 | | - - without `keyword` or `name` |
63 | | - - Up to 50,000 meters, adjusted dynamically based on area density, independent of `rankby` parameter. |
64 | | - - When using `rankby=distance`, the radius parameter will not be accepted, and will result in an `INVALID_REQUEST`. |
65 | | - - Query Autocomplete: 50,000 meters |
66 | | - - Text Search: 50,000 meters |
67 | | - |
68 | 79 | - <h3 class="parameter-name" id="rankby">rankby</h3> |
69 | 80 |
|
70 | 81 | Specifies the order in which results are listed. Possible values are: |
71 | 82 |
|
72 | 83 | - `prominence` (default). This option sorts results based on their importance. Ranking will favor prominent places within the set radius over nearby places that match but that are less prominent. Prominence can be affected by a place's ranking in Google's index, global popularity, and other factors. When prominence is specified, the `radius` parameter is required. |
73 | 84 | - `distance`. This option biases search results in ascending order by their distance from the specified location. When `distance` is specified, one or more of `keyword`, `name`, or `type` is required and `radius` is disallowed. |
74 | 85 |
|
75 | | -- <h3 class="parameter-name" id="type">type</h3> |
76 | | - |
77 | | - Restricts the results to places matching the specified type. Only one type may be specified. If more than one type is provided, all types following the first entry are ignored. |
78 | | - |
79 | | - - `type=hospital|pharmacy|doctor` becomes `type=hospital` |
80 | | - - `type=hospital,pharmacy,doctor` is ignored entirely |
81 | | - |
82 | | - See the list of [supported types](https://developers.google.com/maps/documentation/places/web-service/supported_types). |
83 | | - |
84 | | - <div class="note">Note: Adding both `keyword` and `type` with the same value (`keyword=cafe&type=cafe` or `keyword=parking&type=parking`) can yield `ZERO_RESULTS`.</div> |
85 | | - |
86 | 86 |
|
87 | 87 | <p style="text-align: right; font-size: smaller;">Generated from the <a class="gc-analytics-event" data-category="GMP" data-label="openapi-github" href="https://github.com/googlemaps/openapi-specification" title="Google Maps Platform OpenAPI Specification" class="external">OpenAPI specification</a>. |
88 | 88 | <a class="gc-analytics-event" data-category="GMP" data-label="openapi-github-maps-http-parameters-placenearbysearch" data-action="edit" style="margin-left: 5px;" href="https://github.com/googlemaps/openapi-specification/tree/main/specification/parameters" title="Edit on GitHub"><span class="material-icons">edit</span> Edit</a> |
|
0 commit comments