---
title: Get URL scan's HAR
---

[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**

# Get URL scan's HAR

url\_scanner.scans.har(strscan\_id, ScanHARParams\*\*kwargs) -> [ScanHARResponse](<https://developers.cloudflare.com/api/python/resources/url_scanner#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/urlscanner/v2/har/{scan\_id}

Get a URL scan’s HAR file. See HAR spec at http://www.softwareishard.com/blog/har-12-spec/.

##### 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)%20har%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

scan\_id: str

Scan UUID.

formatuuid

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

##### ReturnsExpand Collapse

<details>

<summary>

class ScanHARResponse: …

</summary>

<details>

<summary>

log: Log

</summary>

<details>

<summary>

creator: LogCreator

</summary>

comment: str

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

name: str

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

version: str

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

</details>

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

<details>

<summary>

entries: List\[LogEntry]

</summary>

\_initial\_priority: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20_initialPriority">Link to this property</a>

\_initiator\_type: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20_initiator_type">Link to this property</a>

\_priority: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20_priority">Link to this property</a>

\_request\_id: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20_requestId">Link to this property</a>

\_request\_time: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20_requestTime">Link to this property</a>

\_resource\_type: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20_resourceType">Link to this property</a>

cache: object

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20cache">Link to this property</a>

connection: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20connection">Link to this property</a>

pageref: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20pageref">Link to this property</a>

<details>

<summary>

request: LogEntryRequest

</summary>

body\_size: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20request%20%3E%20(property)%20bodySize">Link to this property</a>

<details>

<summary>

headers: List\[LogEntryRequestHeader]

</summary>

name: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20request%20%3E%20(property)%20headers%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

value: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20request%20%3E%20(property)%20headers%20%3E%20(items)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20request%20%3E%20(property)%20headers">Link to this property</a>

headers\_size: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20request%20%3E%20(property)%20headersSize">Link to this property</a>

http\_version: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20request%20%3E%20(property)%20httpVersion">Link to this property</a>

method: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20request%20%3E%20(property)%20method">Link to this property</a>

url: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20request%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20request">Link to this property</a>

<details>

<summary>

response: LogEntryResponse

</summary>

\_transfer\_size: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20_transferSize">Link to this property</a>

body\_size: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20bodySize">Link to this property</a>

<details>

<summary>

content: LogEntryResponseContent

</summary>

mime\_type: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20content%20%3E%20(property)%20mimeType">Link to this property</a>

size: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20content%20%3E%20(property)%20size">Link to this property</a>

compression: Optional\[int]

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20content%20%3E%20(property)%20compression">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20content">Link to this property</a>

<details>

<summary>

headers: List\[LogEntryResponseHeader]

</summary>

name: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20headers%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

value: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20headers%20%3E%20(items)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20headers">Link to this property</a>

headers\_size: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20headersSize">Link to this property</a>

http\_version: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20httpVersion">Link to this property</a>

redirect\_url: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20redirectURL">Link to this property</a>

status: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20status">Link to this property</a>

status\_text: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response%20%3E%20(property)%20statusText">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20response">Link to this property</a>

server\_ip\_address: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20serverIPAddress">Link to this property</a>

started\_date\_time: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries%20%3E%20(items)%20%3E%20(property)%20startedDateTime">Link to this property</a>

time: float

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

</details>

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

<details>

<summary>

pages: List\[LogPage]

</summary>

id: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20pages%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

page\_timings: LogPagePageTimings

</summary>

on\_content\_load: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20pages%20%3E%20(items)%20%3E%20(property)%20pageTimings%20%3E%20(property)%20onContentLoad">Link to this property</a>

on\_load: float

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20pages%20%3E%20(items)%20%3E%20(property)%20pageTimings%20%3E%20(property)%20onLoad">Link to this property</a>

</details>

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20pages%20%3E%20(items)%20%3E%20(property)%20pageTimings">Link to this property</a>

started\_date\_time: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20pages%20%3E%20(items)%20%3E%20(property)%20startedDateTime">Link to this property</a>

title: str

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20scan_har_response%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20pages%20%3E%20(items)%20%3E%20(property)%20title">Link to this property</a>

</details>

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

version: str

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

</details>

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

</details>

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

### Get URL scan's HAR

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
)
response = client.url_scanner.scans.har(
    scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    account_id="account_id",
)
print(response.log)
```

200 example

```
{
  "log": {
    "creator": {
      "comment": "https://github.com/sitespeedio/chrome-har",
      "name": "chrome-har",
      "version": "0.13.1"
    },
    "entries": [
      {
        "_initialPriority": "VeryHigh",
        "_initiator_type": "other",
        "_priority": "VeryHigh",
        "_requestId": "DDC779F0CB3746BAF283EC1A51B0F2F8",
        "_requestTime": 114135.331081,
        "_resourceType": "document",
        "cache": {},
        "connection": "33",
        "pageref": "page_1",
        "request": {
          "bodySize": 0,
          "headers": [
            {
              "name": "Upgrade-Insecure-Requests",
              "value": "1"
            }
          ],
          "headersSize": 197,
          "httpVersion": "http/1.1",
          "method": "GET",
          "url": "http://example.com/"
        },
        "response": {
          "_transferSize": 1071,
          "bodySize": 648,
          "content": {
            "mimeType": "text/html",
            "size": 1256,
            "compression": 608
          },
          "headers": [
            {
              "name": "Content-Encoding",
              "value": "gzip"
            }
          ],
          "headersSize": 423,
          "httpVersion": "http/1.1",
          "redirectURL": "redirectURL",
          "status": 200,
          "statusText": "OK"
        },
        "serverIPAddress": "2606:2800:220:1:248:1893:25c8:1946",
        "startedDateTime": "2023-05-03T17:05:13.196Z",
        "time": 268.64
      }
    ],
    "pages": [
      {
        "id": "page_1",
        "pageTimings": {
          "onContentLoad": 305.408,
          "onLoad": 305.169
        },
        "startedDateTime": "2023-05-03T17:05:13.195Z",
        "title": "http://example.com/"
      }
    ],
    "version": "1.2"
  }
}
```

##### Returns Examples

200 example

```
{
  "log": {
    "creator": {
      "comment": "https://github.com/sitespeedio/chrome-har",
      "name": "chrome-har",
      "version": "0.13.1"
    },
    "entries": [
      {
        "_initialPriority": "VeryHigh",
        "_initiator_type": "other",
        "_priority": "VeryHigh",
        "_requestId": "DDC779F0CB3746BAF283EC1A51B0F2F8",
        "_requestTime": 114135.331081,
        "_resourceType": "document",
        "cache": {},
        "connection": "33",
        "pageref": "page_1",
        "request": {
          "bodySize": 0,
          "headers": [
            {
              "name": "Upgrade-Insecure-Requests",
              "value": "1"
            }
          ],
          "headersSize": 197,
          "httpVersion": "http/1.1",
          "method": "GET",
          "url": "http://example.com/"
        },
        "response": {
          "_transferSize": 1071,
          "bodySize": 648,
          "content": {
            "mimeType": "text/html",
            "size": 1256,
            "compression": 608
          },
          "headers": [
            {
              "name": "Content-Encoding",
              "value": "gzip"
            }
          ],
          "headersSize": 423,
          "httpVersion": "http/1.1",
          "redirectURL": "redirectURL",
          "status": 200,
          "statusText": "OK"
        },
        "serverIPAddress": "2606:2800:220:1:248:1893:25c8:1946",
        "startedDateTime": "2023-05-03T17:05:13.196Z",
        "time": 268.64
      }
    ],
    "pages": [
      {
        "id": "page_1",
        "pageTimings": {
          "onContentLoad": 305.408,
          "onLoad": 305.169
        },
        "startedDateTime": "2023-05-03T17:05:13.195Z",
        "title": "http://example.com/"
      }
    ],
    "version": "1.2"
  }
}
```