Search for places that match specific criteria
Find places by name or by specific search criteria.
URL
GET https://maps-api.apple.com/v1/searchQuery Parameters
| Name | Type | Description |
|---|---|---|
q Required | string | The place to search for. For example, |
excludePoiCategories Optional | [PoiCategory] | A comma-separated list of strings that describes the points of interest to exclude from the search results. For example, See PoiCategory for a complete list of possible values. |
includePoiCategories Optional | [PoiCategory] | A comma-separated list of strings that describes the points of interest to include in the search results. For example, See PoiCategory for a complete list of possible values. |
limitToCountries Optional | [string] | A comma-separated list of two-letter ISO 3166-1 codes of the countries to limit the results to. For example, If you specify two or more countries, the results reflect the best available results for some or all of the countries rather than everything related to the query for those countries. |
resultTypeFilter Optional | [SearchResultType] | A comma-separated list of strings that describes the kind of result types to include in the response. For example, |
lang Optional | Lang | The language the server should use when returning the response, specified using a BCP 47 language code. For example, for English use |
searchLocation Optional | SearchLocation | A location defined by the application as a hint. Specify the location as a comma-separated string containing the latitude and longitude. For example, |
searchRegion Optional | SearchRegion | A region the app defines as a hint. Specify the region specified as a comma-separated string that describes the region in the form north-latitude,east-longitude,south-latitude,west-longitude. For example, |
userLocation Optional | UserLocation | The location of the user, specified as a comma-separated string that contains the latitude and longitude. For example, Search may opt to use the |
searchRegionPriority Optional | string | A value that indicates the importance of the configured region. |
enablePagination Optional | boolean | A value that tells the server that we expect paginated results. |
pageToken Optional | string | A value that indicates which page of results to return. |
includeAddressCategories Optional | [AddressCategory] | A comma-separated list of strings that describes the addresses to include in the search results. For example, |
excludeAddressCategories Optional | [AddressCategory] | A comma-separated list of strings that describes the addresses to exclude in the search results. For example, |
Response Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: application/json | SearchResponse | Returns a SearchMapRegion that describes a region that encloses the results, and an array of SearchResponse objects that describes the results of the search. |
| 400 | Bad Request Content-Type: application/json | ErrorResponse | An ErrorResponse object that contains an error message and an array of strings that contain additional details about the error. |
| 401 | Unauthorized Content-Type: application/json | ErrorResponse | An ErrorResponse object that contains an error message that indicates the Maps access token was missing or invalid, and an array of strings that contains additional details about the error. |
| 429 | Content-Type: application/json | ErrorResponse | An ErrorResponse object that indicates the call exceeds the daily service call quota for the authorization token presented. The app should try again later. If your app requires a larger daily quota, submit a quota increase request form. |
| 500 | Internal Server Error Content-Type: application/json | ErrorResponse | An ErrorResponse object that contains a server error message and an array of strings that describe additional details about the error. |
Discussion
Example
See Also
Searching
AddressCategorySearchACResultTypeSearchResultTypeAlternateIdsResponseAlternateIdsResponse.AlternateIdsPlacesResponsePlacesResponse.PlaceLookupErrorSearch for places that meet specific criteria to autocomplete a place searchSearch for a place using an identifierSearch for places using mulitple identifiersObtain a list of alternate place identifiers