Skip to main content

v2_search

Creates, updates, deletes, gets or lists a v2_search resource.

Overview

Namev2_search
TypeResource
Idcloudflare.url_scanner.v2_search

Fields

The following fields are returned by SELECT queries:

Search results

NameDatatypeDescription
_idstring
pageobject
resultstring
statsobject
taskobject
verdictsobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_accountselectaccount_idsize, qUse 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
qstringFilter scans
sizeintegerLimit the number of objects in the response.

SELECT examples

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 }}'
;