# Expertise.com Directory Scraper (`automation-lab/expertise-com-directory-scraper`) Actor

Scrape public Expertise.com directory pages for professional-service listings, websites, phones, ratings, addresses, and editorial ranks.

- **URL**: https://apify.com/automation-lab/expertise-com-directory-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Expertise.com Directory Scraper

Extract structured professional-service listings from public Expertise.com directory pages.

Use this actor when you need clean local lead data from Expertise.com category and city pages without manually copying provider cards.

### What This Actor Does

Expertise.com Directory Scraper reads public Expertise.com directory URLs and saves provider listings to an Apify dataset.

It is built for pages such as personal injury lawyers in Los Angeles, car accident lawyers in Los Angeles, and similar Expertise.com category/location directories.

The actor uses the public HTML returned by Expertise.com.

It does not require a login.

It does not use a browser.

It extracts structured listing data from provider JSON-LD and page context.

### Who Is It For

Local lead-generation teams use this actor to build prospect lists.

Marketing agencies use it to research service providers in a city.

SEO teams use it to compare local competitors.

Sales teams use it to collect business websites and phone numbers.

Market researchers use it to monitor category coverage by location.

### Why Scrape Expertise.com

Expertise.com curates local professional service providers across legal, home services, finance, health, and other categories.

The pages often include editorial ranking, service category, ratings, review counts, descriptions, phone numbers, and business websites.

That makes the source useful for focused B2B prospecting where a generic maps search is too broad.

### Input Sources

The recommended input is a direct Expertise.com directory page URL.

Example:

```json
{
  "startUrls": [
    "https://www.expertise.com/legal/personal-injury-lawyers/california/los-angeles"
  ],
  "maxResults": 20
}
````

Direct URLs are more reliable than generated URLs because Expertise.com category slugs can vary by vertical.

### Fallback URL Builder

The actor also accepts `category` and `location`.

Use this only when you do not already have a page URL.

The fallback creates a simple path from your text.

For production jobs, provide `startUrls`.

### Output Data

Each dataset item is one Expertise.com provider listing.

The actor stores both the original input URL and the canonical source URL.

It also stores normalized location and address fields where Expertise.com exposes them.

### Output Fields

`input_url` is the URL supplied in actor input.

`source_url` is the canonical Expertise.com directory URL.

`category` is the top-level Expertise.com category.

`vertical` is the service vertical from the page path.

`practice_area` mirrors the service vertical for legal and professional-service workflows.

`city` is the directory city.

`state` is the state abbreviation when available.

`listing_name` is the provider or firm name.

`profile_url` is the Expertise.com page anchor for the provider when available.

`website_url` is the provider website.

`phone` is the public phone number.

`address` is the combined postal address.

`locality`, `region`, and `postal_code` are address components.

`rating` and `review_count` come from Expertise.com structured ratings.

`editorial_rank` is the provider position on the page.

`listing_description` is the Expertise.com provider summary.

`awards_badges` contains tags and badges shown on the provider card.

`scraped_at` is the extraction timestamp.

### Example Output

```json
{
  "listing_name": "Law Offices of Haleh Shekarchian",
  "vertical": "personal injury lawyers",
  "city": "los angeles",
  "state": "CA",
  "website_url": "https://www.halehshekarchian.com/",
  "phone": "1-888-449-9606",
  "rating": 4.61,
  "review_count": 222,
  "editorial_rank": 1
}
```

### How To Run

Create a new run.

Paste one or more Expertise.com directory URLs into `startUrls`.

Set `maxResults` to the number of listings you want.

Start the actor.

Download the dataset as JSON, CSV, Excel, XML, or HTML from Apify.

### Input Tips

Start with one URL while validating a category.

Use `maxResults` to cap small tests.

Increase `maxPages` only if Expertise.com shows pagination for the directory.

Use direct URLs copied from Expertise.com for best coverage.

Avoid mixing unrelated city/category pages in one run if you need a clean segment.

### Pricing

This actor uses pay-per-event pricing.

There is a small run-start event and a per-listing result event.

The final platform price is calibrated from cloud run costs before QA approval.

Small test runs with low `maxResults` keep costs predictable.

### Performance

The actor is HTTP-first.

It avoids browser automation because Expertise.com exposes listing data in server-rendered HTML.

That keeps memory requirements low.

The default memory target is suitable for normal directory pages.

### Data Quality

The extractor prefers JSON-LD `LocalBusiness` records because they are structured and stable.

Page metadata supplies category, vertical, city, and state context.

Provider article attributes supply editorial rank.

Duplicate listings are skipped within a run.

### Common Use Cases

Build a city-specific attorney prospect list.

Research competing providers in a local service category.

Collect provider websites for enrichment.

Compare ratings and review counts in a market.

Monitor which providers appear on Expertise.com over time.

### API Usage

You can run this actor through the Apify API.

Send JSON input with `startUrls`, `maxResults`, and optional retry/page limits.

Read results from the default dataset after the run succeeds.

Node.js example:

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('automation-lab/expertise-com-directory-scraper').call({
  startUrls: [
    'https://www.expertise.com/legal/personal-injury-lawyers/california/los-angeles',
  ],
  maxPages: 1,
  maxResults: 20,
});

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

Python example:

```python
from apify_client import ApifyClient
import os

client = ApifyClient(os.environ["APIFY_TOKEN"])

run = client.actor("automation-lab/expertise-com-directory-scraper").call(run_input={
    "startUrls": [
        "https://www.expertise.com/legal/personal-injury-lawyers/california/los-angeles",
    ],
    "maxPages": 1,
    "maxResults": 20,
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

cURL example:

```bash
curl "https://api.apify.com/v2/acts/automation-lab~expertise-com-directory-scraper/runs?token=$APIFY_TOKEN" \
  -H "content-type: application/json" \
  -d '{
    "startUrls": ["https://www.expertise.com/legal/personal-injury-lawyers/california/los-angeles"],
    "maxPages": 1,
    "maxResults": 20
  }'
```

### Integrations

Use Apify datasets with Google Sheets, Make, Zapier, n8n, webhooks, or your own API client.

The output field names are stable and snake\_case for downstream processing.

### MCP And Agents

AI agents can call the actor to collect local provider data before enrichment, qualification, or outreach planning.

Use low `maxResults` for interactive agent workflows.

Use larger runs for batch exports.

Claude Desktop example command:

```bash
claude mcp add apify -- npx -y @apify/actors-mcp-server --actors automation-lab/expertise-com-directory-scraper
```

MCP JSON configuration:

```json
{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "automation-lab/expertise-com-directory-scraper"
      ],
      "env": {
        "APIFY_TOKEN": "your-apify-token"
      }
    }
  }
}
```

Example prompts:

- "Find Expertise.com personal injury lawyer listings in Los Angeles and summarize the providers with websites and ratings."
- "Run the Expertise.com Directory Scraper for this directory URL and return firms with phone numbers."
- "Compare the top-ranked providers across two Expertise.com legal categories."

### Legality

Only public Expertise.com pages are scraped.

Respect Expertise.com, applicable law, and downstream contact rules.

Do not use scraped data for spam.

If you combine results with outreach tools, follow consent, privacy, and anti-spam requirements in your jurisdiction.

### Limitations

The actor cannot access private or logged-in data.

It only extracts fields present in public page HTML.

Some provider cards may hide websites or phones.

Fallback URL generation may not match every Expertise.com category slug.

Use direct `startUrls` for reliable production runs.

### Troubleshooting

If a run returns zero items, verify the URL is an Expertise.com directory page.

If the page redirects, use the canonical URL after the redirect.

If a field is empty, Expertise.com may not expose that value for the listing.

If a category path changes, copy a fresh URL from Expertise.com.

### FAQ

Can this actor scrape any Expertise.com page?

It is designed for public category/location directory pages with provider listings.

Does it use residential proxies?

No proxy is required for the tested public pages.

Does it enrich emails?

No. It extracts public listing fields only.

Can I scrape several cities at once?

Yes. Add multiple URLs to `startUrls`.

Will it return the provider website?

Yes, when Expertise.com exposes it in the listing structured data.

### Related Actors

Use Google Maps lead tools when you need broader business discovery.

Use website contact enrichment tools when you need emails from extracted provider websites.

Use directory-specific actors when you need fields unique to another source.

### Changelog

Initial version extracts Expertise.com provider listings with JSON-LD-first parsing, page context, rank, badges, contact fields, and ratings.

# Actor input Schema

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

Direct Expertise.com category/location pages, for example a city page for personal injury lawyers, plumbers, accountants, or other local service categories.

## `category` (type: `string`):

Professional service category used only when no start URL is provided.

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

City or location used only when no start URL is provided.

## `maxPages` (type: `integer`):

Maximum number of paginated directory pages to inspect per start URL.

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

Maximum number of listings to save across all input pages.

## `maxRequestRetries` (type: `integer`):

Retry attempts for failed HTTP requests.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.expertise.com/legal/personal-injury-lawyers/california/los-angeles"
  ],
  "maxPages": 1,
  "maxResults": 20,
  "maxRequestRetries": 3
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        "https://www.expertise.com/legal/personal-injury-lawyers/california/los-angeles"
    ],
    "category": "",
    "location": "",
    "maxPages": 1,
    "maxResults": 20,
    "maxRequestRetries": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/expertise-com-directory-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": ["https://www.expertise.com/legal/personal-injury-lawyers/california/los-angeles"],
    "category": "",
    "location": "",
    "maxPages": 1,
    "maxResults": 20,
    "maxRequestRetries": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/expertise-com-directory-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 '{
  "startUrls": [
    "https://www.expertise.com/legal/personal-injury-lawyers/california/los-angeles"
  ],
  "category": "",
  "location": "",
  "maxPages": 1,
  "maxResults": 20,
  "maxRequestRetries": 3
}' |
apify call automation-lab/expertise-com-directory-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Expertise.com Directory Scraper",
        "description": "Scrape public Expertise.com directory pages for professional-service listings, websites, phones, ratings, addresses, and editorial ranks.",
        "version": "0.1",
        "x-build-id": "86bhb0ANklJ4rqO7T"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~expertise-com-directory-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-expertise-com-directory-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/automation-lab~expertise-com-directory-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-expertise-com-directory-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/automation-lab~expertise-com-directory-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-expertise-com-directory-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrls": {
                        "title": "Expertise.com directory URLs",
                        "type": "array",
                        "description": "Direct Expertise.com category/location pages, for example a city page for personal injury lawyers, plumbers, accountants, or other local service categories.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "category": {
                        "title": "Category fallback",
                        "type": "string",
                        "description": "Professional service category used only when no start URL is provided."
                    },
                    "location": {
                        "title": "Location fallback",
                        "type": "string",
                        "description": "City or location used only when no start URL is provided."
                    },
                    "maxPages": {
                        "title": "Max pages",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum number of paginated directory pages to inspect per start URL.",
                        "default": 3
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of listings to save across all input pages.",
                        "default": 50
                    },
                    "maxRequestRetries": {
                        "title": "Max request retries",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Retry attempts for failed HTTP requests.",
                        "default": 3
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
