Übersicht
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Was sind die Safe Browsing-APIs?
Die folgenden Safe Browsing APIs dürfen nur für nicht kommerzielle Zwecke verwendet werden. Wenn Sie APIs zum Erkennen schädlicher URLs für kommerzielle Zwecke verwenden möchten, d. h. „zum Verkauf oder zur Umsatzgenerierung“, lesen Sie bitte die Web Risk API.
Mit den Safe Browsing APIs (Version 4) können Ihre Clientanwendungen URLs anhand der von Google ständig aktualisierten Listen unsicherer Webressourcen prüfen. Beispiele für unsichere Webressourcen sind Social-Engineering-Websites (Phishing- und betrügerische Websites) sowie Websites, die Malware oder unerwünschte Software hosten.
Alle URLs auf einer Safe Browsing-Liste gelten als unsicher.
Um festzustellen, ob eine URL auf einer der Safe Browsing-Listen steht, können Clients entweder die Lookup API (v4) oder die Update API (v4) verwenden.
Lookup API (Version 4)
Mit der Lookup API können Ihre Clientanwendungen URLs an den Google Safe Browsing-Server senden, um ihren Status zu prüfen. Die API ist einfach und leicht zu verwenden, da sie die Komplexität der Update API umgeht.
Vorteile:
- Einfache URL-Prüfungen: Sie senden eine HTTP-
POST
-Anfrage mit den tatsächlichen URLs und der Server antwortet mit dem Status der URLs (sicher oder unsicher).
Nachteile:
- Datenschutz: URLs werden nicht gehasht, sodass der Server weiß, welche URLs Sie suchen.
- Antwortzeit: Jede Suchanfrage wird vom Server verarbeitet. Wir geben keine Garantien für die Antwortzeit der Suche.
Wenn Sie nicht allzu viele Bedenken hinsichtlich des Datenschutzes für die abgefragten URLs haben und Sie die Latenz einer Netzwerkanfrage akzeptieren können, sollten Sie die Lookup API nutzen, da sie relativ einfach zu verwenden ist.
Update API (Version 4)
Mit der Update API können Ihre Clientanwendungen verschlüsselte Versionen der Safe Browsing-Listen für lokale, clientseitige Prüfungen von URLs herunterladen. Die Update API ist für Clients konzipiert, die häufige Prüfungen mit geringer Latenz erfordern. Mehrere Webbrowser und Softwareplattformen verwenden diese API, um eine große Anzahl von Nutzern zu schützen.
Vorteile:
- Datenschutz: Sie tauschen Daten selten mit dem Server aus (nur nach einer Übereinstimmung mit einem lokalen Hash-Präfix) und verwenden Hash-URLs, sodass der Server die tatsächlich von den Clients abgefragten URLs nicht erfährt.
- Antwortzeit: Sie verwalten eine lokale Datenbank, die Kopien der Safe Browsing-Listen enthält. Sie müssen den Server nicht jedes Mal abfragen, wenn sie eine URL prüfen möchten.
Nachteile:
- Implementierung: Sie müssen eine lokale Datenbank einrichten und dann die lokalen Kopien der Safe Browsing-Listen (als SHA 256-Hashes mit variabler Länge gespeichert) herunterladen und regelmäßig aktualisieren.
- Komplexe URL-Prüfungen: Sie müssen wissen, wie man URLs kanonisiert, Suffix-/Präfixausdrücke erstellt und SHA 256-Hashes für den Vergleich mit den lokalen Kopien der Safe Browsing-Listen sowie den auf dem Server gespeicherten Safe Browsing-Listen berechnet.
Wenn Sie Bedenken hinsichtlich der Vertraulichkeit der abgefragten URLs oder hinsichtlich der Latenz haben, die durch eine Netzwerkanfrage verursacht wird, verwenden Sie die Update API.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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."]]