Tu solicitud también debe pasar un cuerpo de solicitud JSON a la solicitud que define la dirección que se validará. El siguiente cuerpo de la solicitud contiene un campo y tres subcampos:
El cuerpo de la solicitud consta de un solo campo:
address: Es un campo de tipo PostalAddress que debe contener al menos una entrada en addressLines.
Cuando envíes el campo address a la API de Address Validation, solo debes proporcionar un campo: addressLines. Sin embargo, la solicitud de dirección más simple debe contener los siguientes subcampos:
regionCode: Es la opción recomendada. Este es un campo opcional, pero, si se omite, la API de Address Validation infiere la región a partir de la dirección. Sin embargo, para obtener mejores resultados, incluye el regionCode si lo conoces.
Para obtener la lista de regiones admitidas, consulta Regiones admitidas.
addressLines: Obligatorio. Es un array con direcciones que describen la estructura inferior de la dirección.
El United States Postal Service® (USPS®)1 mantiene el Coding Accuracy Support System (CASS™) para respaldar y certificar a los proveedores de validación de direcciones.
Solo para las regiones de EE.UU. y PR, puedes habilitar el procesamiento de CASS configurando enableUspsCass como true en el cuerpo de la solicitud. Para obtener los mejores resultados cuando uses CASS, proporciona una dirección que incluya la calle y el número de la calle, junto con la ciudad, el estado y el código postal:
El Explorador de APIs te permite realizar solicitudes de ejemplo para que te familiarices con la API y sus opciones.
Selecciona el ícono de la API api en el lado derecho de la página.
De manera opcional, edita los parámetros de la solicitud.
Selecciona el botón Ejecutar. En el diálogo, elige la cuenta que deseas usar para hacer la solicitud.
En el panel del Explorador de APIs, selecciona el ícono de pantalla completa fullscreen para expandir la ventana del Explorador de APIs.
Google Maps Platform es licenciatario no exclusivo del United States Postal Service®. Las siguientes marcas son propiedad del United States Postal Service® y se utilizan con el permiso correspondiente: United States Postal Service®, CASS™, CASS Certified™. ↩
[null,null,["Última actualización: 2025-08-31 (UTC)"],[[["\u003cp\u003eThe Address Validation API validates addresses using a POST request to a specified endpoint with a JSON request body containing the address details.\u003c/p\u003e\n"],["\u003cp\u003eThe request body minimally requires the \u003ccode\u003eaddressLines\u003c/code\u003e field, while \u003ccode\u003eregionCode\u003c/code\u003e is recommended for improved accuracy.\u003c/p\u003e\n"],["\u003cp\u003eFor US and PR addresses, enabling the \u003ccode\u003eenableUspsCass\u003c/code\u003e option leverages the CASS™ system for enhanced validation and standardization.\u003c/p\u003e\n"],["\u003cp\u003eUsers can experiment with the API using the API Explorer, which allows for composing requests, customizing parameters, and executing them.\u003c/p\u003e\n"]]],["To validate an address, send a POST request to the provided REST or gRPC endpoint, including a JSON request body that defines the address. The request body must contain the `address` field, a `PostalAddress` type with at least one entry in `addressLines`. Recommended subfields are `regionCode` and `addressLines`; the simplest request should have both. For US and PR regions, enabling `enableUspsCass` will use USPS CASS processing. Use the APIs Explorer to make sample requests.\n"],null,["**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nSend an address validation request by issuing a POST request to one of the\nfollowing endpoints:\n\n- [validateAddress](/maps/documentation/address-validation/reference/rest/v1/TopLevel/validateAddress) (REST)\n- [ValidateAddress](/maps/documentation/address-validation/reference/rpc/google.maps.addressvalidation.v1#google.maps.addressvalidation.v1.AddressValidation.ValidateAddress) (gRPC)\n\n| **Note:** This documentation uses REST for its examples, but the approach is similar with [gRPC](https://www.grpc.io/).\n\nYour request should also pass a [JSON request body](/maps/documentation/address-validation/reference/rest/v1/TopLevel/validateAddress#request-body) to the request that\ndefines the address to validate. The following request body contains one field\nand three subfields: \n\n```json\ncurl -X POST -d '{\n \"address\": {\n \"regionCode\": \"US\",\n \"locality\": \"Mountain View\",\n \"addressLines\": [\"1600 Amphitheatre Pkwy\"]\n }\n}' \\\n-H 'Content-Type: application/json' \\\n\"https://addressvalidation.googleapis.com/v1:validateAddress?key=\u003cvar translate=\"no\"\u003eAPI_KEY\u003c/var\u003e\"\n```\n\nYou can also omit `locality` and specify it as an element in\nthe `addressLines` array: \n\n {\n \"address\": {\n \"regionCode\": \"US\",\n \"addressLines\": [\"1600 Amphitheatre Pkwy\", \"Mountain View, CA, 94043\"]\n },\n }\n\nThe APIs Explorer lets you make live requests so that you can get familiar with\nthe API and the API options: \n[Try it!](#try_it)\n\nAddress request fields\n\nThe request body consists of a single field:\n\n- `address` --- a field of type [`PostalAddress`](/maps/documentation/address-validation/reference/rest/v1/TopLevel/validateAddress#postaladdress), which must contain at least one entry in `addressLines`.\n\nWhen sending the `address` field to the Address Validation API, you need only\nsupply one field: `addressLines`. However, the simplest address request\nshould contain the following subfields:\n\n- `regionCode` --- Recommended. This is an optional field, but if omitted, the Address Validation API infers the region from the address. However, for best results, include the `regionCode` if you know it. For the list of supported regions, see [supported regions](/maps/documentation/address-validation/coverage).\n- `addressLines` --- Required. An array with addresses describing the lower structure of the address.\n\n|----------------------------------------------------------------------------------------------------------------------------------------------|\n| See [PostalAddress](/maps/documentation/address-validation/reference/rest/v1/TopLevel/validateAddress#postaladdress) in the reference guide. |\n\nUSPS CASS™ option\n\nThe United States Postal Service® (USPS®)^[1](#fn1)^ maintains the\n[Coding Accuracy Support System (CASS™)](https://postalpro.usps.com/certifications/cass) to support and certify\naddress validation providers.\n| **Note:** The Address Validation API is confirmed as a CASS-Certified™ service. This means the service is confirmed for its ability to fill in missing address information, standardize it, and update it to the most current and accurate address.\n\nFor US and PR regions only, you can enable CASS processing by setting\n`enableUspsCass` to `true` in the request body. For best results when using\nCASS, provide an address that includes the street and street number along with\nthe city, state, and ZIP code: \n\n {\n \"address\": {\n \"regionCode\": \"US\",\n \"locality\": \"Mountain View\",\n \"administrativeArea\": \"CA\",\n \"postalCode\": \"94043\",\n \"addressLines\": [\"1600 Amphitheatre Pkwy\"]\n },\n \"enableUspsCass\": true\n }\n\n| **Note:** If you don't require CASS processing, or if you are validating addresses outside of the US and PR regions, Google does not recommend enabling this feature.\n\nTry it!\n\nThe APIs Explorer lets you make sample requests so\nthat you can get familiar with the API and the API options.\n\n1. Select the API icon api\n on the right side of the page.\n\n2. Optionally edit the request parameters.\n\n3. Select the **Execute** button. In the dialog, choose the account\n that you want to use to make the request.\n\n4. In the APIs Explorer panel, select the fullscreen icon\n fullscreen to expand the APIs Explorer window.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n1. Google Maps Platform is a non-exclusive Licensee of the United States\n Postal Service®. The following trademark(s) are owned by the United States\n Postal Service® and used with permission: United States Postal Service®,\n CASS™, CASS Certified™. [↩](#fnref1)"]]