# Lawyer Email Scraper (`scrapers-hub/lawyer-email-scraper`) Actor

Lawyer Email Scraper finds law firms via Google Maps and crawls their websites for contact emails - name, address, phone, website, rating, review count and coordinates included. ⚖️ Legal-sector lead generation and B2B outreach.

- **URL**: https://apify.com/scrapers-hub/lawyer-email-scraper.md
- **Developed by:** [Scrapers Hub](https://apify.com/scrapers-hub) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **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 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 Email Scraper – Law Firm Emails, Phones & Contact Data

The Lawyer Email Scraper finds law firms and legal practices in any location, visits their websites, and extracts verified contact details — email addresses, phone numbers and social media profiles — into a single structured dataset. You give it a search term and one or more locations; it returns firm records complete with address, coordinates, ratings, website and the contact points you actually need to reach a decision maker.

Built for legal marketers, B2B sales teams, recruiters and legal-tech vendors, this lawyer email scraper combines local business discovery with on-site crawling and email validation. Every business it saves has at least one email address, so you are not paying for empty rows. Each email can be checked for syntax, DNS, MX and SMTP validity, and scored for confidence, which means the list that lands in your CRM is closer to deliverable than a raw scrape would be.

***

### 📊 What Data Can You Extract with This Lawyer Email Scraper?

Records combine business firmographics, extracted contact points and per-email validation results. They group into seven categories.

| Category | Fields | What it tells you |
|---|---|---|
| 🏢 Firm identity | `name`, `place_id`, `website`, `platform`, `url` | The practice name, its stable place identifier, its website and the source the record came from |
| 📍 Location | `street_address`, `city`, `state`, `zip`, `country_code`, `full_address`, `lat`, `long` | A fully broken-out postal address plus geographic coordinates for mapping and territory assignment |
| ⭐ Reputation | `avg_rating`, `total_reviews` | Average star rating and review volume, a fast proxy for firm size and client activity |
| 📧 Email contacts | `email`, `emails`, `email_found`, `emails_found`, `_detailed_emails` | The primary email, every address discovered, a found flag and the per-address detail objects |
| ✅ Email validation | `syntax_valid`, `dns_valid`, `mx_valid`, `smtp_valid`, `is_disposable`, `is_role_based`, `confidence_score`, `validation_errors` | A layered deliverability verdict on each address, from format check through to mailbox probe |
| ☎️ Other contact points | `phone`, `scraped_phones`, `scraped_social_media`, `scraped_emails` | Phone numbers from the listing and from the site, plus social profiles found while crawling |
| 🔧 Run diagnostics | `job_id`, `status`, `domain`, `pages_scraped`, `scrape_status`, `scrape_error`, `error` | Which domain was crawled, how many pages were read, and exactly why a record failed if it did |

The field worth building your workflow around is `is_role_based`. A `info@` or `contact@` address reaches a mailbox nobody owns; a named address reaches a person. Sorting your export so non-role-based addresses with a high `confidence_score` go first typically transforms reply rates on legal outreach campaigns.

***

### 🌟 Key Features of the Lawyer Email Scraper

| Feature | Description |
|---|---|
| 🔍 Niche + location search | Combine `googleMapsSearchTerm` with a list of `googleMapsLocation` values to target any legal specialism in any set of cities or regions |
| 📧 Email-only results | The scraper keeps working until it has the requested number of firms **with emails**, so records without a contactable address are not saved |
| 🌐 Multi-page site crawling | Rather than reading only a homepage, it crawls contact, about and team pages where partner addresses are usually published |
| ✅ Four-layer validation | Each address is checked for syntax, DNS records, MX records and SMTP acceptance, then scored via `confidence_score` |
| 🚫 Disposable and role detection | `is_disposable` and `is_role_based` flag throwaway domains and generic inboxes so you can filter them before import |
| ☎️ Phones and socials too | `scraped_phones` and `scraped_social_media` capture the other contact channels found on the same pages, at no extra effort |
| 🗺️ Geocoded output | `lat`, `long` and a decomposed address let you assign leads to territories or plot coverage on a map |
| 🎯 Per-location or global limits | `scrapeMaxBusinessesPerLocation` switches `maxBusinesses` between a per-city quota and a single combined total |
| 🛡️ Configurable proxy | `proxyConfiguration` accepts standard Apify proxy settings, so you control the network path used during larger runs |

***

### 🚀 Why Choose This Lawyer Email Scraper?

**Every saved record has an email.** The actor runs in email-only mode: it keeps discovering and crawling firms until it reaches your target count of businesses that actually yielded an address. You are not left filtering a spreadsheet where two thirds of the rows have an empty contact column.

**Validation is built in, not bolted on.** `syntax_valid`, `dns_valid`, `mx_valid` and `smtp_valid` are separate booleans rather than a single opaque score, so you can decide your own tolerance. Some teams accept anything with valid MX records; others insist on an SMTP-verified mailbox. Both policies are expressible from the same output.

**Firmographics and contacts arrive together.** Because each record carries `avg_rating`, `total_reviews`, `full_address` and coordinates alongside the email, you can segment by firm size and geography before you write a single line of outreach — no second enrichment step required.

**Failures are documented, not silent.** `scrape_status`, `scrape_error`, `pages_scraped` and `domain` tell you exactly what happened to every firm the scraper attempted. When a website blocks crawling or has no contact page, you see it in the data rather than wondering why a firm is missing.

***

### 📥 Input

```json
{
  "googleMapsSearchTerm": "Lawyer",
  "googleMapsLocation": ["New York", "Miami, Florida"],
  "maxBusinesses": 25,
  "scrapeMaxBusinessesPerLocation": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

#### 🔧 Lawyer Email Scraper Input Fields

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `googleMapsSearchTerm` | string | ✅ Yes | `Lawyer` | Enter the business type or niche for the email scraper (e.g., 'coffee shops', 'dentists'). |
| `googleMapsLocation` | array | ✅ Yes | `["New York"]` | Target geographic location for the email scraper (e.g., 'Miami, Florida'). |
| `maxBusinesses` | integer | No | `5` | Target number of businesses to find (1–1000). The scraper will stop when this target is reached. |
| `scrapeMaxBusinessesPerLocation` | boolean | No | `false` | If enabled, the scraper collects up to `maxBusinesses` results per location. If disabled, it combines all locations up to a single total limit. |
| `proxyConfiguration` | object | No | `{ "useApifyProxy": true }` | Proxy settings for scraping. Recommended for large-scale scraping. |

Two further options can be supplied in the JSON input for finer control: `maxPagesPerSite` (integer, default `20`) caps how many pages are crawled on each firm's website, and `validateEmails` (boolean, default `false`) turns on the DNS, MX and SMTP validation layer that populates the validity flags and `confidence_score`.

#### 💡 Input Examples

**Small test run in one city**

```json
{
  "googleMapsSearchTerm": "Lawyer",
  "googleMapsLocation": ["Chicago, Illinois"],
  "maxBusinesses": 5
}
```

**Multi-city campaign with a per-city quota**

```json
{
  "googleMapsSearchTerm": "personal injury attorney",
  "googleMapsLocation": ["Houston, Texas", "Dallas, Texas", "Austin, Texas"],
  "maxBusinesses": 50,
  "scrapeMaxBusinessesPerLocation": true,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

**Specialist niche with deeper site crawling and validation**

```json
{
  "googleMapsSearchTerm": "immigration law firm",
  "googleMapsLocation": ["London"],
  "maxBusinesses": 100,
  "maxPagesPerSite": 30,
  "validateEmails": true
}
```

***

### 📤 Output

```json
{
  "job_id": "9f1c4b2a-63de-4f88-9a17-2c0b7de41f55",
  "status": "success",
  "name": "Harper & Vance Attorneys at Law",
  "place_id": "ChIJd8BlQ2BZwokRAFUEcm_qrcA",
  "website": "https://harpervancelaw.com",
  "domain": "harpervancelaw.com",
  "phone": "+1 212-555-0148",
  "street_address": "120 Broadway, Suite 2400",
  "city": "New York",
  "state": "New York",
  "zip": "10271",
  "country_code": "US",
  "full_address": "120 Broadway, Suite 2400, New York, NY 10271, USA",
  "lat": 40.7081,
  "long": -74.0113,
  "avg_rating": 4.7,
  "total_reviews": 138,
  "emails_found": 3,
  "pages_scraped": 12,
  "email": "j.harper@harpervancelaw.com",
  "emails": ["j.harper@harpervancelaw.com", "info@harpervancelaw.com"],
  "syntax_valid": true,
  "dns_valid": true,
  "mx_valid": true,
  "smtp_valid": true,
  "is_disposable": false,
  "is_role_based": false,
  "confidence_score": 0.94,
  "scraped_phones": ["+1 212-555-0148", "+1 212-555-0192"],
  "scraped_social_media": ["https://www.linkedin.com/company/harper-vance-law"],
  "scrape_status": "completed",
  "platform": "google_maps"
}
```

#### 🧾 Lawyer Email Scraper Output Fields — Business Record

| Field | Type | Description |
|---|---|---|
| `job_id` | string | null | Identifier of the job. |
| `status` | string | null | Status of the item. |
| `name` | string | null | Name of the item. |
| `place_id` | string | null | Identifier of the place. |
| `website` | string | null | Website address. |
| `domain` | string | null | Domain name of the item. |
| `platform` | string | null | Platform the item came from. |
| `url` | string | null | Canonical URL of the scraped item. |
| `phone` | string | null | Phone number found for the item. |
| `street_address` | string | null | Street address of the item. |
| `city` | string | null | City. |
| `state` | string | null | State or region. |
| `zip` | string | null | ZIP code. |
| `country_code` | string | null | ISO country code. |
| `full_address` | string | null | Full address of the item. |
| `lat` | number | null | Latitude coordinate. |
| `long` | number | null | Long of the item. |
| `avg_rating` | number | null | Avg rating of the item. |
| `total_reviews` | integer | null | Total reviews of the item. |
| `pages_scraped` | integer | null | Pages scraped of the item. |
| `scrape_status` | string | null | Scrape status of the item. |
| `scrape_error` | string | null | Scrape error of the item. |
| `error` | string | null | Error message, if the item failed to process. |

#### 🧾 Contact & Email Validation Fields

| Field | Type | Description |
|---|---|---|
| `email` | string | null | Email address found for the item. |
| `emails` | array | null | Email addresses found for the item. |
| `emails_found` | integer | null | Emails found of the item. |
| `email_found` | string | null | Email found of the item. |
| `scraped_emails` | array | null | Scraped emails values collected for the item. |
| `_detailed_emails` | array | null | Detailed emails values collected for the item. |
| `scraped_phones` | array | null | Scraped phones values collected for the item. |
| `scraped_social_media` | array | null | Scraped social media values collected for the item. |
| `syntax_valid` | boolean | null | Identifier of the syntax valid. |
| `dns_valid` | boolean | null | Identifier of the dns valid. |
| `mx_valid` | boolean | null | Identifier of the mx valid. |
| `smtp_valid` | boolean | null | Identifier of the smtp valid. |
| `is_disposable` | boolean | null | Whether is disposable. |
| `is_role_based` | boolean | null | Whether is role based. |
| `confidence_score` | number | null | Score for confidence. |
| `validation_errors` | array | null | Validation errors values collected for the item. |

***

### 💻 How to Use the Lawyer Email Scraper (Step by Step)

#### Step 1: Define the legal niche you want to target

`googleMapsSearchTerm` is the phrase used to discover firms, and it defaults to `Lawyer`. Broad terms cast a wide net but return general practices alongside boutiques. If your offer is specific — case management software for family law, or expert witnesses for personal injury — use a matching term such as "family law attorney" or "personal injury lawyer". A precise niche produces a smaller list, but the emails in it are worth far more per row.

#### Step 2: Build your location list

`googleMapsLocation` takes an array, so a single run can cover several markets. Entries can be a city ("Chicago"), a city and state ("Miami, Florida") or a broader region. For dense metros, splitting into neighbourhoods or boroughs surfaces firms that a single city-level query would miss, because local discovery results are capped per query. Order does not matter; each location is processed in turn and the log announces which one is currently running.

#### Step 3: Choose between a global and a per-location quota

This is the pairing that most affects your results. With `scrapeMaxBusinessesPerLocation` off, `maxBusinesses` is a single combined ceiling — five locations and a limit of 100 gives you 100 firms in total, weighted towards whichever cities yield emails fastest. Switch it on and each location gets its own quota of `maxBusinesses`, which is what you want for balanced territory coverage or when you are building region-by-region campaigns.

#### Step 4: Set crawl depth and validation

`maxPagesPerSite` decides how thoroughly each firm's website is explored. Larger firms bury partner addresses on individual biography pages, so raising the depth increases yield on exactly the accounts most worth having — at the cost of longer runs. Enable `validateEmails` when the list is going into a cold outreach sequence; the DNS, MX and SMTP checks that populate `confidence_score` are what protect your sending domain reputation.

#### Step 5: Configure proxies

`proxyConfiguration` accepts standard Apify proxy settings and defaults to using Apify Proxy. For small exploratory runs the defaults are fine. For larger campaigns, or when targeting a specific country, configure the proxy group and country so requests come from a plausible network location and the run is less likely to be throttled by individual law firm websites.

#### Step 6: Run and monitor the log

Start the actor and watch the log. It reports the locations, search term, target count and per-site page limit up front, then prints running progress in the form of how many firms with emails have been found against your target for the current location. Because the scraper deliberately crawls more firms than your target — many sites simply do not publish an address — the number of businesses processed will always exceed the number saved.

#### Step 7: Filter and export the contact list

Open the dataset and filter before exporting. A typical outreach-ready filter keeps rows where `mx_valid` is true, `is_disposable` is false and `confidence_score` clears your threshold, then sorts so that `is_role_based` false rows come first. Export as CSV or XLSX for a CRM import, or pull the dataset through the API so a scheduled run feeds your sequencer automatically.

***

### 🔌 API Access & Integrations

Run the lawyer email scraper and receive the dataset in a single request:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~lawyer-email-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "googleMapsSearchTerm": "Lawyer",
    "googleMapsLocation": ["New York"],
    "maxBusinesses": 10,
    "proxyConfiguration": { "useApifyProxy": true }
  }'
```

The same call in Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run = client.actor("scrapers-hub/lawyer-email-scraper").call(run_input={
    "googleMapsSearchTerm": "personal injury attorney",
    "googleMapsLocation": ["Houston, Texas", "Dallas, Texas"],
    "maxBusinesses": 40,
    "scrapeMaxBusinessesPerLocation": True,
    "validateEmails": True,
    "proxyConfiguration": {"useApifyProxy": True},
})

for firm in client.dataset(run["defaultDatasetId"]).iterate_items():
    if firm.get("mx_valid") and not firm.get("is_role_based"):
        print(firm["name"], firm["email"], firm["confidence_score"])
```

The finished dataset connects to Zapier, Make, Google Sheets and Slack, and Apify webhooks can push each completed run straight into your CRM or outreach platform.

***

### 💡 Best Use Cases for Lawyer Contact Data

#### 📨 Cold outreach to law firms

Legal-tech vendors, insurers and expert witness networks all need to reach practising attorneys. Filter to rows where `is_role_based` is false and `smtp_valid` is true so your sequence lands with a named recipient rather than a shared inbox, and use `name` and `city` for personalisation tokens.

#### 🗺️ Territory planning for legal sales teams

`lat`, `long`, `city` and `state` let you assign every firm to a sales patch before the first call is made. Running with `scrapeMaxBusinessesPerLocation` enabled produces even coverage across your patches instead of a list dominated by whichever metro happened to yield emails fastest.

#### 🧭 Competitive and market landscape mapping

Counting firms per location and reading `avg_rating` and `total_reviews` gives you a picture of how crowded and how established a legal market is. A city with many firms but low review counts is often an early-stage market; high review volumes concentrated in a few names suggests entrenched incumbents.

#### 🎯 Recruitment and legal headhunting

Recruiters use `website`, `scraped_social_media` and `domain` to build a target list of practices, then follow the LinkedIn URLs captured during crawling to identify individual associates and partners. `total_reviews` and `avg_rating` help prioritise firms likely to be growing and hiring.

#### 🧹 CRM enrichment and data hygiene

If you already hold a list of firms, run the scraper over the same locations and match on `domain` or `place_id` to fill in missing emails, refresh phone numbers via `scraped_phones`, and correct addresses using `full_address`. `place_id` is the most stable join key because names and websites change more often.

#### 📈 Deliverability-first list building

Because `syntax_valid`, `dns_valid`, `mx_valid` and `smtp_valid` are separate flags, you can tune list quality to the sending platform you use. `validation_errors` explains why an address failed, which is useful for deciding whether a bounce risk is structural or transient.

#### 🏛️ Legal directory and marketplace population

Directories and referral marketplaces need firm records with a name, address, coordinates, website, rating and a contact route. This actor supplies all of those in one row, and `platform` plus `job_id` give you provenance metadata for each entry.

***

### ⚙️ Tips for Better Lawyer Email Scraping Results

- **Start with `maxBusinesses` at 5.** A short run confirms your search term and location strings resolve correctly before you commit to a large job. Adjust and scale only once the sample looks right.
- **Split dense metros into sub-areas.** Local discovery caps results per query, so "New York" alone will miss firms that "Brooklyn", "Queens" and "Manhattan" would each surface.
- **Raise `maxPagesPerSite` for larger firms.** Multi-partner practices publish addresses on individual biography pages rather than a single contact page, and deeper crawling is what reaches them.
- **Turn on `validateEmails` before any cold campaign.** Sending to unvalidated addresses is the fastest way to damage a sending domain; the MX and SMTP flags exist precisely to prevent that.
- **Drop role-based addresses from first-touch sequences.** Keep them as a fallback channel, but treat `is_role_based` true rows as lower priority since they rarely reach a decision maker directly.
- **Deduplicate on `domain`, not on `name`.** Multi-office firms appear once per location with different addresses but share a website, and domain-level deduplication prevents the same inbox receiving several emails.

***

### 🛠️ Troubleshooting

**The run ends immediately with a missing input error.**
Both `googleMapsSearchTerm` and `googleMapsLocation` are required. If either is empty the actor logs a missing-input error and stops without producing records. Check that the location array contains at least one non-empty string.

**Fewer firms were returned than `maxBusinesses`.**
The scraper only saves businesses that yielded an email, and it cannot exceed the pool of firms that exist for your query. Narrow niches in small towns simply run out of candidates. Broaden the search term, add more locations, or increase `maxPagesPerSite` so more sites give up an address.

**A firm has a website but no email.**
Check `pages_scraped` and `scrape_error` on that record. A low page count with an error usually means the site blocked crawling or timed out. A healthy page count with no email means the firm genuinely publishes only a contact form.

**Validation flags are all null.**
The DNS, MX and SMTP checks run only when `validateEmails` is enabled. Without it you still get the addresses themselves, but `confidence_score` and the validity booleans will not be populated.

**The run is slower than expected.**
Crawling up to `maxPagesPerSite` pages per firm, then validating each address, takes time by design. Reduce the page limit, lower `maxBusinesses`, or split a multi-city job into several parallel runs rather than one long sequential one.

***

### ❓ Frequently Asked Questions About Lawyer Email Scraping

**What does the Lawyer Email Scraper actually collect?**
Publicly listed law firm business records — name, address, coordinates, phone, website, rating and review count — plus the email addresses, phone numbers and social profiles published on those firms' own websites, together with validation results for each email.

**Can I use it for niches other than law?**
Yes. `googleMapsSearchTerm` accepts any business type, and the description explicitly gives examples like 'coffee shops' and 'dentists'. The pipeline is identical; only the search phrase changes.

**Does every result include an email address?**
Yes. The actor runs in email-only mode and continues discovering firms until it reaches your target number of businesses that produced at least one address. Firms with no discoverable email are not saved.

**How does email validation work?**
Each address is checked in layers: `syntax_valid` for format, `dns_valid` for a resolvable domain, `mx_valid` for mail exchange records, and `smtp_valid` for mailbox acceptance. Results are summarised in `confidence_score`, and any problems are itemised in `validation_errors`.

**What is the difference between `email` and `emails`?**
`email` holds the primary address chosen for the record, while `emails` is the full array of every address found on the firm's site. `emails_found` gives the count, and `_detailed_emails` carries per-address detail objects.

**How do I avoid generic inboxes like info@?**
Filter on `is_role_based`. Addresses at generic aliases are flagged true, so excluding them leaves you with named personal addresses that are far more likely to reach an individual solicitor or partner.

**Can I scrape several cities in one run?**
Yes. `googleMapsLocation` is an array. Whether `maxBusinesses` applies per city or across the whole run depends on `scrapeMaxBusinessesPerLocation`.

**Can I use my own proxies?**
Yes. `proxyConfiguration` accepts standard Apify proxy settings, including proxy groups and country selection, and defaults to using Apify Proxy.

**How many law firms can I scrape at once?**
`maxBusinesses` accepts values from 1 to 1000. With per-location mode enabled, that ceiling applies to each location separately, so a multi-city run can produce considerably more records overall.

**Is scraping lawyer emails GDPR compliant?**
The actor collects business contact details that firms publish themselves, but business emails belonging to named individuals are still personal data under the GDPR and UK GDPR. You need a lawful basis — usually legitimate interests for B2B outreach — a working opt-out, and a documented retention policy. Consult your own counsel before running outreach in the EU or UK.

**Does the scraper crawl more than a firm's homepage?**
Yes. It follows internal links up to `maxPagesPerSite` pages, which is how it reaches contact, about and attorney biography pages where addresses are usually published. `pages_scraped` records how many pages were actually read for each firm.

**Why do some records have a `scrape_error`?**
Law firm sites vary enormously in quality. Timeouts, bot protection, broken SSL certificates and JavaScript-only contact pages all produce errors, which are recorded rather than hidden so you can decide whether to retry those domains.

**Can I export the lawyer contact data to a CRM?**
Yes. Export as CSV or XLSX from the Console for a manual import, or read the dataset through the API and push it into HubSpot, Salesforce or your sequencer. Zapier and Make integrations cover the no-code path.

**How often should I re-run the lawyer email scraper?**
Firm websites and staff change slowly, so monthly or quarterly refreshes are usually sufficient for list maintenance. Re-run more often only when you are expanding into new locations or niches.

**What is `place_id` useful for?**
It is the most stable identifier in the record. Firm names get rebranded and websites get replaced, but `place_id` stays constant, which makes it the right key for deduplicating and for matching new runs against data you already hold.

***

### 🆘 Support & Feedback

Encountered a bug, or a site pattern the lawyer email scraper does not handle well? Report it on the actor's **Issues** tab so it can be tracked, reproduced and fixed.

Need something bespoke — a different discovery source, extra enrichment fields, deeper validation, or an output shape that drops straight into your CRM schema? Email **scraperhubapi@gmail.com** and describe the workflow you are building.

If this actor helps your legal lead generation, please leave a rating and a short review on the actor page. It helps other sales and marketing teams find the tool and tells us which improvements matter most.

***

### ⚖️ Disclaimer

The Lawyer Email Scraper collects only information that businesses publish publicly — local business listings and the contact details law firms put on their own websites. It does not access private accounts, bypass authentication, or retrieve anything hidden behind a login.

You are responsible for how the extracted data is used. That includes complying with the terms of service of the platforms involved, respecting robots directives and site terms, and following the marketing laws that apply where you and your recipients are located, such as CAN-SPAM in the United States, CASL in Canada and PECR in the United Kingdom.

Business email addresses that identify an individual are personal data. If you process them you act as a data controller under the GDPR, the UK GDPR, the CCPA or the equivalent regime in your jurisdiction, and you must establish a lawful basis, provide clear privacy information at first contact, honour objections and opt-outs immediately, and delete records you no longer need. Legal professionals are frequently well informed about their own data rights, so make compliance the default rather than an afterthought.

To request removal of any data collected through this actor, write to **scraperhubapi@gmail.com** with the relevant details and the request will be handled promptly.

# Actor input Schema

## `googleMapsSearchTerm` (type: `string`):

Enter the business type or niche for email scraper (e.g., 'coffee shops', 'dentists').

## `googleMapsLocation` (type: `array`):

Target geographic location for the email scraper (e.g., 'Miami, Florida').

## `maxBusinesses` (type: `integer`):

Target number of businesses to find (1-1000). The scraper will stop when this target is reached.

## `scrapeMaxBusinessesPerLocation` (type: `boolean`):

If enabled, the scraper will collect up to `maxBusinesses` results per location. If disabled, it combines all locations up to a single total limit.

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

Proxy settings for scraping. Recommended for large-scale scraping.

## Actor input object example

```json
{
  "googleMapsSearchTerm": "Lawyer",
  "googleMapsLocation": [
    "New York"
  ],
  "maxBusinesses": 5,
  "scrapeMaxBusinessesPerLocation": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Records scraped by Lawyer Email Scraper, stored in the run's default dataset.

# 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 = {
    "googleMapsSearchTerm": "Lawyer",
    "googleMapsLocation": [
        "New York"
    ],
    "maxBusinesses": 5,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers-hub/lawyer-email-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 = {
    "googleMapsSearchTerm": "Lawyer",
    "googleMapsLocation": ["New York"],
    "maxBusinesses": 5,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers-hub/lawyer-email-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 '{
  "googleMapsSearchTerm": "Lawyer",
  "googleMapsLocation": [
    "New York"
  ],
  "maxBusinesses": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapers-hub/lawyer-email-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers-hub/lawyer-email-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/Ff2TqZQN3WZEjcgO4/builds/PBzYGyjRYFjUVOLYK/openapi.json
