# Electrician Leads Scraper — Emails & Licenses (`muhammadafzal/electrician-lead-scraper`) Actor

Find electrician leads with verified emails, phones, websites, license numbers, services, locations, and structured business data.

- **URL**: https://apify.com/muhammadafzal/electrician-lead-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 enriched electrician leads

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Electrician Leads Scraper — Emails & Licenses

Scrape electrician and electrical contractor contacts from Google Maps with **verified emails**, phone numbers, license numbers, service areas, and social media links. Built for solar companies, EV charging installers, electrical supply distributors, home warranty providers, and trade SaaS sales teams who need CRM-ready electrician lead lists.

The actor searches Google Maps by specialty and location, then crawls each electrician's website to extract contact emails, contractor license numbers, service area coverage, and social profiles. Emails are verified via DNS MX record lookup to flag deliverable inboxes. Export to **HubSpot**, **Salesforce**, or CSV in a single run.

Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.

### Use Cases

- **Solar & EV sales** — Build targeted lead lists of residential electricians and solar installers for solar panel and EV charging station sales outreach
- **Electrical supply distributors** — Prospect commercial and industrial electricians by territory for product distribution partnerships
- **Home warranty providers** — Find licensed electricians by service area for contractor network building
- **Trade SaaS sales** — Generate electrician lead lists by specialty (residential, commercial, industrial, low voltage) for dispatch software, invoicing, and CRM tools
- **Contractor compliance** — Extract license numbers to verify contractor licensing status and skip-trace unlicensed operators
- **Multi-channel outreach** — Use email + phone + social links for combined email, cold-call, and Facebook ad campaigns

### Features

- **Google Maps search** — Find electricians by specialty (9 preset categories) or custom search query
- **Verified emails** — Crawls electrician websites and verifies email deliverability via DNS MX record lookup
- **License number extraction** — Extracts contractor license numbers (TECL, EC, state formats) from websites
- **Service area extraction** — Parses electrician websites for cities and regions they serve
- **Specialty detection** — Detects residential, commercial, industrial, solar, EV, low voltage, and emergency specializations
- **Social media links** — Finds Facebook, Instagram, LinkedIn, Twitter/X, YouTube, and TikTok profiles
- **Multi-location batch mode** — Search multiple cities in a single run and combine results
- **Deduplication** — Removes duplicate electricians by phone or business name across multi-location runs
- **CRM export formats** — Output in Full, HubSpot CSV import, or Salesforce import format
- **No login required** — No Google account or cookies needed
- **Residential proxies** — Uses Apify's residential proxy pool by default for reliable access

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `businessType` | string | `Residential Electrician` | Select from 9 specialty presets, or `Custom` |
| `location` | string | `Dallas, TX` | City, state, or region to search (e.g., `Phoenix, AZ`) |
| `locations` | array | — | Multiple locations for batch mode (e.g., `["Dallas, TX", "Houston, TX"]`) |
| `searchQuery` | string | — | Custom Google Maps query (used when businessType = `Custom`) |
| `startUrls` | array | — | Direct Google Maps place URLs to scrape |
| `maxResults` | integer | `50` | Maximum number of leads to collect (1–2000) |
| `enrichEmails` | boolean | `true` | Crawl electrician websites to find email addresses |
| `verifyEmails` | boolean | `true` | Verify email deliverability via DNS MX lookup |
| `enrichSocials` | boolean | `true` | Extract social media profile links |
| `extractLicenseNumber` | boolean | `true` | Extract contractor license numbers from websites |
| `extractServiceAreas` | boolean | `true` | Parse service area coverage from websites |
| `outputFormat` | string | `full` | `full`, `hubspot`, or `salesforce` |
| `deduplicateResults` | boolean | `true` | Remove duplicates across multi-location runs |
| `maxWebsitePages` | integer | `5` | Max pages to crawl per electrician website (1–20) |
| `proxyUrl` | string | — | Custom HTTP proxy URL (format: `http://user:pass@host:port`) |

#### Quick Start Example

```json
{
    "businessType": "Residential Electrician",
    "location": "Dallas, TX",
    "maxResults": 50,
    "enrichEmails": true,
    "verifyEmails": true,
    "extractLicenseNumber": true,
    "outputFormat": "hubspot"
}
```

#### Multi-City Batch Example

```json
{
    "businessType": "Solar Installer",
    "locations": ["Phoenix, AZ", "Los Angeles, CA", "Houston, TX", "Miami, FL"],
    "maxResults": 200,
    "outputFormat": "salesforce"
}
```

#### EV Charging Installer Example

```json
{
    "businessType": "EV Charging Station Installer",
    "location": "Seattle, WA",
    "maxResults": 100,
    "extractServiceAreas": true
}
```

### Output Data

Each lead record contains:

| Field | Type | Description |
|-------|------|-------------|
| `name` | string | Business name |
| `business_type` | string | Specialty used for the search |
| `specialty` | string|null | Detected specialty (Residential, Commercial, Solar, etc.) |
| `category` | string|null | Google Maps business category |
| `license_number` | string|null | Contractor license number (if found on website) |
| `service_areas` | array | Cities/regions the electrician serves |
| `address` | string|null | Full postal address |
| `phone` | string|null | Primary phone number |
| `website` | string|null | Electrician website URL |
| `email` | string|null | Primary contact email |
| `all_emails` | array | All emails found with verification status |
| `email_verified` | boolean|null | Whether email passed DNS verification |
| `email_verification_status` | string | `deliverable`, `undeliverable`, `risky`, `unknown`, `not_verified` |
| `social_links` | object | Facebook, Instagram, LinkedIn, Twitter, YouTube, TikTok URLs |
| `rating` | number|null | Google Maps rating (1–5) |
| `review_count` | integer|null | Number of Google Maps reviews |
| `hours` | string|null | Operating hours |
| `maps_url` | string|null | Direct Google Maps listing URL |
| `place_id` | string|null | Google Places API identifier |
| `latitude` | number|null | Geographic latitude |
| `longitude` | number|null | Geographic longitude |
| `scraped_at` | string | ISO 8601 timestamp |
| `source_url` | string | Source Google Maps URL |

#### Sample Output

```json
{
    "name": "Bright Electrical Services",
    "business_type": "Residential Electrician",
    "specialty": "Solar installation",
    "category": "Electrician",
    "license_number": "TECL-12345",
    "service_areas": ["Dallas", "Fort Worth", "Plano", "Frisco"],
    "address": "4521 Maple Ave, Dallas, TX 75219",
    "phone": "(214) 555-0192",
    "website": "https://brightelectrical.com",
    "email": "info@brightelectrical.com",
    "all_emails": [
        {
            "address": "info@brightelectrical.com",
            "verified": true,
            "status": "deliverable",
            "verificationNote": "MX record found: mail.brightelectrical.com"
        }
    ],
    "email_verified": true,
    "email_verification_status": "deliverable",
    "social_links": {
        "facebook": "https://facebook.com/brightelectrical",
        "linkedin": "https://linkedin.com/company/bright-electrical"
    },
    "rating": 4.7,
    "review_count": 312,
    "hours": "Mon-Fri 7:00 AM - 6:00 PM",
    "maps_url": "https://www.google.com/maps/place/Bright+Electrical+Services/@32.8032,-96.8067,17z",
    "place_id": "ChIJb5xK7wLQIYURxjM",
    "latitude": 32.8032,
    "longitude": -96.8067,
    "scraped_at": "2026-06-24T12:00:00.000Z",
    "source_url": "https://www.google.com/maps/search/residential+electrician+in+Dallas"
}
```

### Pricing

This actor uses **pay-per-event pricing**: **$0.025 per enriched electrician lead**.

| Leads | Cost |
|-------|------|
| 10 leads | $0.25 |
| 50 leads | $1.25 |
| 100 leads | $2.50 |
| 500 leads | $12.50 |
| 1,000 leads | $25.00 |

You only pay for successfully enriched leads with contact data — no charge for empty results.

### Code Examples

#### Run via Apify SDK (JavaScript)

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('muhammadafzal/electrician-lead-scraper').call({
    businessType: 'Residential Electrician',
    location: 'Dallas, TX',
    maxResults: 50,
    enrichEmails: true,
    verifyEmails: true,
    extractLicenseNumber: true,
    outputFormat: 'hubspot'
});

const dataset = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${dataset.items.length} electrician leads`);
```

#### Run via REST API

```bash
curl -X POST "https://api.apify.com/v2/acts/muhammadafzal~electrician-lead-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"businessType":"Solar Installer","location":"Phoenix, AZ","maxResults":20}'
```

#### Schedule a Daily Run

```bash
apify schedule create --actor muhammadafzal/electrician-lead-scraper \
  --cron "0 9 * * 1" \
  --input '{"businessType":"Commercial Electrician","location":"Houston, TX","maxResults":100}'
```

### FAQ

#### Why are some emails null?

Not all electrician websites list email addresses publicly. The actor crawls contact, about, services, and service-area pages. If no email is found, the field is `null` and you still get the phone, address, license number, and social links.

#### How does email verification work?

The actor performs DNS MX record lookup on each email's domain to confirm a mail server exists. Emails from domains with valid MX records are marked `deliverable`. This reduces bounce rates compared to unverified email lists.

#### How accurate are license numbers?

The actor uses pattern matching to detect common contractor license formats (TECL, EC, state license numbers) from website text. Accuracy depends on how the electrician displays their license on their site. Always verify license numbers against your state's licensing board before relying on them for compliance.

#### What if Google Maps blocks the request?

The actor uses Apify's residential proxy pool by default. If you experience blocks, you can provide a custom proxy URL via the `proxyUrl` parameter using services like IPRoyal, Smartproxy, or Bright Data.

#### Can I search multiple cities at once?

Yes. Use the `locations` array parameter with multiple cities. The actor searches each location and combines results with deduplication enabled by default.

#### What CRM formats are supported?

`full` returns all fields. `hubspot` formats output for HubSpot CSV import. `salesforce` formats for Salesforce data import. All formats are exportable as CSV, JSON, or Excel from Apify's dataset.

### Integration Ideas

- **HubSpot**: Set `outputFormat: "hubspot"`, export dataset as CSV, import directly into HubSpot Contacts
- **Salesforce**: Set `outputFormat: "salesforce"`, export as CSV and use Data Import Wizard
- **Mailchimp**: Filter leads where `email_verified === true`, export emails for outreach campaigns
- **Apollo/Outreach**: Use the `name` and `email` fields for personalized cold email sequences
- **Facebook Ads**: Use the `social_links.facebook` field to build Custom Audiences for retargeting

### Changelog

- **v1.0** — Initial release with Google Maps search, email enrichment, DNS verification, license number extraction, service area extraction, specialty detection, social link extraction, multi-location batch mode, and HubSpot/Salesforce export formats

### What is Electrician Leads Scraper?

**Electrician Leads Scraper** turns the target data into structured, reusable results on Apify. Use it when you need repeatable collection for sales teams, agencies, recruiters, market researchers, and data-enrichment workflows without maintaining a custom scraper or one-off integration. Run it manually, schedule recurring jobs, call it through the Apify API, or connect it to an AI agent through the Apify MCP server.

The Actor stores results in an Apify dataset, where they can be previewed and exported as JSON, CSV, Excel, XML, or RSS. Availability and completeness depend on the source, supplied inputs, public visibility, authentication requirements, and upstream rate limits.

### Use cases for Electrician Leads Scraper

- Build structured datasets for research, reporting, enrichment, or monitoring.
- Automate repetitive collection with schedules, webhooks, and API calls.
- Feed clean records into spreadsheets, databases, CRMs, BI tools, AI agents, or RAG pipelines.
- Track changes over time by running the same validated input on a schedule.
- Replace fragile manual copy-and-paste work with a reproducible Apify workflow.

### How to use Electrician Leads Scraper

1. Open the Actor input page and choose a focused, valid target.
2. Set a conservative result limit for the first run.
3. Start the Actor and inspect the dataset for coverage and field availability.
4. Export the results or connect the dataset to your downstream system.
5. Scale gradually and use scheduling, pagination, or proxies when supported.

#### Important input options

- `businessType` — Use this field to select the type of electrical contractor to find on Google Maps. The actor automatically builds the search query — 'Residential Electrician' finds home wiring & repair elec
- `location` — Use this field to specify the city, state, or region to search for electricians. Use 'City, ST' format for US locations — 'Dallas, TX', 'Phoenix, AZ', 'Los Angeles, CA'. ZIP codes and neighb
- `locations` — Use this field when you want to search multiple cities in a single run. Each location is searched separately and results are combined with deduplication. Example: \['Dallas, TX', 'Houston, TX
- `searchQuery` — A raw Google Maps search query, used ONLY when Electrician Specialty is set to 'Custom'. Write queries the same way you would type them into Google Maps — 'ev charging installers in Seattle
- `startUrls` — Use this field when the user provides specific Google Maps place URLs to scrape directly. Format: \[{"url": "https://www.google.com/maps/place/..."}]. Do NOT use this when the user describes
- `maxResults` — The maximum number of electrician leads to collect and return. Set to a small number (3-5) first to verify data quality before scaling. Google Maps typically returns up to 120 results per se
- `enrichEmails` — When enabled, the actor visits each electrician's website and scans contact pages, footers, and about pages to extract email addresses. Disable if you only need phone numbers and addresses,
- `verifyEmails` — When enabled, each extracted email is checked via DNS MX record lookup to confirm the mailbox exists and can receive mail — without sending a message. Reduces bounce rates. Only applies when

### API and automation example

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('muhammadafzal/electrician-lead-scraper').call({
  // Add the same input fields you use in the Apify Console.
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Related Apify Actors

Use these dedicated tools when a neighboring data source or workflow is a better match:

- [Instagram Followers & Following Scraper — With Cookies](https://apify.com/muhammadafzal/instagram-following-scraper)
- [Leads Finder Pro - B2B Leads with Emails \[Apollo Alternative\]](https://apify.com/muhammadafzal/leads-finder-pro)
- [Yellow Pages US Scraper — Business Leads & Reviews](https://apify.com/muhammadafzal/yellow-pages-us-scraper)
- [Yellow Pages Australia Scraper — Business Leads & Reviews](https://apify.com/muhammadafzal/yellow-pages-au-scraper)
- [OpenTable Restaurants, Ratings & Reviews Scraper](https://apify.com/muhammadafzal/opentable-scraper)
- [Etsy Scraper Pro — Products, Prices, Reviews & Shop Data](https://apify.com/muhammadafzal/etsy-scraper-pro)
- [Shopify Store Scraper - Products, Reviews & Emails](https://apify.com/muhammadafzal/shopify-store-scraper)
- [🔧 USA Plumbers Scraper — Leads with Phone, Address & Website](https://apify.com/muhammadafzal/usa-plumbers-scraper)
- [Yellow Pages CA Scraper — Canadian Business Leads](https://apify.com/muhammadafzal/yellow-pages-ca-scraper)
- [California CSLB Contractor License Scraper](https://apify.com/muhammadafzal/cslb-california-scraper)

### Frequently asked questions

#### How many results can I scrape with Electrician Leads Scraper?

The practical total depends on the source, input limits, pagination, available records, run timeout, and upstream restrictions. Start with a small run, verify the output, and increase the limit gradually.

#### Can I integrate Electrician Leads Scraper with other apps?

Yes. Use Apify integrations, webhooks, schedules, dataset exports, Make, Zapier, Google Sheets, cloud storage, or your own application.

#### Can I use Electrician Leads Scraper with the Apify API?

Yes. Start runs with the Apify REST API or an official Apify client, then retrieve records from the run's default dataset. Keep your API token in a secret or environment variable.

#### Can I use Electrician Leads Scraper through an MCP Server?

Yes. The Apify MCP server can expose the Actor to compatible AI clients and agents. Review the input and expected cost before allowing an autonomous workflow to run it at scale.

#### Do I need proxies?

It depends on the source and volume. Use the default configuration first. For larger or geographically sensitive jobs, select an appropriate proxy configuration only when the Actor supports it.

#### Is it legal to scrape this data?

Scraping rules vary by source, jurisdiction, data type, and intended use. Collect only data you are authorized to access, respect applicable terms and privacy laws, and avoid restricted or personal data misuse. This documentation is not legal advice.

#### Your feedback

If a field is missing, a source layout has changed, or you need a supported use case documented, open an issue on the Actor page with a reproducible input and run ID.

# Actor input Schema

## `businessType` (type: `string`):

Use this field to select the type of electrical contractor to find on Google Maps. The actor automatically builds the search query — 'Residential Electrician' finds home wiring & repair electricians, 'Commercial Electrician' finds office/retail electrical contractors, 'Industrial Electrician' finds factory & plant electricians, 'Solar Installer' finds solar PV installers, 'EV Charging Station Installer' finds EV charger installers. Choose 'Custom' to write your own search query via the searchQuery field.

## `location` (type: `string`):

Use this field to specify the city, state, or region to search for electricians. Use 'City, ST' format for US locations — 'Dallas, TX', 'Phoenix, AZ', 'Los Angeles, CA'. ZIP codes and neighborhoods also work. The more specific your location, the more targeted your electrician lead list.

## `locations` (type: `array`):

Use this field when you want to search multiple cities in a single run. Each location is searched separately and results are combined with deduplication. Example: \['Dallas, TX', 'Houston, TX', 'Austin, TX']. Leave empty to use the single 'location' field instead.

## `searchQuery` (type: `string`):

A raw Google Maps search query, used ONLY when Electrician Specialty is set to 'Custom'. Write queries the same way you would type them into Google Maps — 'ev charging installers in Seattle WA', 'low voltage contractors near Denver', 'master electrician 90210'. For all other specialties the search is built automatically from Specialty + Location.

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

Use this field when the user provides specific Google Maps place URLs to scrape directly. Format: \[{"url": "https://www.google.com/maps/place/..."}]. Do NOT use this when the user describes a specialty or location — use businessType + location instead.

## `maxResults` (type: `integer`):

The maximum number of electrician leads to collect and return. Set to a small number (3-5) first to verify data quality before scaling. Google Maps typically returns up to 120 results per search query; run multiple locations to build larger datasets.

## `enrichEmails` (type: `boolean`):

When enabled, the actor visits each electrician's website and scans contact pages, footers, and about pages to extract email addresses. Disable if you only need phone numbers and addresses, or to run faster without website crawling.

## `verifyEmails` (type: `boolean`):

When enabled, each extracted email is checked via DNS MX record lookup to confirm the mailbox exists and can receive mail — without sending a message. Reduces bounce rates. Only applies when 'Find Email Addresses' is enabled.

## `enrichSocials` (type: `boolean`):

When enabled, the actor scans each electrician's website for links to Facebook, Instagram, LinkedIn, Twitter/X, YouTube, and TikTok. Useful for multi-channel outreach and Facebook ad targeting (Custom Audiences).

## `extractLicenseNumber` (type: `boolean`):

When enabled, the actor scans electrician websites for contractor license numbers (TECL, EC, state license formats). Critical for compliance verification and skip-tracing licensed vs. unlicensed contractors.

## `extractServiceAreas` (type: `boolean`):

When enabled, the actor parses electrician websites for service area coverage (cities/counties they serve). Useful for territory planning and identifying contractors serving specific regions.

## `outputFormat` (type: `string`):

Controls the structure of the output dataset. 'full' returns all available fields. 'hubspot' reformats for HubSpot CSV import. 'salesforce' reformats for Salesforce data import. All formats exportable as CSV, JSON, or Excel from Apify.

## `deduplicateResults` (type: `boolean`):

When enabled, removes duplicate electricians based on phone number or business name. Recommended for batch mode when searching multiple locations that may overlap.

## `maxWebsitePages` (type: `integer`):

Maximum number of pages to crawl on each electrician's website when enriching emails, socials, license numbers, or service areas. Higher values find more contacts but slow down the run. Default 5 is sufficient for most contractor sites.

## `proxyUrl` (type: `string`):

Optional HTTP proxy URL for using third-party residential proxies instead of Apify's built-in proxies. Format: http://username:password@host:port. Compatible with IPRoyal, Smartproxy, Bright Data, and other rotating proxy services. Leave empty to use Apify's default residential proxies.

## Actor input object example

```json
{
  "businessType": "Residential Electrician",
  "location": "Dallas, TX",
  "searchQuery": "residential electricians in Dallas, TX",
  "maxResults": 3,
  "enrichEmails": true,
  "verifyEmails": true,
  "enrichSocials": true,
  "extractLicenseNumber": true,
  "extractServiceAreas": true,
  "outputFormat": "full",
  "deduplicateResults": true,
  "maxWebsitePages": 5
}
```

# Actor output Schema

## `results` (type: `string`):

Link to the dataset containing all extracted electrician lead records.

# 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 = {
    "businessType": "Residential Electrician",
    "location": "Dallas, TX",
    "searchQuery": "residential electricians in Dallas, TX",
    "maxResults": 3,
    "enrichEmails": true,
    "verifyEmails": true,
    "enrichSocials": true,
    "extractLicenseNumber": true,
    "extractServiceAreas": true,
    "outputFormat": "full",
    "deduplicateResults": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/electrician-lead-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 = {
    "businessType": "Residential Electrician",
    "location": "Dallas, TX",
    "searchQuery": "residential electricians in Dallas, TX",
    "maxResults": 3,
    "enrichEmails": True,
    "verifyEmails": True,
    "enrichSocials": True,
    "extractLicenseNumber": True,
    "extractServiceAreas": True,
    "outputFormat": "full",
    "deduplicateResults": True,
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/electrician-lead-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "businessType": "Residential Electrician",
  "location": "Dallas, TX",
  "searchQuery": "residential electricians in Dallas, TX",
  "maxResults": 3,
  "enrichEmails": true,
  "verifyEmails": true,
  "enrichSocials": true,
  "extractLicenseNumber": true,
  "extractServiceAreas": true,
  "outputFormat": "full",
  "deduplicateResults": true
}' |
apify call muhammadafzal/electrician-lead-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=muhammadafzal/electrician-lead-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/73BqauKaz2w8EALrc/builds/q7clu1tjQQBxnOw0U/openapi.json
