Skip to main content
skill CX Codex

finding-law-firms-via-google-search — Claude Code skill: setup

Finds law firms via Google Search using apidojo's Apify scraper actor. Gathers websites and snippets to build prospect lists for LegalTech and B2B vendors.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add apidojo-io/apidojo-skills --skill finding-law-firms-via-google-search -a claude-code
Open on GitHub

What finding-law-firms-via-google-search does

The skill targets legal practices through Google queries. Searches execute through the apidojo/google-search-scraper actor on Apify. Inputs accept searchTerms, a countryCode like US, and maxPagesPerQuery. You can invoke it directly via node scripts/run_actor.js or the Apify REST API.

Results undergo weighted scoring using legal signals, domain checks, and search rank. Scores at or above 0.70 receive the PRIME_PROSPECT tier. Directories like Avvo or FindLaw are discarded.

Search snippets include website URLs and short text snippets. It provides no direct phone numbers. Teams planning sales outreach will need additional tools to find email addresses. Running queries requires an Apify account and $APIFY_TOKEN.

What it helps with

  • discover legal practices across specific practice areas and cities
  • filter aggregator directories like FindLaw or Avvo out of search results
  • rank prospects into priority tiers using keyword and position scoring
  • export legal firm domains and snippets directly to CSV or JSON

Example prompts for the agent

  • Find personal injury law firms in Dallas via Google and save to results.csv
  • Search for corporate law offices in the US and score the prospects
  • Compile a list of family law attorneys in Chicago using Google Search

How to install finding-law-firms-via-google-search

1Skills CLI (Vercel)

npx skills add apidojo-io/apidojo-skills --skill finding-law-firms-via-google-search -a claude-code

2Manually: put the files in place

~/.claude/skills/finding-law-firms-via-google-search/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/finding-law-firms-via-google-search/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about finding-law-firms-via-google-search

How to install finding-law-firms-via-google-search in Claude Code?

Run npx skills add apidojo-io/apidojo-skills --skill finding-law-firms-via-google-search -a claude-code.

What does finding-law-firms-via-google-search do?

It queries Google via an Apify scraping actor to harvest law firm domains and snippets, filtering out directories and scoring leads from tier A to C.

Does the skill export direct contact emails and phone numbers?

No, the scraper collects search engine results consisting only of firm names, URLs, and snippets. Email addresses and phone numbers require secondary enrichment tools.

Source text

SKILL.md · Apache-2.0
---
name: finding-law-firms-via-google-search
description: >
  Finds law firms and legal practices via Google Search using apidojo's Google Search Scraper
  on Apify. Triggers when the user asks to: find law firms for sales outreach, discover legal
  practices in a specific city, build a list of attorneys or law offices via Google, find personal
  injury or corporate law firms for vendor prospecting, search for law firms by specialty and
  location, identify solo practitioners or large law offices, or compile a law firm contact list
  from Google results. Returns firm name, website URL, and Google snippet per result.
  Ideal for LegalTech SaaS vendors, legal software providers, and B2B service companies targeting law firms.
license: Apache-2.0
metadata:
  author: apidojo
  version: "1.0"
  apify-actor: apidojo/google-search-scraper
---

# Finding Law Firms Via Google Search

---

## Inputs

| Parameter | Type | Required | Default | Notes |
|-----------|------|----------|---------|-------|
| `startUrls` | array | Optional | `[]` | Google search URLs |
| `searchTerms` | array | Optional | `[]` | Keywords to search on Google |
| `countryCode` | string | Optional | `US` | Country for Google search (e.g. `US`, `GB`, `TR`) |
| `languageCode` | string | Optional | — | Language for results (e.g. `en`) |
| `maxItems` | number | Optional | Unlimited | Maximum results to return across all queries |
| `maxPagesPerQuery` | integer | Optional | `1` | Maximum result pages per query |
| `mobileResults` | boolean | Optional | `false` | Fetch mobile SERP layout |
| `customMapFunction` | string | Optional | — | JavaScript function to transform each output object |

## How to Run

### Using run_actor.js (recommended)

```bash
# Quick answer (table)
node scripts/run_actor.js --actor "apidojo~google-search-scraper" --input '{"searchTerms": ["personal injury law firm Dallas"], "countryCode": "US", "maxPagesPerQuery": 3}'

# Save as CSV
node scripts/run_actor.js --actor "apidojo~google-search-scraper" --input '{"searchTerms": ["personal injury law firm Dallas"], "countryCode": "US", "maxPagesPerQuery": 3}' --output results.csv --format csv

# Save as JSON
node scripts/run_actor.js --actor "apidojo~google-search-scraper" --input '{"searchTerms": ["personal injury law firm Dallas"], "countryCode": "US", "maxPagesPerQuery": 3}' --output results.json --format json
```

### REST API fallback

```bash
curl -X POST "https://api.apify.com/v2/acts/apidojo~google-search-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["personal injury law firm Dallas"], "countryCode": "US", "maxPagesPerQuery": 3}'
```

If Apify MCP is available:
Use the Apify MCP `call_actor` tool with actor `apidojo~google-search-scraper` and the input above.

---

## Scoring & Ranking

Score each result by:
- `snippet_has_legal_signals` (contains: law firm, attorneys, legal, lawyers, counsel, practice, LLP, PC) → weight 0.50
- `valid_domain` (not directory sites: avvo.com, findlaw.com, lawyers.com) → weight 0.30
- `position_score` → 1 - (position / total), weight 0.20

```python
score = 0.50 * int(legal_signals) + 0.30 * int(valid_domain) + 0.20 * position_score
```

---

## Classification

| Score | Tier | Label |
|-------|------|-------|
| ≥ 0.70 | A | PRIME_PROSPECT |
| 0.40–0.69 | B | WARM_LEAD |
| < 0.40 | C | LOW_PRIORITY |

---

## Edge Cases

- **Legal directories**: Avvo, FindLaw, Martindale are directories — not law firms. Filter by domain.
- **No contact data**: SERP returns URL and snippet — no phone/email. Use as starting list.
- **Practice area filter**: Add specialty: "immigration law firm", "family law attorney Dallas".
- **Large vs boutique**: Big firms may be harder to reach. Filter by snippet to identify size.
- **Duplicate firms**: Same firm may appear across multiple search terms — deduplicate by domain.

© apidojo · Apache-2.0 · apidojo-io/apidojo-skills

Similar skills

All skills for Browser and scraping →

From the same set96

finding-brand-collaborations-on-tiktok Identifies sponsored TikTok posts and maps brand-creator partnerships using Apify scrapers. Useful for tracking competitor influencer deals and post benchmarks. CX Codex +1 766installs scraping-tiktok-posts-by-location Collects TikTok posts tied to a place through Apify. Use it to export post metrics, creator details, hashtags, and upload times from a location page. CX Codex +1 765installs finding-speaking-opportunities-on-twitter A skill that searches Twitter for conferences, podcasts, and summits actively recruiting speakers. CX Codex +1 763installs tracking-google-serp-rankings A skill that pulls Google results for a keyword list: positions, URLs, titles, snippets and SERP features. Useful for SEO audits and competitor checks. CX Codex +1 763installs scraping-youtube-channel-info Collect YouTube channel details from URLs, handles, or keywords. Use it to export channel stats or find channels by topic. CX Codex +1 761installs monitoring-tech-acquisition-news-google This skill searches Google for technology acquisition news and sorts results by deal status. Use it to review M&A activity in a sector or research a company. CX Codex +1 760installs tracking-hiring-signals-from-company-tweets Pulls hiring signals out of company tweets through apidojo's Apify scraper: who is recruiting, for which team, and how recently. CX Codex +1 760installs scraping-youtube-playlist Collects video details from a YouTube playlist through an Apify scraper. Use it to export playlist metadata and stats for analysis. CX Codex +1 759installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor