Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Como usar a API Evaluate
Nesta página, explicamos como usar a API Evaluate para permitir que os aplicativos cliente avaliem a maliciosidade de um URL. Essa API retorna uma pontuação de confiança que indica a maliciosidade de um URL com base em listas de bloqueio, modelos de machine learning e regras heurísticas. Se você quiser um resultado binário em vez de uma pontuação de confiança, use a API Lookup.
Observação:todos os URLs enviados à API Evaluate podem passar por processamento adicional, incluindo rastreamentos.
Para avaliar um URL, envie uma solicitação HTTP POST para o método evaluateUri: Entenda as considerações a seguir ao avaliar URLs:
A API Evaluate é compatível com um URL por solicitação. Se quiser verificar vários URLs, envie uma solicitação separada para cada um.
O URL precisa ser válido e não precisa ser canonizado. Para saber, consulte a RFC 46485 (em inglês).
A API Evaluate é compatível com três threatTypes: SOCIAL_ENGINEERING, MALWARE e UNWANTED_SOFTWARE.
Obsoleto. O campo allow_scan foi usado para determinar se a Web Risk pode verificar o URL fornecido. Não é mais possível desativar essa funcionalidade na API Evaluate. Consulte as APIs Lookup e Update para opções sem rastreamento.
A resposta HTTP POST retorna uma pontuação de confiança para o
threatType especificado. A pontuação de confiança representa o nível de confiança que indica o risco ao URL especificado.
Solicitação da API
Antes de usar os dados da solicitação abaixo, faça as substituições a seguir:
URL: um URL que precisa ser avaliado.
Método HTTP e URL:
POST https://webrisk.googleapis.com/v1eap1:evaluateUri?key=API_KEY
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-03 UTC."],[],[],null,["# Using the Evaluate API\n======================\n\n|\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThe page explains how to use the Evaluate API to let your client applications\nevaluate the maliciousness of a URL. This API returns a confidence score that\nindicates the maliciousness of a URL based on blocklists, machine learning\nmodels and heuristic rules. If you want a binary result instead of a confidence\nscore, use the [Lookup API](/web-risk/docs/lookup-api).\n\n**Note:** Any URLs submitted to the Evaluate API may undergo additional processing, including crawls.\n\nBefore you begin\n----------------\n\n[Contact our sales team](https://go.chronicle.security/webriskapi) or your customer\nengineer to obtain access to this feature.\n\nEvaluating URLs\n---------------\n\nTo evaluate a URL, send an HTTP `POST` request to\nthe [`evaluateUri`](/web-risk/docs/reference/rest/v1eap1/TopLevel/evaluateUri)\nmethod. Understand the following considerations when evaluating URLs:\n\n- The Evaluate API supports one URL per request. If you want to check multiple URLs, send a separate request for each URL.\n- The URL must be valid and doesn't need to be canonicalized. For more information, see [RFC 2396](http://www.ietf.org/rfc/rfc2396.txt).\n- The Evaluate API supports three threatTypes: SOCIAL_ENGINEERING, MALWARE and UNWANTED_SOFTWARE.\n- Deprecated. The `allow_scan` field was used to determine whether Web Risk is allowed to scan the URL provided. This functionality can no longer be disabled in the Evaluate API. See the [Lookup](/web-risk/docs/lookup-api) and [Update](/web-risk/docs/update-api) APIs for crawl-free options.\n- The HTTP `POST` response returns a confidence score for the specified threatType. The confidence score represents the confidence level indicating how risky the specified URL is.\n\n### API request\n\n\nBefore using any of the request data,\nmake the following replacements:\n\u003cvar translate=\"no\"\u003eURL\u003c/var\u003e: a URL that needs to be evaluated.\n\n\nHTTP method and URL:\n\n```\nPOST https://webrisk.googleapis.com/v1eap1:evaluateUri?key=API_KEY\n```\n\n\nRequest JSON body:\n\n```\n{\n \"uri\": \"URL\",\n \"threatTypes\": [\"SOCIAL_ENGINEERING\", \"MALWARE\", \"UNWANTED_SOFTWARE\"]\n}\n```\n\nTo send your request, choose one of these options: \n\n#### curl\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X POST \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://webrisk.googleapis.com/v1eap1:evaluateUri?key=API_KEY\"\n```\n\n#### PowerShell\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$headers = @{ }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://webrisk.googleapis.com/v1eap1:evaluateUri?key=API_KEY\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"scores\": [\n {\n \"threatType\": \"MALWARE\",\n \"confidenceLevel\": \"EXTREMELY_HIGH\"\n },\n {\n \"threatType\": \"SOCIAL_ENGINEERING\",\n \"confidenceLevel\": \"SAFE\"\n },\n {\n \"threatType\": \"UNWANTED_SOFTWARE\",\n \"confidenceLevel\": \"SAFE\"\n }\n ]\n}\n```"]]