# Urlscan Io Search Scraper (`b2b_lead_generation/urlscan-io-search-scraper`) Actor

Search urlscan.io domain scans to extract IP addresses, server signals, page titles, and screenshot links. Enter your search query, set a row limit, and download your structured results directly in JSON, CSV, or Excel

- **URL**: https://apify.com/b2b_lead_generation/urlscan-io-search-scraper.md
- **Developed by:** [B2B Lead Generation](https://apify.com/b2b_lead_generation) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## urlscan.io Search Scraper

![urlscan.io Search Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/urlscan-io-search-scraper-cover.png)

Search publicly available urlscan records using a query. Retrieve structured scan metadata, including domain information, IP addresses, page details, scan statistics, labels, and screenshot references.

### What This Actor Does

This actor searches public urlscan records and returns structured results. Each record includes scan details, page information, statistics, and available references.

You can choose a search query and set `maxItems` to control how many successful records are collected. Results are saved in the dataset for export and further analysis.

### Key Features

- Search public scan records using urlscan query syntax
- Filter scans by domain and other supported search fields
- Collect structured scan and page metadata
- Retrieve IP and country statistics when available
- Include scan result and screenshot references
- Export collected records as JSON, CSV, or Excel

### Search Mode

**Search scans (`search`):** Searches publicly available scan records using the query provided in `q`.

### Input Example

```json
{
  "mode": "search",
  "q": "domain:google.com",
  "maxItems": 100,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | Search mode for public scan records. |
| `q` | string | `domain:google.com` | Search query used to find scan records. |
| `maxItems` | integer | `100` | Maximum number of successful records to collect. |
| `userAgent` | string | `B2b lead generation research UA` | User-Agent value used for requests. |
| `timeoutSecs` | integer | `300` | Overall run time budget in seconds. |
| `requestTimeoutSecs` | integer | `30` | Timeout for an individual request. |
| `proxyConfiguration` | object | `useApifyProxy: false` | Optional proxy configuration. |

### Output Example

```json
{
  "submitter": {},
  "canonical": {
    "task": {
      "url": "example-domain.tld/path"
    },
    "page": {
      "url": "example-domain.tld/path"
    }
  },
  "task": {
    "visibility": "public",
    "method": "api",
    "domain": "example-domain.tld",
    "apexDomain": "example-domain.tld",
    "uuid": "01a12e8d-0d41-7515-af9a-95deebee8640",
    "url": "https://example-domain.tld/path"
  },
  "stats": {
    "uniqIPs": 23,
    "uniqCountries": 4,
    "requests": 78
  },
  "page": {
    "server": "cloudflare",
    "ip": "104.26.3.122",
    "domain": "example-domain.tld",
    "title": "Sample page title"
  },
  "labels": [],
  "_id": "01a12e8d-0d41-7515-af9a-95deebee8640",
  "_score": null,
  "sort": [
    1791782365259,
    "01a12e8d-0d41-7515-af9a-95deebee8640"
  ],
  "screenshot": "https://urlscan.io/screenshots/01a12e8d-0d41-7515-af9a-95deebee8640.png",
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

### Output Fields

| Field | Description |
|---|---|
| `submitter` | Submitter information associated with the scan. |
| `canonical` | Canonical task and page information. |
| `task` | Scan details, including visibility, domain, UUID, and URL. |
| `stats` | Scan statistics, including unique IPs, unique countries, and request count. |
| `page` | Page information, such as server, IP address, domain, and title. |
| `labels` | Labels associated with the scan. |
| `_id` | Unique scan record identifier. |
| `_score` | Search relevance score when available. |
| `sort` | Sorting values associated with the result. |
| `screenshot` | Reference to the scan screenshot. |
| `scrapedAt` | Timestamp indicating when the record was collected. |

### Use Cases

- **Phishing research:** Find public scans associated with a domain and review available page and network details.
- **Threat intelligence:** Gather scan metadata related to domains and infrastructure.
- **Domain investigation:** Review IP addresses, server information, page titles, and scan statistics.
- **Security analysis:** Organize public scan records for further investigation.
- **Research exports:** Save structured results for reports, notebooks, and analysis workflows.

### Frequently Asked Questions

**What can I search for?**

You can use urlscan-compatible search queries, including domain-based and page-field searches.

**What query syntax does `q` support?**

The `q` parameter supports urlscan search syntax. Examples include `domain:google.com` and `page.domain:example.com`.

**What information does each result contain?**

Results can include scan details, domain and page information, statistics, labels, identifiers, and screenshot references. Available fields depend on the source record.

**Can I export the collected results?**

Yes. You can export the dataset in JSON, CSV, or Excel format for further analysis.

**What happens if a scan request fails?**

Failed requests are represented as error records when available, allowing the run to retain failure information.

### Trademark Notice

urlscan and its related names and trademarks belong to their respective owners. This actor is an independent tool and does not imply affiliation, sponsorship, or endorsement by urlscan.

### Is Web Scraping Legal?

This actor collects publicly accessible scan metadata without bypassing login screens, paywalls, or technical security measures. How collected information can be used depends on applicable laws and the source website's policies.

- **Personal Data:** Scan records may contain domains, IP addresses, submitter information, or other potentially identifiable data. Apply relevant privacy requirements, including GDPR and CCPA where applicable.
- **Copyright and Licensing:** Scan metadata, page titles, screenshots, and other content may be subject to copyright or licensing restrictions. Respect applicable licences and attribution requirements.
- **Platform Terms and Rate Limits:** Follow urlscan website terms, usage policies, and applicable request limits. Avoid excessive requests.
- **Disclaimer:** This information is general guidance, not legal advice. Consult a qualified legal professional about your specific use case.

For more information, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `mode` (type: `string`):

What to scrape

## `q` (type: `string`):

Elasticsearch-style query over public urlscan.io scans (e.g. domain:google.com).

## `maxItems` (type: `integer`):

Free cap; hard limit 1000

## `userAgent` (type: `string`):

Identify your scraper

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it. urlscan.io search usually works without a proxy.

## Actor input object example

```json
{
  "mode": "search",
  "q": "domain:google.com",
  "maxItems": 100,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "q": "domain:google.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_lead_generation/urlscan-io-search-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "q": "domain:google.com" }

# Run the Actor and wait for it to finish
run = client.actor("b2b_lead_generation/urlscan-io-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "q": "domain:google.com"
}' |
apify call b2b_lead_generation/urlscan-io-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_lead_generation/urlscan-io-search-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pJSoJ4rLtxELfVSJW/builds/LdnM6w4XH2VEnAi51/openapi.json
