{"id":21393,"library":"google-maps-addressvalidation","title":"Google Maps Address Validation API Client","description":"The Google Maps Address Validation API client library provides programmatic access to validate and geocode addresses. Version 0.6.0 requires Python 3.9+ and is part of the google-cloud-python monorepo. Release cadence is irregular, tied to API updates.","status":"active","version":"0.6.0","language":"python","source_language":"en","source_url":"https://github.com/googleapis/google-cloud-python/tree/main/packages/google-maps-addressvalidation","tags":["google-maps","address-validation","geocoding"],"install":[{"cmd":"pip install google-maps-addressvalidation","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core library for Google API client infrastructure.","package":"google-api-core","optional":false},{"reason":"Protobuf message handling.","package":"proto-plus","optional":false},{"reason":"Authentication via API key or service account.","package":"google-auth","optional":false}],"imports":[{"note":"The correct import includes the version subpackage (_v1). Without it, the import fails.","wrong":"from google.maps.addressvalidation import AddressValidationServiceClient","symbol":"AddressValidationServiceClient","correct":"from google.maps.addressvalidation_v1 import AddressValidationServiceClient"},{"note":"Users often try to import the request class from the top-level package, which doesn't exist.","wrong":"from google.maps import addressvalidation","symbol":"ValidateAddressRequest","correct":"from google.maps.addressvalidation_v1 import ValidateAddressRequest"}],"quickstart":{"code":"import os\nfrom google.maps.addressvalidation_v1 import AddressValidationServiceClient, ValidateAddressRequest\n\nclient = AddressValidationServiceClient()\nrequest = ValidateAddressRequest(\n    address={\n        'region_code': 'US',\n        'locality': 'Mountain View',\n        'address_lines': ['1600 Amphitheatre Pkwy']\n    },\n    previous_response_id='',\n    enable_usps_cass=True\n)\nresponse = client.validate_address(request=request)\nprint(response.result.verdict)","lang":"python","description":"Quickstart to validate an address using the API. Requires setting GOOGLE_API_KEY environment variable or having ADC configured."},"warnings":[{"fix":"Upgrade to latest version when available.","message":"The library uses the v1 API, but some fields may be deprecated in future versions. Keep the library updated.","severity":"deprecated","affected_versions":"0.6.0"},{"fix":"Set the GOOGLE_API_KEY environment variable or run gcloud auth application-default login.","message":"Authentication requires either an API key set in the GOOGLE_API_KEY environment variable or Application Default Credentials (ADC). Not setting one results in a permission denied error.","severity":"gotcha","affected_versions":"all"},{"fix":"Verify the address dictionary structure matches the PostalAddress protobuf (see documentation).","message":"The address field in ValidateAddressRequest expects a dictionary with specific keys (e.g., region_code, address_lines). Using wrong keys or nesting returns a validation error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use: from google.maps.addressvalidation_v1 import AddressValidationServiceClient","cause":"Missing correct import path. Users often try importing without the version subpackage.","error":"ModuleNotFoundError: No module named 'google.maps.addressvalidation_v1'"},{"fix":"Set GOOGLE_API_KEY environment variable or configure ADC via gcloud auth application-default login.","cause":"API key is missing or invalid, or ADC is not configured.","error":"google.api_core.exceptions.PermissionDenied: 403 Request had insufficient authentication scopes."},{"fix":"Use request=ValidateAddressRequest(address=...) or pass address via the address keyword argument: client.validate_address(address=...)","cause":"Passing address as a positional argument instead of using the request parameter.","error":"TypeError: validate_address() missing 1 required positional argument: 'address'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}