# Attorney Email Scraper (`scraperoka/attorney-email-scraper`) Actor

📩 Attorney Email Scraper extracts verified attorney emails from public sources for B2B outreach. Fast, accurate, and privacy-conscious ✅ Perfect for lead generation, legal marketing, and targeted campaigns. 🚀 Enhance your pipeline in minutes.

- **URL**: https://apify.com/scraperoka/attorney-email-scraper.md
- **Developed by:** [Scraperoka](https://apify.com/scraperoka) (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 $1.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

### Attorney Email Scraper 📬

**Attorney Email Scraper** helps you find attorneys and extract their contact information from publicly available sources—so you can build an attorney contact database without spending days manually searching. It’s a **legal email scraper** designed for use cases like targeted attorney email scraping and finding attorney email addresses at scale. Whether you’re a marketer, researcher, or data analyst, this tool makes it easier to compile an attorney outreach email list by combining business discovery with website contact extraction, saving you hours of manual work.

***

### Why choose Attorney Email Scraper?

| Feature | Benefit |
|---|---|
| ✅ All-in-one workflow (business discovery → website contact extraction) | Extracts emails, phone numbers, and social media profiles in one run |
| ✅ Reliability-focused scraping with retries and fallbacks | Helps keep results flowing even when some pages are hard to access |
| ✅ Structured, dataset-ready output | Saves consistent fields like `name`, `website`, `scraped_emails`, and `scrape_status` for easy analysis |
| ✅ Scale-friendly targeting with limits | Stops when you reach your requested number of businesses with emails |
| ✅ Built-in proxy support for reliable scraping | Improves robustness for larger batches and helps reduce scraping interruptions |
| ✅ Real-time dataset saving | Pushes results to the Apify dataset immediately while it runs |

***

### Key features

- 🔍 **Attorney-focused business discovery**: Uses your `googleMapsSearchTerm` and `googleMapsLocation` inputs to target relevant businesses.
- 📧 **Email harvesting from websites**: Extracts email addresses and supports email harvesting tool for lawyers workflows.
- 📞 **Phone and social media extraction**: Pulls `scraped_phones` and `scraped_social_media` alongside scraped emails.
- 🧠 **Smart limits for results**: Lets you control `maxBusinesses` and (optionally) apply the limit per location for controlled attorney prospecting email tool runs.
- 🛡️ **Proxy resilience**: Supports `proxyConfiguration` so you can run more reliably at larger scale.
- 🔄 **Resilience for difficult sites**: Includes retries and fallbacks to improve completion rates across different domains.
- 💾 **Immediate dataset saving**: Pushes each scraped business (and per-email rows when emails are found) into the output dataset as it goes.
- 📊 **Dataset fields built for analysis**: Includes location and scoring-style fields like `avg_rating`, `total_reviews`, `lat`, `long`, and `place_id`.

***

### Input

Provide input via an `input.json` file. Example structure:

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

#### Input Fields

| Field | Required | Description |
|---|---:|---|
| `googleMapsSearchTerm` | Yes | Business type or niche for the email scraper (for example, “Attorney”). |
| `googleMapsLocation` | Yes | Target geographic location(s) as a list (for example, “New York”). |
| `maxBusinesses` | No | Maximum number of businesses to find (range: 1–1000). The actor stops when it reaches the target number. |
| `scrapeMaxBusinessesPerLocation` | No | If enabled, it collects up to `maxBusinesses` results **per location**; if disabled, it combines locations up to a single total limit. |
| `proxyConfiguration` | No | Proxy settings for scraping. Recommended for larger-scale runs. You can enable Apify proxy with `proxy support`. |
| `proxyConfiguration.proxy support` | No | When set to `true`, the actor uses Apify proxy (configured as prefilled by default). |

***

### Output

The actor saves results into an Apify dataset (JSON rows). Each dataset row includes the business details plus extracted contact information.

#### Example output JSON (dataset rows)

```json
{
  "name": "Example Law Firm",
  "website": "https://examplelawfirm.com/",
  "phone": "+1-555-123-4567",
  "full_address": "123 Main St Exampletown NY 10001 US",
  "city": "Exampletown",
  "state": "NY",
  "zip": "10001",
  "country_code": "US",
  "scraped_emails": ["info@examplelawfirm.com"],
  "scraped_phones": ["+1-555-111-2222"],
  "scraped_social_media": ["https://www.linkedin.com/company/examplelawfirm/"],
  "emails_found": 1,
  "pages_scraped": 5,
  "avg_rating": 4.6,
  "total_reviews": 128,
  "lat": 40.7128,
  "long": -74.006,
  "place_id": "ChIJN1t_tDeuEmsRUsoyG83frY4",
  "scrape_status": "success"
}
```

> Note: When emails are found, the actor flattens output so you may see one row per email with an `email_found` field instead of `scraped_emails`.

#### Output Fields

| Field | Type | Description |
|---|---|---|
| `name` | string | Business name. |
| `website` | string | Business website URL (if available). |
| `phone` | string | Phone number from the business record (if available). |
| `full_address` | string | Full address string. |
| `city` | string | City portion of the address. |
| `state` | string | State/region portion of the address. |
| `zip` | string | ZIP/postal code. |
| `country_code` | string | Country code. |
| `scraped_emails` | array | Emails extracted from the business website (empty array if none). |
| `scraped_phones` | array | Phone numbers extracted from the business website. |
| `scraped_social_media` | array | Social media profile links extracted from the business website. |
| `emails_found` | number | Count of emails found on the scraped website. |
| `pages_scraped` | number | Number of processed pages/URLs during website scraping. |
| `avg_rating` | number | Average rating value from the business listing data. |
| `total_reviews` | number | Total review count from the business listing data. |
| `lat` | number | Latitude value for the business location. |
| `long` | number | Longitude value for the business location. |
| `place_id` | string | Place identifier from the business listing data. |
| `scrape_status` | string | Status of the scraping workflow for that row (e.g., `success`, `failed`, `no_website`, `error`). |
| `email_found` | string | The specific email for that flattened row (present when the actor outputs per-email rows). |
| `scrape_error` | string | Error details when the scrape fails (`scrape_status` indicates failure). |

You can export dataset results from Apify as JSON and CSV.

***

### How to use Attorney Email Scraper (via Apify Console)

1. **Open Apify Console**\
   Go to [console.apify.com](https://console.apify.com) and sign in.

2. **Find the actor**\
   Search for **Attorney Email Scraper** in the Actors marketplace.

3. **Open the Input panel**\
   Click the **Input** section and fill in:
   - `googleMapsSearchTerm`
   - `googleMapsLocation` (use a list)

4. **Set your result limits**\
   Adjust `maxBusinesses` to control how many businesses you want. If you’re running multiple locations, choose whether to enable `scrapeMaxBusinessesPerLocation`.

5. **(Optional) Configure proxies**\
   In `proxyConfiguration`, enable `proxy support` if you want the actor to use Apify proxy support for more reliable scraping.

6. **Click Run**\
   Start the actor. You’ll see progress in the logs and dataset rows will be pushed as contact information is extracted.

7. **Review the dataset output**\
   After the run, open the **OUTPUT** tab to view the dataset:
   - Each row includes business fields plus extracted contact fields like `scraped_emails`, `scraped_phones`, and `scraped_social_media`.

8. **Export your results**\
   Export to JSON or CSV for your attorney contact database, legal email scraper pipeline, or downstream analysis.

No coding required—get accurate attorney email scraper results in minutes.

***

### Advanced features & SEO optimization

- 🏛️ **Built for attorney email outreach lists**: Designed specifically for finding attorney email addresses and building a legal industry email database from business and website sources.
- 🌐 **Public-web contact extraction**: Extracts emails and additional contact details from websites for each discovered business, supporting attorney lead email list creation.
- 🛡️ **Proxy resilience for scraping at scale**: Uses your `proxyConfiguration` to improve reliability and reduce interruptions during larger scraping tasks.
- 🧾 **Flattened dataset rows when emails are found**: Supports both “scraped lists” and per-email rows (including `email_found`) so CRM import workflows can be easier.
- 📊 **Rich structured location fields**: Output includes `full_address`, `city`, `state`, `zip`, `lat`, `long`, and `place_id`—useful for segmentation and analysis.

***

### Best use cases

- 📈 **Lead generation for law firms**: Build an attorney outreach email list with emails scraped from websites.
- 🧪 **Market research and competitive analysis**: Compare law firms by location using `avg_rating`, `total_reviews`, `city`, and `state` alongside contacts.
- 🎯 **Sales prospecting**: Generate targeted attorney email scraping results for B2B outreach with an attorney contact database.
- 🗂️ **Research teams & analysts**: Export structured rows (including `lat`, `long`, `place_id`) for geospatial or segmentation analysis.
- 🧑‍💻 **Data pipeline builders**: Use the dataset fields to enrich lists with `scraped_phones` and `scraped_social_media` for higher-touch outreach.
- ✉️ **Email marketing ops**: Combine contact emails with business metadata to automate campaign list creation (starting from publicly available data).

***

### Technical specifications

- **Supported Input Formats**
  - ✅ `googleMapsSearchTerm` (string)
  - ✅ `googleMapsLocation` (array of strings)
  - ✅ `maxBusinesses` (integer 1–1000)
  - ✅ `scrapeMaxBusinessesPerLocation` (boolean)
  - ✅ `proxyConfiguration` (object, including `proxy support`)

- **Proxy Support**
  - ✅ `proxyConfiguration` supported via the Apify proxy option (`proxy support` prefilled to `true`).

- **Retry Mechanism**
  - ✅ Includes retries and fallbacks for resilient scraping behavior (to improve success across different domains).

- **Dataset Structure**
  - ✅ Business-level fields + scraped contact fields
  - ✅ Includes `scraped_emails`, `scraped_phones`, `scraped_social_media`, plus counts like `emails_found` and `pages_scraped`
  - ✅ Includes status via `scrape_status` and failure details via `scrape_error` when applicable
  - ✅ May include per-email flattened rows via `email_found`

- **Rate Limits & Performance**
  - ✅ Controlled by batching limits (`maxBusinesses`, and optionally per-location behavior)

- **Limitations**
  - ❌ If a business has no website, the actor will mark `scrape_status` as `no_website` and there will be no scraped contacts from a website.
  - ❌ Some websites may not expose contact information publicly, resulting in `scrape_status` of `failed` or empty `scraped_emails`.

***

### FAQ

#### Does Attorney Email Scraper only work for attorneys?

✅ Yes—this actor is intended for attorney-focused business discovery using the `googleMapsSearchTerm` you provide (prefilled to “Attorney”) and targeted location(s) via `googleMapsLocation`.

#### What contact details does Attorney Email Scraper extract?

✅ It extracts email addresses into `scraped_emails`, plus phone numbers and social media profile links into `scraped_phones` and `scraped_social_media`. It also outputs counts like `emails_found` and `pages_scraped`.

#### Do I get results per business or per email?

✅ Both patterns can appear in the dataset. When emails are found, the actor flattens output so you may see one row per email using `email_found`. Business-level fields still include the context (like `name`, `website`, `place_id`, and `scrape_status`).

#### Can I control how many businesses are scraped?

✅ Yes. Use `maxBusinesses` to set the overall target. If you enable `scrapeMaxBusinessesPerLocation`, the actor targets up to `maxBusinesses` per location instead of a single combined total.

#### Is proxy support available for Attorney Email Scraper?

✅ Yes. You can configure `proxyConfiguration` and enable `proxy support` for more reliable scraping at scale.

#### Can the actor validate emails before saving?

✅ You can control email validation via the input (internally referenced as `validateEmails`). If enabled, it supports validation behavior; dataset rows still include `scraped_emails` and `emails_found`.

#### Is the data sourced from publicly available sources?

✅ Yes. The actor collects information from **publicly available sources**. It does not access private, authenticated, or password-protected content.

***

### Support & feature requests

If you’re using Attorney Email Scraper and want improvements (for example, exporting formats or CRM-friendly tweaks), we’d love your feedback.

- 💡 **Feature Requests**: Share concrete enhancements like CSV-ready fields, additional normalization options, or different flattening behavior for `email_found`.
- 📧 **Contact**: Send a message to <dataforleads@gmail.com>.

User feedback directly shapes what we build next for Attorney Email Scraper.

***

### Disclaimer

**This tool only accesses publicly available sources.** It does not access private profiles, authenticated data, or password-protected pages. It’s your responsibility to comply with applicable laws (including GDPR/CCPA where relevant), spam regulations, and each website’s terms of service.

For data removal requests, contact <dataforleads@gmail.com>. Use Attorney Email Scraper responsibly, ethically, and for legitimate purposes only.

*Get the most comprehensive Attorney Email Scraper results—SEO-optimized, dataset-ready, and built for scaling attorney lead generation.*

# 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": "Attorney",
  "googleMapsLocation": [
    "New York"
  ],
  "maxBusinesses": 5,
  "scrapeMaxBusinessesPerLocation": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

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

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

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

```

## MCP server setup

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