# Expertise Scraper \[$1.6💰] | Lawyers | CPAs | Local Leads (`ahmed_jasarevic/expertise-scraper`) Actor

Scrapes ranked 'best in city' professionals (lawyers, CPAs, contractors, agencies) from expertise.com with business name, website, phone, address, ratings, review counts, Google/Yelp/Facebook/Avvo profiles, license and rank. $0.0016 per record.

- **URL**: https://apify.com/ahmed\_jasarevic/expertise-scraper.md
- **Developed by:** [Ahmed Jasarevic](https://apify.com/ahmed_jasarevic) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 1,000 results

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Expertise Scraper \[$0.0016💰/result] — Ranked "Best in City" Professionals & Local Business Leads

Scrape **ranked "best in city" professionals** from [expertise.com](https://www.expertise.com) — lawyers, CPAs, contractors, agencies and more across 200+ categories and thousands of US cities. Each record includes the business name, website, phone, address, rating, review counts, Google/Yelp/Facebook/Avvo profiles, license details and its **rank on the page** — perfect for **local business leads**, **law firm lead generation**, **contractor leads** and **CPA directory data**.

The actor runs on the [Apify platform](https://apify.com) — you get **API access, scheduling, webhooks, integrations (Zapier, Make, Google Sheets)** and monitoring out of the box. Pricing is **pay-per-result**: just **$0.0016 per provider record** — no minutes, no hidden compute charges.

### Why use Expertise Scraper? Use cases

- **Lead generation**: build targeted prospect lists of top-rated local professionals with contact details and review profiles — ideal for **local lead generation**, **B2B local leads** and **telemarketing leads databases**.
- **Legal marketing data**: track which personal injury, family or real estate law firms rank #1 in each city and how their ratings evolve — a ready-made **lawyer database** and **law firm leads** source.
- **Financial verticals**: CPA firms, tax accountants and business consultants by city — reliable **CPA leads** and **tax accountant leads**.
- **Home services**: contractors, renovators and home improvement pros with license details — quality **contractor leads** and **licensed contractors data**.
- **Competitive & market research**: compare pricing, licensing and team size across verticals and geographies; maintain **ranked professionals data** and **business leads databases**.
- **Cheap & fast**: the actor reads the structured data already embedded in the page (no browser rendering), so runs are fast and cost almost nothing.

### How to use Expertise Scraper

1. Open the actor's **Input** tab.
2. Either paste one or more **Start URLs** (e.g. `https://www.expertise.com/legal/personal-injury-lawyers/texas/houston`), or leave them empty and let the actor **discover** directory pages from the category sitemaps (optionally filtered by category, state and city).
3. Set **Max Items** (how many provider records to output) and **Max Requests per Crawl** (how many directory pages to fetch — each page yields up to 20 ranked providers).
4. Click **Run** and download the dataset as JSON, HTML, CSV or Excel.

### How to scrape "best in city" professionals data from expertise.com

expertise.com has **no public API**, so the only way to get its ranked "best in city" professional data programmatically is by scraping. The site loads each provider as structured data embedded in the page (Next.js flight payload) plus rendered HTML cards. This actor extracts both: it reads the embedded structured payload for full provider details and merges in the rank, slug and featured flag from the rendered `<article>` cards. Because it uses plain HTTP (CheerioCrawler) instead of a headless browser, scraping expertise.com with this actor is cheap, fast and reliable.

Discover every 4-segment directory URL (`/category/vertical/state/city`) from the category sitemaps — the legal sitemap alone contains roughly 10,000 city/category pages.

### Input

| Field | Type | Description |
|-------|------|-------------|
| `startUrls` | array | City/category directory URLs to scrape directly. |
| `categories` | array | Filter sitemap discovery: `legal`, `finance`, `home-improvement`, `business`, `insurance`. Empty = all. |
| `states` | array | Filter discovery to state slugs (e.g. `texas`, `california`). Empty = all. |
| `cities` | array | Filter discovery to city slugs (e.g. `houston`, `los-angeles`). Empty = all. |
| `maxItems` | integer | Max provider records to output (default 100). |
| `maxRequestsPerCrawl` | integer | Max directory pages to fetch (default 100). |
| `proxy` | object | Standard Apify proxy picker (off by default). |

### Example input (JSON)

```json
{
  "startUrls": [
    { "url": "https://www.expertise.com/legal/personal-injury-lawyers/texas/houston" }
  ],
  "categories": ["legal"],
  "states": ["texas", "california"],
  "maxItems": 100,
  "maxRequestsPerCrawl": 50
}
```

### Output

Each dataset item is one ranked provider:

```json
{
  "rank": 1,
  "providerId": 315131,
  "businessName": "Zehl & Associates, PC",
  "website": "https://www.zehllaw.com",
  "phone": "713-491-6064",
  "address": "2700 Post Oak Blvd Ste 1000",
  "city": "Houston",
  "state": "TX",
  "zipCode": "77056",
  "rating": 4.99,
  "reviewCount": 1129,
  "googleProfile": "https://www.google.com/maps/place/...",
  "googleRating": "5",
  "googleReviewCount": 1103,
  "facebookProfile": "https://www.facebook.com/ZehlAssociates/",
  "yelpProfile": "https://www.yelp.com/biz/zehl-and-associates-houston-2",
  "avvoProfile": "https://www.avvo.com/attorneys/77056-tx-ryan-zehl-90253.html",
  "licenseNumber": null,
  "members": [
    { "name": "Ryan Zehl - Partner", "licenseDate": "2004-11-05T00:00:00.000Z" }
  ],
  "tags": ["Commercial Vehicle Accidents", "General Negligence"],
  "category": "legal",
  "vertical": "personal-injury-lawyers",
  "stateSlug": "texas",
  "citySlug": "houston",
  "pageUrl": "https://www.expertise.com/legal/personal-injury-lawyers/texas/houston"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Data fields

| Field | Description |
|-------|-------------|
| `rank` | Position of the provider on the directory page (1 = best). |
| `businessName`, `website`, `phone` | Contact details. |
| `address`, `city`, `state`, `zipCode` | Location details. |
| `rating`, `reviewCount` | Overall score and total reviews. |
| `googleProfile`, `googleRating`, `googleReviewCount` | Google Maps profile + rating. |
| `facebookProfile`, `facebookRating`, `facebookReviewCount` | Facebook page + rating. |
| `yelpProfile`, `yelpRating`, `yelpReviewCount` | Yelp profile + rating. |
| `avvoProfile`, `findLawProfile`, `justiaProfile` | Legal-directory profiles (when present). |
| `licenseNumber`, `licenseStatus`, `licensingBody` | License details (when published). |
| `members` | Team members with license dates. |
| `tags`, `description`, `price` | Category tags, snippet and price level. |
| `boosted`, `listingType`, `featured`, `profileSlug` | Listing metadata. |
| `category`, `vertical`, `stateSlug`, `citySlug`, `pageUrl` | Page context. |

### How much does it cost to scrape expertise.com?

The actor uses **CheerioCrawler** (plain HTTP, no browser) and reads the structured provider data already embedded in each page, so it is very cheap. Billing is **PAY\_PER\_EVENT — $0.0016 per provider record** plus a tiny $0.00005 actor-start fee. A single directory page (20 providers) bills roughly **$0.032**. Free Apify accounts get a capped preview (10 items per run); paid accounts run unlimited.

### Tips

- **Discover everything**: leave `startUrls` empty and use `categories`/`states`/`cities` filters to crawl entire verticals. The legal sitemap alone contains roughly 10,000 city/category pages.
- **Cap your runs**: set `maxItems` to the number of leads you actually need — each page yields up to 20 providers.
- **Proxy**: expertise.com does not require a proxy for normal volumes. Turn on the Apify proxy only if you hit rate limits on very large crawls.
- **Save money**: since billing is per result, `maxItems` is your cost cap. Start small, verify the data, then scale.

### Integrations & scheduling

Like every Apify actor, this one works out of the box with:

- **API access** — call it via REST, JavaScript, Python, Python Async Playwright, PHP, or crawlee clients.
- **Schedules** — run daily/weekly to keep your **local business leads** fresh.
- **Zapier / Make / Google Sheets / Airbyte** — push provider records straight into your CRM or spreadsheet.
- **Webhooks** — trigger downstream workflows when a run finishes.

### Related actors

- [**Yelp Review Scraper (tri\_angle/yelp-review-scraper)**](https://apify.com/tri_angle/yelp-review-scraper) — scrape Yelp reviews and business profiles to enrich your **local lead lists**.
- [**Avvo Scraper (solidcode/avvo-scraper)**](https://apify.com/solidcode/avvo-scraper) — attorney profiles and reviews from Avvo, another source of **law firm leads** and **lawyer database** data.
- [**Angi Scraper (ahmed\_jasarevic/angi-scraper)**](https://apify.com/ahmed_jasarevic/angi-scraper) — contractor and home service provider leads from Angi.
- [**HomeAdvisor Scraper (ahmed\_jasarevic/homeadvisor-scraper)**](https://apify.com/ahmed_jasarevic/homeadvisor-scraper) — contractor leads from HomeAdvisor.
- [**BuildZoom Scraper (ahmed\_jasarevic/buildzoom-scraper)**](https://apify.com/ahmed_jasarevic/buildzoom-scraper) — licensed contractors data with license and permit details.

### FAQ

- **Does expertise.com have an official API?** No. expertise.com does not offer a public API, so scraping is the standard way to get its ranked professional data programmatically.
- **Is there an alternative to expertise.com?** Yes — providers like Yelp, Avvo, Thumbtack, Angi and Houzz rank professionals too. Scrape them with the dedicated actors listed above and merge the datasets.
- **Is this legal?** Scraping publicly available business information is generally permitted, but you are responsible for complying with expertise.com's terms of service and applicable laws. This actor is provided as-is.
- **Known limitations**: provider profile pages (`/profile/...`) are only available for a small number of featured businesses, so `profileSlug` is best-effort. License fields are only present when expertise.com publishes them for that category.
- **Support**: open an issue on the actor's Issues tab or contact us for custom modifications (e.g. different output format, additional fields, or scheduled runs).

### SEO keywords

expertise scraper, scrape expertise.com, expertise.com data, expertise.com alternative, best-in-city professionals, local business leads, local lead generation, law firm leads, lawyer database, cpa leads, cpa directory, contractor leads, contractor directory, licensed contractors data, home service professionals data, legal marketing data, ranked professionals data, business leads database, professional services directory, local business data, best personal injury lawyers, family lawyers data, real estate lawyers data, tax accountant leads, business consulting firms data

### For AI agents & LLM apps

This actor is ideal as a tool for AI agents and RAG pipelines. The output is clean, structured JSON — one object per provider with a consistent schema (see **Output** above), ready to feed into a vector store or a company database.

**Minimal input to get results:**

```json
{
  "startUrls": [{ "url": "https://www.expertise.com/legal/personal-injury-lawyers/texas/houston" }],
  "maxItems": 100
}
```

**Billing**: $0.0016 USD per provider record (pay-per-result) + $0.00005 actor start. No charge for empty results on invalid URLs beyond the start fee. Set `maxItems` to bound each call — it doubles as your cost cap.

### Legal & compliance disclaimer

This actor is an independent tool and is **not affiliated with, endorsed by, or connected to expertise.com**. "Expertise" and the target website are trademarks of their respective owners. Scraping publicly available business data is generally allowed, but you are responsible for complying with expertise.com's Terms of Service, robots.txt and all applicable laws (including data-protection rules). Use the data only for legitimate purposes — prospect research, market analysis and competitor tracking. This actor and its output are provided "as is", without warranty of any kind.

# Actor input Schema

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

City/category directory URLs to scrape, e.g. https://www.expertise.com/legal/personal-injury-lawyers/texas/houston. If empty, the actor discovers directory URLs from the category sitemaps.

## `categories` (type: `array`):

Filter discovery to these category sitemaps: legal, finance, home-improvement, business, insurance. Empty = all categories.

## `states` (type: `array`):

Filter discovery to these states (URL slugs, e.g. texas, california, new-york). Empty = all states.

## `cities` (type: `array`):

Filter discovery to these cities (URL slugs, e.g. houston, los-angeles). Empty = all cities.

## `maxItems` (type: `integer`):

Maximum number of provider records to output. Each directory page yields up to 20 ranked providers.

## `maxRequestsPerCrawl` (type: `integer`):

Maximum number of directory pages to fetch (each yields up to 20 providers).

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.expertise.com/legal/personal-injury-lawyers/texas/houston"
    }
  ],
  "categories": [],
  "states": [],
  "cities": [],
  "maxItems": 100,
  "maxRequestsPerCrawl": 100,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.expertise.com/legal/personal-injury-lawyers/texas/houston"
        }
    ],
    "categories": [],
    "states": [],
    "cities": [],
    "proxy": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmed_jasarevic/expertise-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": [{ "url": "https://www.expertise.com/legal/personal-injury-lawyers/texas/houston" }],
    "categories": [],
    "states": [],
    "cities": [],
    "proxy": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("ahmed_jasarevic/expertise-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 '{
  "startUrls": [
    {
      "url": "https://www.expertise.com/legal/personal-injury-lawyers/texas/houston"
    }
  ],
  "categories": [],
  "states": [],
  "cities": [],
  "proxy": {
    "useApifyProxy": false
  }
}' |
apify call ahmed_jasarevic/expertise-scraper --silent --output-dataset

```

## MCP server setup

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