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

[Skip to content](#_top)

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

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

[Scans](https://developers.cloudflare.com/api/go/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

client.URLScanner.Scans.HAR(ctx, scanID, query) (\*[ScanHARResponse](<https://developers.cloudflare.com/api/go/resources/url_scanner#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%20%3E%20(schema)>), error)

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

scanID string

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)>)

<details>

<summary>

query ScanHARParams

</summary>

AccountID param.Field\[string]

Account ID.

<a href="#(resource)%20url_scanner.scans%20%3E%20(method)%20har%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

</details>

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

##### ReturnsExpand Collapse

<details>

<summary>

type ScanHARResponse struct{…}

</summary>

<details>

<summary>

Log ScanHARResponseLog

</summary>

<details>

<summary>

Creator ScanHARResponseLogCreator

</summary>

Comment string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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)%20ScanHARResponse%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20creator">Link to this property</a>

<details>

<summary>

Entries \[]ScanHARResponseLogEntry

</summary>

InitialPriority string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

InitiatorType string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

RequestID string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

RequestTime float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

ResourceType string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 unknown

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 ScanHARResponseLogEntriesRequest

</summary>

BodySize float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 \[]ScanHARResponseLogEntriesRequestHeader

</summary>

Name string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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)%20ScanHARResponse%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>

HeadersSize float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

HTTPVersion string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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)%20ScanHARResponse%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 ScanHARResponseLogEntriesResponse

</summary>

TransferSize float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

BodySize float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 ScanHARResponseLogEntriesResponseContent

</summary>

MimeType string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 int64Optional

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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)%20ScanHARResponse%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 \[]ScanHARResponseLogEntriesResponseHeader

</summary>

Name string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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)%20ScanHARResponse%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>

HeadersSize float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

HTTPVersion string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

RedirectURL string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

StatusText string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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)%20ScanHARResponse%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>

ServerIPAddress string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

StartedDateTime string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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)%20ScanHARResponse%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20entries">Link to this property</a>

<details>

<summary>

Pages \[]ScanHARResponseLogPage

</summary>

ID string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

PageTimings ScanHARResponseLogPagesPageTimings

</summary>

OnContentLoad float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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>

OnLoad float64

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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)%20ScanHARResponse%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>

StartedDateTime string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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 string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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)%20ScanHARResponse%20%3E%20(schema)%20%3E%20(property)%20log%20%3E%20(property)%20pages">Link to this property</a>

Version string

<a href="#(resource)%20url_scanner.scans%20%3E%20(model)%20ScanHARResponse%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)%20ScanHARResponse%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)%20ScanHARResponse%20%3E%20(schema)>)

### Get URL scan's HAR

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/url_scanner"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.URLScanner.Scans.HAR(
    context.TODO(),
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    url_scanner.ScanHARParams{
      AccountID: cloudflare.F("account_id"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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"
  }
}
```