> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# urlscan.io

> Search and read existing urlscan.io website scans (requests, IPs, domains, certificates, verdicts), hostname history, and on Pro, malicious-observable lookups and similar pages.

![](https://mintcdn.com/webrouter/8QP9EZc8V07Kl-0I/logo/data-apis/urlscan.webp?fit=max\&auto=format\&n=8QP9EZc8V07Kl-0I\&q=85\&s=4f08819b0e15f83e5ca0070d570fa3a5)

[Web Catalog · Security](https://docs.webrouter.net/data-apis.md?category=security)

Key optional

Endpoints

6

Auth

Key in header

[Vendor docs](https://docs.urlscan.io/pages/api-intro)

&#x20;·&#x20;

[Pricing](https://urlscan.io/pricing/)

## Setup

| Variable | | What it is |
| - | - | - |
| `URLSCAN_API_KEY` | some calls | A urlscan.io API key (created in your urlscan.io user account), sent in the api-key header. Without one, quotas are minimal. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Quotas are per action (search, result...) and per minute, hour and day, with fixed windows resetting on the minute, hour and midnight UTC; only HTTP 200s count. X-Rate-Limit-\* headers report the window closest to running out; over it is a 429.
* Submitting a scan is left out on purpose: a scan publishes the URL's page to urlscan.io (public by default). So are visibility changes, saved searches, subscriptions, incidents and live scans.
* Queries use Elasticsearch query-string syntax with case-sensitive field names (page.domain:example.com); escape reserved characters and narrow with a date filter such as date:>now-7d.

## Endpoints

GET

Search existing scans

Historical scans (and, on Pro, hostnames, certificates, incidents and notifications) matching an Elasticsearch query-string query.

[Open](#urlscan-search)

GET

Get a scan result

The full stored result of an existing scan: the page, its requests, contacted IPs and domains, and verdicts.

[Open](#urlscan-result-get)

GET

Get a hostname's history

Historical observations for a hostname from the Hostnames data source.

[Open](#urlscan-hostname-history)

GET

Look up an observable in malicious scans

How often an IP, hostname, domain or URL appeared in malicious scan results, with first and last seen times (urlscan Pro).

[Open](#urlscan-malicious-lookup)

GET

Find structurally similar scans

Scans whose page structure resembles a given scan's (urlscan Pro).

[Open](#urlscan-result-similar)

GET

Get API quotas

Available and used quotas per action and window.

[Open](#urlscan-quotas-get)

### Search existing scans

GET

`/api/v1/search`

`urlscan.search`

Historical scans (and, on Pro, hostnames, certificates, incidents and notifications) matching an Elasticsearch query-string query.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`q`</td><td>string</td><td>query</td><td>Elasticsearch query string over scan fields. Example `page.domain:example.com AND date:>now-7d`</td></tr>

    <tr>
      <td>
        `size`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Results to return, up to 10,000 (plan limits apply).
      </td>
    </tr>

    <tr>
      <td>
        `search_after`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        The sort value of the last (oldest) result from the previous call, comma-separated, to get the next page.
      </td>
    </tr>

    <tr><td>`datasource`</td><td>string</td><td>query</td><td>Data source: scans (default) or, on urlscan Pro, hostnames, incidents, notifications, certificates. One of `scans`, `hostnames`, `incidents`, `notifications`, `certificates`</td></tr>

    <tr>
      <td>
        `collapse`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Field to collapse results on, within the current page only.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.urlscan.io/apis/urlscan-openapi)

```python Python theme={null}
router.call_data_api("urlscan.search", {'q': 'page.domain:example.com AND date:>now-7d'})
```

```text MCP theme={null}
call_data_api(endpoint="urlscan.search", params={"q": "page.domain:example.com AND date:>now-7d"})
```

> [!NOTE]
>
> * Paging: pass the last result's sort as search\_after and stop when fewer than size results come back; has\_more is only meaningful past 10,000 and total is capped at 10,000.
> * Finds public scans by anyone plus your own unlisted and private ones. Free and unauthenticated searches may be limited to recent history (search\_date\_limit\_days in the answer).

### Get a scan result

GET

`/api/v1/result/{scanId}/`

`urlscan.result.get`

The full stored result of an existing scan: the page, its requests, contacted IPs and domains, and verdicts.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `scanId`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        Scan UUID, as found in search results.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.urlscan.io/apis/urlscan-openapi) · Same job: [VirusTotal](https://docs.webrouter.net/data-apis/virustotal.md#virustotal-urls-get)

### Get a hostname's history

GET

`/api/v1/hostname/{hostname}`

`urlscan.hostname.history`

Historical observations for a hostname from the Hostnames data source.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`hostname` required</td><td>string</td><td>path</td><td>Hostname. Example `example.com`</td></tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Results to return, 10 to 10,000, default 1,000.
      </td>
    </tr>

    <tr>
      <td>
        `pageState`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        pageState from the previous answer, for more results.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.urlscan.io/pages/hostname-history) · Same job: [SecurityTrails](https://docs.webrouter.net/data-apis/securitytrails.md#securitytrails-history-dns)

```python Python theme={null}
router.call_data_api("urlscan.hostname.history", {'hostname': 'example.com'})
```

```text MCP theme={null}
call_data_api(endpoint="urlscan.hostname.history", params={"hostname": "example.com"})
```

### Look up an observable in malicious scans

GET

`/api/v1/malicious/{type}/{value}`

`urlscan.malicious.lookup`

How often an IP, hostname, domain or URL appeared in malicious scan results, with first and last seen times (urlscan Pro).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`type` required</td><td>string</td><td>path</td><td>ip, hostname (exact host), domain (apex, covers subdomains) or url. One of `ip`, `hostname`, `domain`, `url`</td></tr>
    <tr><td>`value` required</td><td>string</td><td>path</td><td>The observable; a url must be URL-encoded. Example `example.com`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.urlscan.io/apis/urlscan-openapi) · Same job: [VirusTotal](https://docs.webrouter.net/data-apis/virustotal.md#virustotal-urls-get)

> [!NOTE]
>
> * urlscan Pro only.

### Find structurally similar scans

GET

`/api/v1/pro/result/{scanId}/similar/`

`urlscan.result.similar`

Scans whose page structure resembles a given scan's (urlscan Pro).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `scanId`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        The scan to compare to.
      </td>
    </tr>

    <tr>
      <td>
        `q`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Extra query filter.
      </td>
    </tr>

    <tr>
      <td>
        `size`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Results per call.
      </td>
    </tr>

    <tr>
      <td>
        `search_after`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        For older results, as in search.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.urlscan.io/apis/urlscan-openapi)

> [!NOTE]
>
> * urlscan Pro only.

### Get API quotas

GET

`/api/v1/quotas`

`urlscan.quotas.get`

Available and used quotas per action and window.

Input

No inputs.

[Vendor docs](https://docs.urlscan.io/apis/urlscan-openapi)

```python Python theme={null}
router.call_data_api("urlscan.quotas.get")
```

```text MCP theme={null}
call_data_api(endpoint="urlscan.quotas.get")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.