v2_search
Creates, updates, deletes, gets or lists a v2_search resource.
Overview
| Name | v2_search |
| Type | Resource |
| Id | cloudflare.url_scanner.v2_search |
Fields
The following fields are returned by SELECT queries:
- list_by_account
Search results
| Name | Datatype | Description |
|---|---|---|
_id | string | |
page | object | |
result | string | |
stats | object | |
task | object | |
verdicts | object |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_by_account | select | account_id | size, q | Use a subset of ElasticSearch Query syntax to filter scans. Some example queries: - 'path:"/bundles/jquery.js"': Searches for scans who requested resources with the given path. - 'page.asn:AS24940 AND hash:xxx': Websites hosted in AS24940 where a resource with the given hash was downloaded. - 'page.domain:microsoft* AND verdicts.malicious:true AND NOT page.domain:microsoft.com': malicious scans whose hostname starts with "microsoft". - 'apikey:me AND date:[2025-01 TO 2025-02]': my scans from 2025 January to 2025 February. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
q | string | Filter scans |
size | integer | Limit the number of objects in the response. |
SELECT examples
- list_by_account
Use a subset of ElasticSearch Query syntax to filter scans. Some example queries:
- 'path:"/bundles/jquery.js"': Searches for scans who requested resources with the given path.
- 'page.asn:AS24940 AND hash:xxx': Websites hosted in AS24940 where a resource with the given hash was downloaded.
- 'page.domain:microsoft* AND verdicts.malicious:true AND NOT page.domain:microsoft.com': malicious scans whose hostname starts with "microsoft".
- 'apikey:me AND date:[2025-01 TO 2025-02]': my scans from 2025 January to 2025 February.
SELECT
_id,
page,
result,
stats,
task,
verdicts
FROM cloudflare.url_scanner.v2_search
WHERE account_id = '{{ account_id }}' -- required
AND size = '{{ size }}'
AND q = '{{ q }}'
;