סקירה כללית על כתובת Validation API
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מפתחים באזור הכלכלי האירופי (EEA)
מבוא
Address Validation API הוא שירות שמקבל כתובת.
הוא מזהה רכיבי כתובת ומאמת אותם. הוא גם מבצע סטנדרטיזציה של הכתובת למשלוח דואר ומוצא את הקואורדינטות הכי מדויקות של קו הרוחב וקו האורך שלה.
לחלופין, לכתובות בארצות הברית ובפוארטו ריקו, אפשר להפעיל את
מערכת התמיכה בדיוק הקידוד (CASS™).
למה כדאי להשתמש ב-Address Validation API
בעזרת Address Validation API (ממשק API לאימות כתובות), אתם יכולים לשפר את יכולת החיזוי של המשלוחים ולהפחית את מספר המשלוחים שלא מגיעים ליעד, וכך לשפר את חוויית הלקוח. כדי לעשות את זה, צריך לזהות כתובות לא תקינות ולקבל מידע טוב יותר על מאפייני הכתובות.
יכול להיות ש-Geocoding API יתאים יותר לצרכים שלכם אם אתם לא צריכים לאמת את רכיבי הכתובת הספציפיים. Geocoding API ממיר כתובות לקואורדינטות של קווי רוחב ואורך. Address Validation API מאמת כתובות כדי לוודא שהן נכונות. השוואה מפורטת זמינה במאמר יצירת יכולת אימות מיקום בניין באמצעות הפלטפורמה של מפות Google במרכז הארכיטקטורה.
מה אפשר לעשות באמצעות Address Validation API
inputלצפייה בהדגמה
באמצעות Address Validation API (ה-API לאימות כתובות), אפשר לקבוע אם כתובת מסוימת מתייחסת למקום אמיתי. אם הכתובת לא מתייחסת למקום אמיתי, ה-API יכול לזהות רכיבים שייתכן שהם שגויים, ואפשר להציג אותם ללקוחות כדי לתקן אותם. הנה דוגמה לתהליך עבודה באמצעות ה-API:
הלקוח מזין כתובת – בתמונה הבאה מוצג טופס בסיסי שמאפשר ללקוח להזין כתובת, אולי כחלק מתהליך התשלום.
האפליקציה שולחת את הכתובת אל ה-API – האפליקציה מעבירה את הכתובת הזו כקלט אל Address Validation API.

ה-API מאמת את הכתובת ומציג אותה בפורמט סטנדרטי – בתגובה שלו, Address Validation API מחזיר את הכתובת המלאה כפי שנקבעה על ידי ה-API, או מציין איפה חסר מידע.
הלקוח מאשר או מתקן את הכתובת – בהתאם למה שמוחזר מה-API, אפשר להציג ללקוח את ההנחיות הבאות:
א. מאשרים את הכתובת המומלצת. ב. מספקים את המידע החסר.
ג. מתקנים את הכתובת.


איך פועל Address Validation API
אימות הכתובת מקבל בקשת POST עם הכתובת בפורמט של גוף JSON. היא מפרידה את הכתובת לרכיבים נפרדים, ואז מנסה את הפעולות הבאות:
- תיקונים – מספק בדיקות אימות ברמת הרכיב, כולל מיקומי משנה אם הם זמינים.
- השלמה – ניסיון להסיק רכיבי כתובת חסרים או שגויים.
- פורמטים – מנקה ומבצע סטנדרטיזציה של הפורמט של רכיבי כתובת.
משאבים
בטבלה הבאה מופיע סיכום של המשאבים שזמינים דרך Address Validation API, לצד הנתונים שמוחזרים. פרטים ספציפיים מופיעים במאמר הפניית API לאימות כתובות.
מקורות נתונים |
נתונים שהוחזרו |
רכיבי כתובת בפורמט JSON.
איך מאמתים כתובת
|
כתובת מלאה ומאומתת (אם אפשר).
סטטוס האימות של כל רכיב בכתובת.
המקומות שבהם אפשר להשתמש בכתובת:
- גיאוקוד
- רמת הדיוק של הכתובת
- נתונים משירותי דואר, במקרים שבהם הם זמינים.
מומלץ לעיין בקטע הסבר על תגובת האימות.
|
איך משתמשים ב-Address Validation API
1 |
לניסיון ההדגמה |
כאן אפשר לנסות את ההדגמה עם מגוון טפסים של כתובות, גם תקינים וגם לא תקינים.
ההדגמה מאפשרת לבדוק את הערכים שמוחזרים מהשירות ואת תגובת ה-API בפורמט JSON. |
2 |
בדיקת הכיסוי |
כדי לראות באילו מדינות ואזורים יש תמיכה ב-Address Validation API, אפשר לעיין בפרטי הכיסוי. |
3 |
הגדרה |
מתחילים עם הגדרת פרויקט ב-Google Cloud ופועלים לפי ההוראות שבהמשך. |
4 |
בקשה לאימות כתובת |
מתחילים עם כתובת בסיסית, ואז, כדי להגביר את הדיוק, אפשר להפעיל CASS (רק לכתובות בארה"ב ובפורטו ריקו). איך מבקשים אימות כתובת |
5 |
עיבוד תגובה |
תגובת Address Validation API מספקת שני מאפיינים, שכל אחד מהם משמש למטרה אחרת.
הסבר על תגובה בסיסית |
6 |
שיפור הדיוק של האימות |
כדי לעזור לנו לשפר את הדיוק של הכתובות, אתם יכולים לשלוח משוב על התשובות של Address Validation API. איך מעדכנים כתובות |
ספריות לקוח זמינות
רשימה של ספריות הלקוח שזמינות ל-Address Validation API מופיעה במאמר ספריות לקוח.
מידע על CASS™
שירות הדואר של ארצות הברית (USPS®)1 מפעיל את מערכת התמיכה בדיוק הקידוד (CASS™) כדי לתמוך בספקי אימות כתובות ולאשר אותם. שירות עם אישור CASS Certified™, כמו Address Validation API, אושר כי הוא מסוגל להשלים מידע שחסר בכתובת, לתקנן אותה ולעדכן אותה כדי לספק לכם את הכתובת העדכנית והמדויקת ביותר.
האימות CASS לא מופעל כברירת מחדל והוא נתמך רק באזורים 'US' ו-'PR'. כדי להפעיל CASS, צריך להגדיר את enableUspsCass
לערך true
כחלק מבקשת אימות. מידע נוסף זמין במאמר אימות כתובת.
במסגרת השימוש שלנו בשירותי USPS, USPS בודקת בקשות לכתובות שנוצרו באופן מלאכותי. אם USPS מזהה כתובת קלט שנוצרה באופן מלאכותי, Google נדרשת להפסיק לאמת כתובות עבור הלקוח ולדווח ל-USPS על פרטי הקשר של הלקוח (שם וכתובת), על כתובת הקלט הרלוונטית ועל נתוני שימוש מצטברים. השימוש ב-API מהווה את הסכמתכם לתנאים הספציפיים לשירות.
המאמרים הבאים
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-31 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-31 (שעון UTC)."],[[["\u003cp\u003eThe Address Validation API validates, standardizes, and geocodes addresses, improving delivery predictability and customer experience.\u003c/p\u003e\n"],["\u003cp\u003eIt identifies address components, validates them for correctness, and provides suggestions for corrections, unlike the Geocoding API, which only converts addresses to coordinates.\u003c/p\u003e\n"],["\u003cp\u003eAddresses are processed by correcting, completing, and formatting components, with CASS™ support for US and Puerto Rico addresses for enhanced accuracy (requires enabling).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access resources like a demo, coverage details, setup instructions, validation requests, response understanding, and client libraries to utilize the API effectively.\u003c/p\u003e\n"],["\u003cp\u003eUSPS evaluates requests for artificially created addresses, and Google is obligated to stop validation and report relevant information to USPS in such cases.\u003c/p\u003e\n"]]],["The Address Validation API validates and standardizes addresses, identifying components and correcting errors. It can infer missing information, and determine if an address is a real place. The API accepts an address, validates it, and returns a complete address or flags missing information. Users can confirm, correct, or provide missing details. For US and Puerto Rico addresses, CASS can be enabled for enhanced accuracy. The Geocoding API may be preferred if address component validation is not needed.\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\nIntroduction The Address Validation API is a service that accepts an address. It identifies address components and validates them. It also standardizes the address for mailing and finds the best known latitude/longitude coordinates for it. Optionally, for addresses in the United States and Puerto Rico, you can enable the [Coding Accuracy Support System (CASS™)](https://developers.google.com/maps/documentation/address-validation/overview#about-cass).\n\nWhy use the Address Validation API\n\nWith the Address Validation API, you can improve delivery predictability and reduce\ndelivery failures, thereby providing improved customer experience. You do this\nby catching bad addresses and obtaining better awareness of address\ncharacteristics.\n\nThe Geocoding API might be a better match for your needs if you\ndon't need to validate the individual address components. The Geocoding API\n**converts** addresses into latitude and longitude coordinates. The\nAddress Validation API validates addresses for **correctness** . See\n[Building location validation capability using Google Maps Platform](https://developers.google.com/maps/architecture/geocoding-address-validation)\nin the Architecture Center for a detailed comparison.\n\nWhat you can do with the Address Validation API\n\n[inputTry the demo](/maps/documentation/address-validation/demo) [](/maps/documentation/address-validation/demo)\n\nWith the Address Validation API, you can determine if an address\nrefers to a real place. If the address does not refer to a real\nplace, the API can identify possibly wrong components that you can present to\nyour customers to correct. Here is a sample workflow using the API:\n\n1. **Customer enters an address** -- The following image shows a basic form\n that allows a customer to enter an address, possibly as part of a checkout\n flow.\n\n2. **App sends the address to the API** -- The application passes this address\n as the input to the Address Validation API.\n\n3. **API validates and standardizes the address** -- In its response, the\n Address Validation API returns the complete address as determined by the API, or\n indicates where information is missing.\n\n4. **Customer confirms or corrects the address** -- Depending on\n what the API returns, you can provide the following prompts to the customer:\n **A.** Confirm the recommended address. **B.** Provide missing information.\n **C.** Fix the address.\n\nHow the Address Validation API works\n\nThe address validation accepts a POST request with the address in the form\nof a JSON body. It separates the address into its individual components, and\nthen attempts the following:\n\n- **Corrects**---Provides component-level validation checks, including sub-premises where available.\n- **Completes**---Attempts to infer missing or incorrect address components.\n- **Formats**---Cleans up and standardizes the format for address components.\n\nResources\n\nThe following table summarizes the resources available through the\nAddress Validation API along with the data it returns. For specific details, see the\n[Address Validation API reference](./reference/rest).\n\n\u003cbr /\u003e\n\n| Data resources | Data returned |\n|-------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Address components in JSON format.** See [Validate an address](/maps/documentation/address-validation/requests-validate-address). | Complete, validated address (if possible). Validation status of each address component. Where available for an address: - Geocode - Address precision - Postal services data, where available. See [Understand the validation response](/maps/documentation/address-validation/understand-response). |\n\n\u003cbr /\u003e\n\nHow to use the Address Validation API\n\n|---|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Try the demo** | [Explore the demo](/maps/documentation/address-validation/demo) with a variety of address forms, both correct and incorrect. The demo provides a useful way to explore both the return values from the service, as well as the JSON formatted API response. |\n| 2 | **Check coverage** | Review [coverage details](/maps/documentation/address-validation/coverage) to see which countries and regions the Address Validation API supports. |\n| 3 | **Get set up** | Start with [Set up your Google Cloud project](/maps/documentation/address-validation/cloud-setup) and complete the instructions that follow. |\n| 4 | **Request an address validation** | Start with a basic address and then, for additional accuracy, you can enable CASS (for US and PR addresses only). See [Request an address validation.](/maps/documentation/address-validation/requests-validate-address) |\n| 5 | **Process a response** | The Address Validation API response provides two properties, each of which you use in different ways. See [Understand a basic response.](/maps/documentation/address-validation/understand-response) |\n| 6 | **Improve validation accuracy** | You can help improve address accuracy by providing feedback on Address Validation API responses. See [Handle updated addresses](/maps/documentation/address-validation/handle-updated-address). |\n\nAvailable client libraries\n\nFor a list of the available client libraries for Address Validation API,\nsee\n[Client libraries](/maps/documentation/address-validation/client_libraries).\n\nAbout CASS™\n\nThe United States Postal Service® (USPS®)^[1](#fn1)^ maintains the\n[Coding Accuracy Support System (CASS™)](https://postalpro.usps.com/certifications/cass)\nto support and certify address validation providers. A CASS Certified™ service,\nsuch as the Address Validation API, has been confirmed for its\nability to fill in information missing from an address, standardize it, and\nupdate it to give you the most current and most accurate address.\n\nCASS is not enabled by default and is only supported for the \"US\" and \"PR\"\nregions. To enable CASS, set `enableUspsCass` to `true` as part of a validation\nrequest. For more information, see\n[Validate an address](/maps/documentation/address-validation/requests-validate-address#enable-cass).\n\nAs part of our use of USPS services, USPS evaluates requests for artificially\ncreated addresses. If USPS identifies an input address as being artificially\ncreated, Google is required to stop validating addresses for the customer and\nmust report the customer's contact information (name and address), the relevant\ninput address, and aggregated usage data to USPS. By using the API you consent\nto these\n[Service Specific Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).\n\nWhat's next\n\n- **Try the demo** : Go to [Demo](/maps/documentation/address-validation/demo)\n- **Review coverage areas** : Go to [Country and region coverage details](/maps/documentation/address-validation/coverage)\n- **Try your first validation request** : Go to [Send an address validation request](/maps/documentation/address-validation/requests-validate-address)\n- **Process addresses at high volume** : Go to [Use Address Validation API to process addresses at high volume](/maps/architecture/high-volume-address-validation)\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)"]]