# Website Crawl Test — Block & Cost Risk (`bin_ai_tools/my-actor`) Actor

Test a website before crawling. Get HTTP status, block risk, recommended crawler mode, sitemap and robots findings, cost risk, and a safe page limit.

- **URL**: https://apify.com/bin\_ai\_tools/my-actor.md
- **Developed by:** [Bin Bin](https://apify.com/bin_ai_tools) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## Website Crawl Test — Block & Cost Risk

**Test a website before you spend time and compute on a full crawl.**

This Actor performs a lightweight preflight against a website homepage, `robots.txt` and a bounded number of sitemap files. It tells you whether raw HTTP looks safe, a browser/proxy is likely needed, how large the sitemap appears, and a conservative starting `maxPages` value.

### What it answers

- Is the homepage reachable from the crawler environment?
- Is there an obvious CAPTCHA, access-denied page or rate-limit block?
- Does the site look static enough for HTTP or likely need a browser?
- Does `robots.txt` advertise a sitemap?
- Roughly how many URLs are exposed by the sitemap sample?
- What is a safe first `maxPages` value?
- Is the crawl risk low, medium or high?

### Why this exists

Full website crawlers are already a heavily validated category on Apify. The official Website Content Crawler has about 11K monthly active users and public issues reporting slow runs, integrations timing out, crawls stuck for hours, and unexpectedly high compute consumption. A cheap preflight can catch obvious block/size/mode problems before a user launches a large crawl.

### Important: no fake cost precision

This Actor does **not** claim an exact dollar cost. Actual crawl cost depends on page behavior, rendering mode, proxy use, retries and downstream processing. The output is deliberately `low / medium / high` risk plus recommended starting settings.

### Output

- `blockRisk`: `low | medium | high`
- `crawlerMode`: `HTTP | Browser | Browser/Proxy likely required`
- `costRisk`: `low | medium | high`
- `recommendedMaxPages`
- homepage status and response time
- robots.txt status and sitemap directives
- bounded sitemap file count and URL count
- clear next action

### Validation

- Pure logic suite: 10 tests pass against the exact current implementation.
- A remote Runner queue issue prevented a clean final on-device Node test/smoke in the night session; the next Codex review must rerun `node --test` and `node scripts/smoke.js` before Store Preview.

### Suggested short description

`Check blocks, crawler mode and sitemap size before a full website crawl.`

### Suggested pricing experiment

PPE event `crawl-test`, initially around **$0.01 per website preflight**. Treat this as a pricing experiment, not a proven optimum.

# Actor input Schema

## `url` (type: `string`):

Homepage or domain to test before a full crawl.

## `maxChildSitemaps` (type: `integer`):

Limits sitemap-index inspection so the preflight itself stays cheap.

## Actor input object example

```json
{
  "maxChildSitemaps": 5
}
```

# Actor output Schema

## `result` (type: `string`):

The crawl-risk assessment, crawler mode, robots.txt and sitemap findings, recommended page limit, and next action.

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

One structured row containing the complete website preflight result.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("bin_ai_tools/my-actor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("bin_ai_tools/my-actor").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 '{}' |
apify call bin_ai_tools/my-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bin_ai_tools/my-actor"
        }
    }
}
```

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/dbUoMu5XVM9Ya6tcd/builds/n3WTI7AcktmujajFb/openapi.json
