---
title: Geocode an address
framework: Apple Maps Server API
role: symbol
role_heading: Web Service Endpoint
platforms: [apple maps server api 1.2+]
path: applemapsserverapi/-v1-geocode
---

# Geocode an address

Returns the latitude and longitude of the address you specify.

## URL

GET https://maps-api.apple.com/v1/geocode

## Query Parameters

q: The address to geocode. For example: q=1 Apple Park, Cupertino, CA limitToCountries: A comma-separated list of two-letter ISO 3166-1 codes to limit the results to. For example: limitToCountries=US,CA. 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. lang: The language the server should use when returning the response, specified using a BCP 47 language code. For example, for English use lang=en-US. 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, searchLocation=37.78,-122.42. 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, searchRegion=38,-122.1,37.5,-122.5. userLocation: The location of the user, specified as a comma-separated string that contains the latitude and longitude. For example: userLocation=37.78,-122.42. Certain APIs, such as Searching, may opt to use the userLocation, if specified, as a fallback for the searchLocation.

## Response Codes

200 OK: An array of Place objects. 400 Bad Request: An ErrorResponse object that contains an error message and an array of strings that contains additional details. 401 Unauthorized: 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 : 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: An ErrorResponse object that contains a server error message and an array of strings that describe additional details about the error.

## Discussion

Discussion Example

## See Also

### Geocoding

- [Reverse geocode a location](applemapsserverapi/-v1-reversegeocode.md)
