---
title: Search URL scans
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[URL Scanner](https://developers.cloudflare.com/api/python/resources/url_scanner)

[Scans](https://developers.cloudflare.com/api/python/resources/url_scanner/subresources/scans)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Search URL scans

url\_scanner.scans.list(ScanListParams\*\*kwargs) -> [ScanListResponse](<https://developers.cloudflare.com/api/python/resources/url_scanner#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/urlscanner/v2/search

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.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`URL Scanner Write``URL Scanner Read`

##### ParametersExpand Collapse

account\_id: str

Account ID.

[Link to this property](<#(resource)%20url_scanner.scans%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

q: Optional\[str]

Filter scans

[Link to this property](<#(resource)%20url_scanner.scans%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20q%20%3E%20(schema)>)

size: Optional\[int]

Limit the number of objects in the response.

[Link to this property](<#(resource)%20url_scanner.scans%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20size%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class ScanListResponse: …

</summary>

<details>

<summary>

results: List\[Result]

</summary>

\_id: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20_id">Link to this property</a>

<details>

<summary>

page: ResultPage

</summary>

asn: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20page%20%3E%20(property)%20asn">Link to this property</a>

country: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20page%20%3E%20(property)%20country">Link to this property</a>

ip: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20page%20%3E%20(property)%20ip">Link to this property</a>

url: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20page%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20page">Link to this property</a>

result: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20result">Link to this property</a>

<details>

<summary>

stats: ResultStats

</summary>

data\_length: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20stats%20%3E%20(property)%20dataLength">Link to this property</a>

requests: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20stats%20%3E%20(property)%20requests">Link to this property</a>

uniq\_countries: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20stats%20%3E%20(property)%20uniqCountries">Link to this property</a>

uniq\_ips: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20stats%20%3E%20(property)%20uniqIPs">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20stats">Link to this property</a>

<details>

<summary>

task: ResultTask

</summary>

time: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20task%20%3E%20(property)%20time">Link to this property</a>

url: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20task%20%3E%20(property)%20url">Link to this property</a>

uuid: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20task%20%3E%20(property)%20uuid">Link to this property</a>

visibility: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20task%20%3E%20(property)%20visibility">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20task">Link to this property</a>

<details>

<summary>

verdicts: ResultVerdicts

</summary>

malicious: bool

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20verdicts%20%3E%20(property)%20malicious">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results%20%3E%20(items)%20%3E%20(property)%20verdicts">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)%20%3E%20(property)%20results">Link to this property</a>

</details>

[Link to this property](<#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_list_response%20%3E%20(schema)>)

### Search URL scans

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
scans = client.url_scanner.scans.list(
    account_id="account_id",
)
print(scans.results)
```

200 example

```
{
  "results": [
    {
      "_id": "9626f773-9ffb-4cfb-89d3-30b120fc8011",
      "page": {
        "asn": "AS15133",
        "country": "US",
        "ip": "93.184.215.14",
        "url": "https://example.com"
      },
      "result": "https://radar.clouflare.com/scan/9626f773-9ffb-4cfb-89d3-30b120fc8011",
      "stats": {
        "dataLength": 2512,
        "requests": 2,
        "uniqCountries": 1,
        "uniqIPs": 1
      },
      "task": {
        "time": "2024-09-30T23:54:02.881Z",
        "url": "https://example.com",
        "uuid": "9626f773-9ffb-4cfb-89d3-30b120fc8011",
        "visibility": "public"
      },
      "verdicts": {
        "malicious": true
      }
    }
  ]
}
```

##### Returns Examples

200 example

```
{
  "results": [
    {
      "_id": "9626f773-9ffb-4cfb-89d3-30b120fc8011",
      "page": {
        "asn": "AS15133",
        "country": "US",
        "ip": "93.184.215.14",
        "url": "https://example.com"
      },
      "result": "https://radar.clouflare.com/scan/9626f773-9ffb-4cfb-89d3-30b120fc8011",
      "stats": {
        "dataLength": 2512,
        "requests": 2,
        "uniqCountries": 1,
        "uniqIPs": 1
      },
      "task": {
        "time": "2024-09-30T23:54:02.881Z",
        "url": "https://example.com",
        "uuid": "9626f773-9ffb-4cfb-89d3-30b120fc8011",
        "visibility": "public"
      },
      "verdicts": {
        "malicious": true
      }
    }
  ]
}
```