खास जानकारी
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Safe Browsing APIs क्या हैं?
सुरक्षित ब्राउज़िंग से जुड़े इन एपीआई का इस्तेमाल सिर्फ़ गैर-व्यावसायिक कामों के लिए किया जा सकता है. अगर आपको व्यावसायिक मकसद से, नुकसान पहुंचाने वाले यूआरएल का पता लगाने के लिए एपीआई का इस्तेमाल करना है, तो कृपया Web Risk API का इस्तेमाल करें. व्यावसायिक मकसद का मतलब है, “बिक्री या रेवेन्यू जनरेट करने के मकसद से”.
Safe Browsing API (v4) की मदद से, क्लाइंट ऐप्लिकेशन यह जांच कर पाते हैं कि यूआरएल, असुरक्षित वेब रिसॉर्स के बारे में लगातार अपडेट होने वाली Google सूचियों के मुताबिक ठीक हैं या नहीं. असुरक्षित वेब संसाधनों के उदाहरण हैं: सोशल इंजीनियरिंग साइटें (फ़िशिंग साइटें और गलत पहचान दिखाकर धोखा देने वाली साइटें), मैलवेयर या अनचाहे सॉफ़्टवेयर होस्ट करने वाली साइटें.
सुरक्षित ब्राउज़िंग की सूची में मौजूद किसी भी यूआरएल को असुरक्षित माना जाता है.
यह पता लगाने के लिए कि कोई यूआरएल, Safe Browsing की किसी सूची में शामिल है या नहीं, क्लाइंट इनमें से किसी एक का इस्तेमाल कर सकते हैं: Lookup API (v4) या Update API (v4).
Lookup API (v4)
Lookup API की मदद से, क्लाइंट ऐप्लिकेशन, Google Safe Browsing सर्वर को यूआरएल भेज सकते हैं. इससे उन्हें यूआरएल की स्थिति की जांच करने में मदद मिलती है. यह एपीआई इस्तेमाल करने में आसान है, क्योंकि इसमें Update API की जटिलताओं से बचा जाता है.
फ़ायदे:
- यूआरएल की सामान्य जांच: इसमें, असली यूआरएल के साथ एचटीटीपी
POST
अनुरोध भेजा जाता है. इसके बाद, सर्वर यूआरएल की स्थिति (सुरक्षित या असुरक्षित) के बारे में बताता है.
कमियां:
- निजता: यूआरएल को हैश नहीं किया जाता. इसलिए, सर्वर को पता होता है कि आपने किन यूआरएल को खोजा है.
- जवाब मिलने का समय: हर लुकअप अनुरोध को सर्वर प्रोसेस करता है. हम लुकअप के जवाब देने में लगने वाले समय की गारंटी नहीं देते.
अगर आपको क्वेरी किए गए यूआरएल की निजता की ज़्यादा चिंता नहीं है और नेटवर्क अनुरोध की वजह से होने वाली देरी से आपको कोई समस्या नहीं है, तो Lookup API का इस्तेमाल करें. इसका इस्तेमाल करना काफ़ी आसान है.
Update API (v4)
Update API की मदद से, क्लाइंट ऐप्लिकेशन, Safe Browsing की सूचियों के एन्क्रिप्ट (सुरक्षित) किए गए वर्शन डाउनलोड कर सकते हैं. इससे, यूआरएल की जांच स्थानीय तौर पर और क्लाइंट-साइड पर की जा सकती है. Update API को उन क्लाइंट के लिए डिज़ाइन किया गया है जिन्हें कम समय में बार-बार फ़ैसले की ज़रूरत होती है. कई वेब ब्राउज़र और सॉफ़्टवेयर प्लैटफ़ॉर्म, उपयोगकर्ताओं के बड़े ग्रुप को सुरक्षित रखने के लिए इस एपीआई का इस्तेमाल करते हैं.
फ़ायदे:
- निजता: सर्वर के साथ डेटा को कभी-कभी ही शेयर किया जाता है. ऐसा सिर्फ़ तब किया जाता है, जब लोकल हैश प्रीफ़िक्स मैच हो जाता है. साथ ही, हैश किए गए यूआरएल का इस्तेमाल किया जाता है. इसलिए, सर्वर को कभी भी क्लाइंट के क्वेरी किए गए असली यूआरएल के बारे में पता नहीं चलता.
- जवाब देने में लगने वाला समय: आपके पास एक लोकल डेटाबेस होता है, जिसमें सुरक्षित ब्राउज़िंग की सूचियों की कॉपी होती हैं. जब भी उन्हें किसी यूआरएल की जांच करनी होती है, तो उन्हें सर्वर से क्वेरी करने की ज़रूरत नहीं होती.
कमियां:
- लागू करने का तरीका: आपको एक लोकल डेटाबेस सेट अप करना होगा. इसके बाद, Safe Browsing की सूचियों की लोकल कॉपी डाउनलोड करनी होंगी. साथ ही, उन्हें समय-समय पर अपडेट करना होगा. ये सूचियां, अलग-अलग लंबाई वाले SHA256 हैश के तौर पर सेव की जाती हैं.
- जटिल यूआरएल की जांच: आपको यूआरएल को कैननिकल बनाने, सफ़िक्स/प्रीफ़िक्स एक्सप्रेशन बनाने, और SHA256 हैश का हिसाब लगाने का तरीका पता होना चाहिए. ऐसा, Safe Browsing सूचियों की स्थानीय कॉपी के साथ-साथ सर्वर पर सेव की गई Safe Browsing सूचियों से तुलना करने के लिए किया जाता है.
अगर आपको क्वेरी किए गए यूआरएल की निजता या नेटवर्क अनुरोध की वजह से होने वाली देरी के बारे में चिंता है, तो Update API का इस्तेमाल करें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe Safe Browsing APIs (v4) enable client applications to check URLs against Google's lists of unsafe web resources, including phishing sites and those hosting malware.\u003c/p\u003e\n"],["\u003cp\u003eTwo APIs are available: Lookup API (v4) for simple URL checks and Update API (v4) for local, privacy-focused checks.\u003c/p\u003e\n"],["\u003cp\u003eLookup API (v4) offers ease of use but has privacy and response time limitations.\u003c/p\u003e\n"],["\u003cp\u003eUpdate API (v4) prioritizes privacy and speed but requires more complex implementation and URL handling.\u003c/p\u003e\n"],["\u003cp\u003eThese APIs are for non-commercial use only; commercial users should refer to the Web Risk API.\u003c/p\u003e\n"]]],["Safe Browsing APIs allow client applications to check URLs against Google's unsafe web resource lists, distinguishing between non-commercial and commercial use (Web Risk API). The Lookup API checks URL status via server requests, offering simplicity but compromising privacy and response time. The Update API downloads encrypted lists for local checks, prioritizing privacy and speed but requiring complex implementation, database setup, and hash management. Users can choose between these based on privacy needs and latency tolerance.\n"],null,["# Overview\n\nWhat are the Safe Browsing APIs?\n--------------------------------\n\nThe following Safe Browsing APIs are for non-commercial use only. If you need to use APIs\nto detect malicious URLs for commercial purposes -- meaning \"for sale or revenue-generating\npurposes\" -- please refer to the [Web Risk API](https://cloud.google.com/web-risk).\n\nThe Safe Browsing APIs (v4) let your client applications check URLs against Google's\nconstantly updated lists of unsafe web resources. Examples of unsafe web resources are social\nengineering sites (phishing and deceptive sites) and sites that host malware or unwanted software.\nAny URL found on a Safe Browsing list is considered unsafe.\n\nTo determine if a URL is on any of the Safe Browsing lists, clients can use either\nthe [Lookup API (v4)](/safe-browsing/v4/lookup-api)\nor the [Update API (v4)](/safe-browsing/v4/update-api).\n\nLookup API (v4)\n---------------\n\nThe Lookup API lets your client applications send URLs to the Google Safe Browsing server to\ncheck their status. The API is simple and easy to use, as it avoids the complexities of the\nUpdate API.\n\nAdvantages:\n\n- Simple URL checks: You send an HTTP `POST` request with the actual URLs, and the server responds with the state of the URLs (safe or unsafe).\n\nDrawbacks:\n\n- Privacy: URLs are not hashed, so the server knows which URLs you look up.\n- Response time: Every lookup request is processed by the server. We don't provide guarantees on lookup response time.\n\nIf you are not too concerned about the privacy of the queried URLs, and you can tolerate the\nlatency induced by a network request, consider using the Lookup API since it's fairly easy to\nuse.\n\nUpdate API (v4)\n---------------\n\nThe Update API lets your client applications download encrypted versions of the Safe Browsing\nlists for local, client-side checks of URLs. The Update API is designed for clients that require\nhigh frequency, low-latency verdicts. Several web browsers and software platforms use this\nAPI to protect large sets of users.\n\nAdvantages:\n\n- Privacy: You exchange data with the server infrequently (only after a local hash prefix match) and using hashed URLs, so the server never knows the actual URLs queried by the clients.\n- Response time: You maintain a local database that contains copies of the Safe Browsing lists; they do not need to query the server every time they want to check a URL.\n\nDrawbacks:\n\n- Implementation: You need to set up a local database and then download, and periodically update, the local copies of the Safe Browsing lists (stored as variable-length SHA256 hashes).\n- Complex URL checks: You need to know how to canonicalize URLs, create suffix/prefix expressions, and compute SHA256 hashes (for comparison with the local copies of the Safe Browsing lists as well as the Safe Browsing lists stored on the server).\n\nIf you are concerned about the privacy of the queried URLs or the latency induced by a\nnetwork request, use the Update API."]]