# Lawyer & Attorney Lead Scraper — Verified Emails (`samstorm/lawyer-lead-scraper`) Actor

Scrape lawyer & attorney contacts from Google Maps with verified emails, phones & social links. Real-time data from firm websites. Export to HubSpot, Salesforce, or CSV. Built for legal SaaS sales, legal marketing & recruiting.

- **URL**: https://apify.com/samstorm/lawyer-lead-scraper.md
- **Developed by:** [Sam Kleespies](https://apify.com/samstorm) (community)
- **Categories:** Lead generation
- **Stats:** 99 total users, 5 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $75.00 / 1,000 enriched attorney 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/actors/running/actors-in-store.md#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

## Lawyer & Attorney Lead Scraper — Verified Emails & Law Firm Leads

Build a verified attorney email list or law firm scraper database from Google Maps in minutes. This Apify actor generates lawyer leads and legal leads at scale — names, emails, phone numbers, websites, and social profiles — for any practice area and location. No static database, no stale records: every run pulls live data.

### Key Features

- **Google Maps search** — Find businesses by type and location, powered by Playwright
- **Email extraction** — Automatically visits business websites to find contact emails
- **DNS + SMTP verification** — Confirms email deliverability to reduce bounce rates
- **Social media links** — Extracts Facebook, Instagram, LinkedIn, and Twitter/X profiles
- **CRM-ready export** — Output in Full, HubSpot Import, or Salesforce Import format
- **Real-time data** — Fresh results scraped on demand, not a stale database

### Find Lawyer Emails for Any Practice Area

Stop manually hunting for attorney contact details. This scraper finds verified emails for:

- Personal Injury Lawyers
- Criminal Defense Attorneys
- Family Law Attorneys
- Immigration Lawyers
- Bankruptcy Attorneys
- Estate Planning Lawyers
- Corporate & Business Law Firms

Specify any city, state, or ZIP code and get a ready-to-use lawyer email list in minutes.

### How to Scrape Attorney Contact Information

The scraper runs four automated phases to build your law firm leads list:

**Phase 1 — Google Maps Scrape:** Queries Google Maps for law firms matching your practice area and location filters. Collects business name, address, phone, rating, and website URL for every matching result.

**Phase 2 — Website Email Crawl:** Visits each law firm's website and crawls contact pages, attorney bio pages, and footer sections to extract email addresses directly from the source.

**Phase 3 — Social Profile Extraction:** Identifies LinkedIn, Facebook, and other social media profiles linked from the firm's website. Extracts attorney names and titles where available.

**Phase 4 — Email Verification:** Validates extracted emails using MX record checks and SMTP handshakes. Flags unverified addresses so you only contact deliverable inboxes.

### What Data Do You Get?

Each record in your attorney lead generation export contains:

```json
{
  "name": "Johnson & Associates Personal Injury Law",
  "category": "Personal Injury Lawyer",
  "address": "742 Michigan Ave, Chicago, IL 60601",
  "phone": "(312) 555-0194",
  "website": "https://johnsoninjurylaw.com/",
  "mapsUrl": "https://www.google.com/maps/place/...",
  "rating": 4.8,
  "reviewCount": 127,
  "email": "contact@johnsoninjurylaw.com",
  "emailVerified": true,
  "emailVerificationStatus": "smtp_verified",
  "emailVerificationNote": "Verified via SMTP",
  "allEmails": [{"address": "contact@johnsoninjurylaw.com", "verified": true, "status": "smtp_verified", "verificationNote": "Verified via SMTP"}],
  "socialLinks": {"facebook": "https://facebook.com/johnsoninjurylaw", "linkedin": "https://linkedin.com/company/johnson-associates-law"}
}
```

### Input Options

| Parameter | Type | Description | Example |
|-|-|-|-|
| `businessType` | select | Practice area to search | `Personal Injury Lawyer` |
| `location` | string | City, state, or ZIP code | `Chicago, IL` |
| `searchQuery` | string | Custom query (when type is "Custom") | `"DUI attorney downtown Denver"` |
| `maxResults` | integer | Maximum records per run (1–500) | `200` |
| `enrichEmails` | boolean | Crawl websites for email addresses | `true` |
| `verifyEmails` | boolean | Run email verification pass | `true` |
| `enrichSocials` | boolean | Extract LinkedIn/Facebook links | `true` |
| `outputFormat` | select | Full, HubSpot, or Salesforce | `hubspot` |

### Use Cases

- **Court Reporting & Litigation Support:** Identify personal injury, criminal defense, or family law firms that need court reporters, e-discovery vendors, deposition services, or expert witnesses. Target by practice area for precise prospecting.
- **Legal Tech Sales:** Prospect law firms for case management software, client intake tools, legal billing platforms, or e-signature solutions. Filter by practice area to match your product's buyer persona.
- **Legal Marketing Agencies:** Build targeted attorney email lists by city and practice area for campaigns promoting SEO, PPC, or web design services to law firms.
- **Bar Associations & CLE Providers:** Compile attorney contact lists for continuing legal education marketing and membership renewal campaigns.
- **Legal Recruiters:** Find law firm leads when placing attorneys or legal staff. Target firms by specialty and geography to match open roles precisely.

### Output Formats

#### Full Export (Default)

All fields included. Best for custom CRM imports or building a master attorney contact database from Google Maps data.

#### HubSpot Format

Pre-mapped to HubSpot contact and company properties. Import directly via HubSpot's CSV import wizard without field remapping.

```
Company Name, Company Domain Name, Phone Number, Street Address, Website URL, Email, Google Maps URL, Rating, Number of Reviews, Facebook Company Page, LinkedIn Company Page, Twitter Handle, Industry
```

#### Salesforce Format

Pre-mapped to Salesforce Lead object fields. Drop into Data Loader or a Salesforce Flow without transformation.

```
Account Name, Phone, Website, Billing Street, Email__c, Rating__c, Review_Count__c, Google_Maps_URL__c, Facebook__c, LinkedIn__c, Industry
```

### Why Choose This Over Apollo.io, ZoomInfo, or Hunter.io?

| Feature | This Actor | Apollo.io | ZoomInfo | Hunter.io |
|-|-|-|-|-|
| Google Maps as live data source | Yes | No | No | No |
| Real-time verified emails | Yes | Cached database | Cached database | Yes |
| Law firm specialization | Yes | Generic B2B | Generic B2B | Domain-level only |
| Approximate cost per lead | ~$0.01 | $0.10–$0.50 | $0.50–$2.00 | $0.05–$0.20 |
| Custom city/ZIP geo-targeting | Any location | Preset filters | Preset filters | Domain only |
| Individual attorney emails | Yes | Yes | Yes | No |

Apollo.io and ZoomInfo rely on static databases that go stale quickly. This actor pulls live attorney contact information directly from Google Maps and crawls law firm websites in real time, so your lawyer email list reflects current data — not records from six months ago. Hunter.io only finds emails by domain and cannot discover new law firms the way a Google Maps scrape can.

### Cost Estimation

Each run incurs two types of costs:

1. **Pay-per-event pricing** — You pay per enriched lead returned (see pricing above the README).
2. **Platform usage** — Apify charges for compute time and proxy bandwidth used during the run.

Typical costs for a 100-lead run:

- **Run time:** 5–15 minutes
- **Platform usage:** $0.50–$2.00 (depends on proxy type and email enrichment)
- **Total per lead:** varies by niche and location density

For the most cost-effective results, we recommend:

- Start with a small test run (10–25 leads) to validate data quality
- Disable email verification (`verifyEmails: false`) if you plan to verify separately
- Use specific locations (city + state) rather than broad regions

### Getting Started

1. [Create a free Apify account](https://apify.com/sign-up) if you do not already have one.
2. Click **Try for free** on this actor's Apify page.
3. Set `businessType` (e.g., `Personal Injury Lawyer`) and `location` (e.g., `Houston, TX`).
4. Enable `verifyEmails` and `enrichEmails` for the highest-quality legal marketing leads.
5. Run the actor and download your lawyer email list as CSV, JSON, or Excel.
6. Import directly into HubSpot, Salesforce, or any outreach tool using the pre-mapped format.

For high-volume attorney lead generation campaigns or API integrations, open an issue or contact the author through the Apify platform.

### Recent Updates

- **March 2026** — Version 1.0 release: production-ready with verified email pipeline
- **March 2026** — Optimized proxy usage with aggressive resource blocking — ~50% cost reduction per run
- **March 2026** — Added fail-fast error recovery: blocked requests abort immediately instead of retrying
- **March 2026** — Added social media link extraction (Facebook, Instagram, LinkedIn, Twitter/X)

### Related Lead Scrapers by samstorm

Build a complete prospecting database across industries with verified email enrichment:

| Actor | What It Does | Best For | Try It |
|---|---|---|---|
| [Dentist Lead Scraper](https://apify.com/samstorm/dentist-lead-scraper) | Verified emails from dental & medical practices | Dental supply sales, healthcare SaaS, medical recruiters | [Try free](https://apify.com/samstorm/dentist-lead-scraper) |
| [Contractor Lead Scraper](https://apify.com/samstorm/contractor-lead-scraper) | HVAC, plumber, roofer, electrician contacts | Construction suppliers, trade insurance, home service SaaS | [Try free](https://apify.com/samstorm/contractor-lead-scraper) |
| [Restaurant Lead Scraper](https://apify.com/samstorm/restaurant-lead-scraper) | Restaurant, bar, and cafe owner contacts | Food suppliers, POS system sales, restaurant tech | [Try free](https://apify.com/samstorm/restaurant-lead-scraper) |
| [Real Estate Lead Scraper](https://apify.com/samstorm/real-estate-lead-scraper) | Agent, broker, and property manager emails | Mortgage lenders, PropTech, real estate marketing | [Try free](https://apify.com/samstorm/real-estate-lead-scraper) |
| [Auto Dealer Lead Scraper](https://apify.com/samstorm/auto-dealer-lead-scraper) | Car dealership and auto shop contacts | Auto parts suppliers, dealer management software, F\&I products | [Try free](https://apify.com/samstorm/auto-dealer-lead-scraper) |
| [Wedding Vendor Lead Scraper](https://apify.com/samstorm/wedding-vendor-lead-scraper) | Venue, photographer, planner contacts | Wedding SaaS platforms, bridal advertising | [Try free](https://apify.com/samstorm/wedding-vendor-lead-scraper) |
| [Financial Advisor Lead Scraper](https://apify.com/samstorm/financial-advisor-lead-scraper) | Financial advisor and insurance agent emails | FinTech sales, compliance software, wealth management | [Try free](https://apify.com/samstorm/financial-advisor-lead-scraper) |
| [Veterinarian Lead Scraper](https://apify.com/samstorm/veterinarian-lead-scraper) | Vet clinic and pet service contacts | Pet supply distributors, veterinary SaaS | [Try free](https://apify.com/samstorm/veterinarian-lead-scraper) |
| [B2B Lead Enrichment](https://apify.com/samstorm/lead-enrichment-actor) | Google Maps to CRM for any business type | General B2B prospecting, custom niche research | [Try free](https://apify.com/samstorm/lead-enrichment-actor) |

[See all actors by samstorm](https://apify.com/samstorm)

### Why Use This Instead of a General Google Maps Scraper?

The general-purpose Google Maps Scraper on Apify costs $4-10 per 1,000 results but requires you to chain multiple actors, configure filters manually, and pay extra for email enrichment. Here is what you get with this dedicated Lawyer scraper that you will not get from a general tool:

| Feature | General Google Maps Scraper | This Actor |
|-|-|-|
| Pre-filtered attorney results | No — returns mixed results | Yes — every result is an attorney |
| Verified email addresses | Extra add-on ($0.002/place) | Built-in, included in price |
| Email deliverability check (DNS+SMTP) | Not available | Built-in |
| Social media profiles | Extra add-on | Built-in |
| CRM-ready export (HubSpot, Salesforce) | Not available | Built-in |
| Single-actor simplicity | Need 2-3 actors chained | One actor, one click |

#### What you get in a single run

1. Search Google Maps for attorney businesses in any location
2. Automatically crawl each business website for email addresses
3. Verify every email with DNS and SMTP checks
4. Extract social media profiles (Facebook, Instagram, LinkedIn, Twitter)
5. Export in your choice of format: Full JSON, HubSpot Import, or Salesforce Import

No coding required. No API keys needed. No multi-actor pipelines to configure.

### Use via Apify API

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

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

const run = await client.actor('samstorm/lawyer-lead-scraper').call({
    businessType: 'Personal Injury Lawyer',
    location: 'Dallas, TX',
    maxResults: 50,
    enrichEmails: true,
    verifyEmails: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_API_TOKEN')

run = client.actor('samstorm/lawyer-lead-scraper').call(run_input={
    'businessType': 'Personal Injury Lawyer',
    'location': 'Los Angeles, CA',
    'maxResults': 100,
    'enrichEmails': True,
    'verifyEmails': True,
    'outputFormat': 'hubspot',
})

items = client.dataset(run['defaultDatasetId']).list_items().items
print(f'Got {len(items)} attorney leads')
```

### Multi-Location Workflows

Google Maps returns up to ~120 results per search query, so large-scale prospecting requires running the actor once per city or metro area and merging the datasets.

**Option 1: Apify API loop** — Call the actor programmatically for each location:

```javascript
const locations = ['Los Angeles, CA', 'San Diego, CA', 'San Francisco, CA', 'Sacramento, CA'];

for (const location of locations) {
    const run = await client.actor('samstorm/lawyer-lead-scraper').call({
        businessType: 'Personal Injury Lawyer',
        location,
        maxResults: 200,
        enrichEmails: true,
        verifyEmails: true,
    });
    console.log(`Completed ${location}: run ${run.id}`);
}
```

**Option 2: Apify Schedules** — Set up a schedule in the Apify Console that triggers runs for different locations on a recurring basis. Use a separate Saved Task for each city.

**Deduplication across runs:** Each run deduplicates internally by business name + address. When merging datasets from multiple runs, deduplicate on the same key to remove businesses that appear in overlapping metro areas.

### Integrations

This actor works with the full Apify ecosystem and popular automation platforms:

- **Apify API & Webhooks** — Trigger runs programmatically and receive results via webhook when complete
- **Zapier** — Connect to 5,000+ apps using the [Apify Zapier integration](https://zapier.com/apps/apify)
- **Make (Integromat)** — Build multi-step automations with the [Apify Make module](https://www.make.com/en/integrations/apify)
- **Google Sheets** — Export results directly to a spreadsheet using Apify's built-in Google Sheets integration
- **Slack** — Get notified in Slack when a run completes using Apify's webhook notifications

### Frequently Asked Questions

**How do I get a lawyer email list?**
Use this actor to scrape and verify attorney email addresses directly from Google Maps in real time. Enter a practice area (e.g., "Personal Injury Lawyer") and a location (e.g., "Atlanta, GA"), enable email enrichment and verification, and download your results as a CSV or JSON. You get a ready-to-use lawyer email list in minutes — no waiting for a sales rep, no subscription contract, no minimum purchase.

**How much does a lawyer email list cost?**
Buying a static lawyer email list from data brokers typically runs $500–$5,000 for a few thousand records of unknown freshness. This actor costs a fraction of that on a pay-per-lead basis — roughly $0.01 per verified attorney contact. A list of 500 verified law firm leads typically costs $5–$15 in total, including Apify platform fees. You only pay for what you run, with no monthly minimums.

**Is it legal to scrape attorney contact information?**
Attorney contact information listed on Google Maps and law firm websites is publicly available business data. Scraping publicly accessible contact details for B2B outreach purposes is generally lawful in the United States under the Computer Fraud and Abuse Act and the Ninth Circuit's ruling in *hiQ Labs v. LinkedIn*. That said, you remain responsible for complying with CAN-SPAM, GDPR (if contacting EU-based attorneys), and any applicable state bar regulations governing unsolicited legal marketing contact. This tool is intended for B2B sales and marketing to law firms — not consumer solicitation.

**What types of lawyers can I find?**
This actor supports all major legal practice areas available on Google Maps, including:

- **Personal Injury Lawyers** — auto accidents, slip-and-fall, medical malpractice
- **Family Law Attorneys** — divorce, child custody, adoption, domestic violence
- **Criminal Defense Attorneys** — DUI/DWI, felonies, misdemeanors, white-collar crime
- **Immigration Lawyers** — green cards, visas, asylum, deportation defense
- **Estate Planning Attorneys** — wills, trusts, probate, elder law
- **Bankruptcy Attorneys** — Chapter 7, Chapter 13, debt relief
- **Employment Lawyers** — wrongful termination, discrimination, wage disputes
- **Corporate & Business Lawyers** — contracts, M\&A, LLC formation
- **Real Estate Attorneys** — closings, title disputes, landlord-tenant
- **Workers' Compensation Lawyers** — workplace injury claims

Use the "Custom" search type to target any niche not listed — type exactly what you'd search on Google Maps.

**Can I export lawyer leads to HubSpot or Salesforce?**
Yes. Set `outputFormat` to `hubspot` to get a CSV pre-mapped to HubSpot contact and company properties — import directly via HubSpot's CSV import wizard with no field remapping. Set it to `salesforce` for a CSV aligned to Salesforce Lead object fields, ready for Data Loader or a Salesforce Flow. Both formats include firm name, email, phone, address, website, rating, review count, and LinkedIn URL out of the box.

**How accurate are the email addresses?**
Emails flagged `emailVerified: true` have passed both DNS MX record lookup and SMTP handshake verification, confirming the address exists on the mail server before delivery. Across law firm domains, this typically yields a bounce rate under 8% — significantly better than static attorney email lists from data brokers, which often show 20–40% bounce rates due to attorney turnover and firm rebranding. Attorney-level emails (e.g., mjohnson@smithlaw.com) are individually verified; generic firm addresses (info@, contact@) are also verified but may reach a receptionist rather than the attorney directly.

**How is this different from buying a list from ZoomInfo or data brokers?**
ZoomInfo, Dun & Bradstreet, and similar data brokers sell attorney email lists compiled from aggregated sources that may be 6–24 months old. Attorney contact data goes stale fast — lawyers change firms, firms merge, solo practitioners retire. This actor pulls live data from Google Maps and crawls each law firm's website on the day you run it, so the emails reflect current firm websites rather than a database snapshot. You also get niche-specific fields like Google Maps rating, review count, and individual attorney bios that data brokers don't offer. And at roughly $0.01 per verified lead versus $0.50–$2.00 from ZoomInfo, the cost difference for a list of 1,000 attorney contacts is substantial.

### Limitations

- Google Maps typically returns up to ~120 results per search query. Use multiple locations for larger datasets.
- Email extraction depends on the business having a website with visible contact info. Businesses using only contact forms won't have emails extracted.
- SMTP verification may be blocked by some mail servers, resulting in "unknown" status rather than confirmed valid/invalid.
- This actor finds business/professional emails only, not personal consumer emails.

### Help Us Improve

If this actor saves you time, please consider leaving a review on the Apify Store. Your feedback helps other users discover this tool and helps us improve it. You can also report issues or request features through the Issues tab on the actor page.

# Actor input Schema

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

Select the type of legal professional to find on Google Maps. The actor automatically constructs the search query — for example, selecting 'Personal Injury Lawyer' with location 'Los Angeles, CA' finds personal injury attorneys in that city. Select 'Criminal Defense Attorney' to build a DUI or felony defense law firm list. Choose 'Custom' to write your own search query instead.

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

The city, state, or region to search for law firms in. Use 'City, ST' format for US locations — for example, 'Los Angeles, CA' for personal injury attorneys or 'Houston, TX' for immigration lawyers. You can also use ZIP codes, neighborhoods, or broader regions like 'Downtown Manhattan'. The more specific your location, the more targeted your attorney lead list.

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

A raw Google Maps search query, used only when Business Type is set to 'Custom'. For all other types, the search is built automatically from Business Type + Location. Write queries the same way you would type them into Google Maps — for example: 'workers compensation lawyers in Phoenix AZ', 'employment attorney Manhattan', or 'real estate attorney 90210'.

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

The maximum number of law firm leads to collect and return. The prefill is set to 3 for a quick test run — increase to 50–200 for production use. Google Maps typically returns up to 120 results per search query; use a smaller number first to verify data quality before scaling up.

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

When enabled, the actor visits each law firm website and scans contact pages, footers, and about pages to extract email addresses. Disable this option if you only need phone numbers and addresses, or want faster results without website crawling.

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

When enabled, each extracted email address is checked using DNS (MX record lookup) and an SMTP handshake to confirm the mailbox exists and can receive mail. This adds roughly 1 extra minute to the run but significantly reduces bounce rates. Only applies when 'Find Email Addresses' is also enabled.

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

When enabled, the actor scans each firm website for links to social media profiles including Facebook, Instagram, LinkedIn, and Twitter/X. These links are included in the output and are useful for multi-channel outreach and account-based marketing.

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

Controls the structure of the output dataset. 'Full' returns all available fields. 'HubSpot Import' reformats the data to match HubSpot's CSV import column names for direct upload. 'Salesforce Import' reformats for Salesforce data import. All formats are available in Apify's dataset export (CSV, JSON, Excel).

## `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": "Family Lawyer",
  "location": "Chicago, IL",
  "searchQuery": "immigration lawyers in Miami, FL",
  "maxResults": 50,
  "enrichEmails": true,
  "verifyEmails": true,
  "enrichSocials": true,
  "outputFormat": "hubspot",
  "proxyUrl": "http://user:pass@proxy.example.com:8080/"
}
```

# Actor output Schema

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

No description

# 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 = {
    "location": "Chicago, IL",
    "searchQuery": "personal injury lawyers in Los Angeles, CA",
    "maxResults": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("samstorm/lawyer-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 = {
    "location": "Chicago, IL",
    "searchQuery": "personal injury lawyers in Los Angeles, CA",
    "maxResults": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("samstorm/lawyer-lead-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 '{
  "location": "Chicago, IL",
  "searchQuery": "personal injury lawyers in Los Angeles, CA",
  "maxResults": 3
}' |
apify call samstorm/lawyer-lead-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,samstorm/lawyer-lead-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/f6o4KrbNJeGC0AnqF/builds/DfQj6h5u0tzw4CdbK/openapi.json
