# Website Url Scraper (`lccscsio/website-url-scraper`) Actor

Smart Contractor Crawler extracts emails, phones, and text from contractor websites. Ideal for automating outreach, AI training, or business lead enrichment.

- **URL**: https://apify.com/lccscsio/website-url-scraper.md
- **Developed by:** [Louis-Charles Carrier](https://apify.com/lccscsio) (community)
- **Categories:** Lead generation, Automation, Agents
- **Security:** Full permissions
- **Stats:** 116 total users, 0 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.74 / 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.

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

## 🕸️ Smart Contractor Crawler

The **Smart Contractor Crawler** is a fast, concurrent website scraper that extracts **emails, phone numbers, text content, and metadata** from contractor or service business websites.\
It’s designed for **lead generation, business enrichment, and AI training datasets**.

***

### 🚀 What It Does

- Crawls multiple websites simultaneously
- Collects **homepage + relevant pages** (like “About”, “Contact”, “Services”)
- Extracts:
  - Company name & title
  - Website URL
  - Emails & phone numbers
  - Visible text and HTML structure
- Outputs clean JSON and CSV-ready datasets

***

### 🧰 Input

Provide one or multiple URLs in the **Start URLs** field.

````json
{
  "startUrls": [
    "https://www.abgbuilds.com",
    "https://www.aboltinc.com",
    "https://www.baystateplumbing.com"
  ]
}
You can add up to 10,000 URLs per run (depending on your Apify plan).

📦 Output
Each dataset item includes:

Field	Description
url	Website URL crawled
title	Page title or company name
emails	Extracted emails
phones	Extracted phone numbers
html	Full HTML of homepage and key pages
text	Combined readable text from the most relevant pages

⚙️ How It Works
Loads the homepage and identifies internal links (About, Services, Contact, etc.)

Extracts visible text, emails, and phones from each relevant page

Cleans, deduplicates, and saves results to the dataset

Exports automatically in JSON, CSV, or Excel format

💡 Use Cases
🧾 Building B2B contractor lead lists

🧠 Collecting industry-specific content for AI training

📈 Enriching CRM or cold outreach systems (HubSpot, GoHighLevel, etc.)

🔍 Automating research for local service providers

💵 Pricing
Simple pay-per-event model:

$0.01 minimum per run

Approx. $0.012 per 10 websites

Double-checked data with ~50% profit margin built in

🧪 Example Output
json
Copy code
{
  "url": "https://www.abgbuilds.com",
  "title": "ABG Builds | General Contracting",
  "emails": ["info@abgbuilds.com"],
  "phones": ["(416) 555-1234"],
  "html": "<html>...</html>",
  "text": "ABG Builds offers general contracting and renovation services in Toronto..."
}
⚠️ Notes
Invalid or parked domains are automatically skipped.

SSL certificate warnings are ignored safely (for non-HTTPS sites).

Use responsibly and respect each website’s robots.txt.

👨‍💻 Author
Louis-Charles Carrier
Freelance automation & AI systems developer
Creator of Smart Contractor Systems

⭐ If you find this tool helpful — star the repo or leave feedback on Apify Store!

yaml
Copy code

---

#### ✅ Where to Put It
- Replace your current **README.md** on GitHub with this text.  
- The **“Description”** field in Apify should copy the short intro section (first paragraph).  

---

Would you like me to also generate a short **Apify Store preview text (one paragraph)** that matches this REA



# Actor input Schema

## `startUrls` (type: `array`):

List of website URLs to scrape (homepage or list).
## `maxConcurrency` (type: `integer`):

Number of pages to scrape in parallel.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.abgbuilds.com",
    "https://www.aboltinc.com"
  ],
  "maxConcurrency": 10
}
````

# 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 = {
    "startUrls": [
        "https://www.abgbuilds.com",
        "https://www.aboltinc.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lccscsio/website-url-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 = { "startUrls": [
        "https://www.abgbuilds.com",
        "https://www.aboltinc.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("lccscsio/website-url-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 '{
  "startUrls": [
    "https://www.abgbuilds.com",
    "https://www.aboltinc.com"
  ]
}' |
apify call lccscsio/website-url-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lccscsio/website-url-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/IerxEFOV9xkpwHXQp/builds/szMLRunrIWbBtlTZr/openapi.json
