finding-law-firms-via-google-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Finding Law Firms Via Google Search

通过谷歌搜索查找律师事务所



Inputs

输入参数

ParameterTypeRequiredDefaultNotes
startUrls
arrayOptional
[]
Google search URLs
searchTerms
arrayOptional
[]
Keywords to search on Google
countryCode
stringOptional
US
Country for Google search (e.g.
US
,
GB
,
TR
)
languageCode
stringOptionalLanguage for results (e.g.
en
)
maxItems
numberOptionalUnlimitedMaximum results to return across all queries
maxPagesPerQuery
integerOptional
1
Maximum result pages per query
mobileResults
booleanOptional
false
Fetch mobile SERP layout
customMapFunction
stringOptionalJavaScript function to transform each output object
参数类型是否必填默认值说明
startUrls
数组可选
[]
谷歌搜索URL
searchTerms
数组可选
[]
谷歌搜索关键词
countryCode
字符串可选
US
谷歌搜索的国家代码(例如
US
GB
TR
languageCode
字符串可选结果的语言代码(例如
en
maxItems
数字可选无限制所有查询返回的最大结果数
maxPagesPerQuery
整数可选
1
每个查询的最大结果页数
mobileResults
布尔值可选
false
获取移动端SERP布局
customMapFunction
字符串可选用于转换每个输出对象的JavaScript函数

How to Run

运行方式

Using run_actor.js (recommended)

使用run_actor.js(推荐)

bash
undefined
bash
undefined

Quick answer (table)

Quick answer (table)

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

Save as CSV

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

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
undefined
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
undefined

REST API fallback

备选REST API方式

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.

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}'
如果Apify MCP可用: 使用Apify MCP的
call_actor
工具,指定actor为
apidojo~google-search-scraper
并传入上述输入参数。

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

每条结果按以下维度评分:
  • snippet_has_legal_signals
    (包含以下关键词:law firm、attorneys、legal、lawyers、counsel、practice、LLP、PC)→ 权重0.50
  • valid_domain
    (非目录网站:avvo.com、findlaw.com、lawyers.com)→ 权重0.30
  • position_score
    → 1 - (position / total),权重0.20
python
score = 0.50 * int(legal_signals) + 0.30 * int(valid_domain) + 0.20 * position_score

Classification

分类

ScoreTierLabel
≥ 0.70APRIME_PROSPECT
0.40–0.69BWARM_LEAD
< 0.40CLOW_PRIORITY

分数等级标签
≥ 0.70APRIME_PROSPECT
0.40–0.69BWARM_LEAD
< 0.40CLOW_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.
  • 法律目录网站:Avvo、FindLaw、Martindale属于目录网站,并非律师事务所。需通过域名过滤。
  • 无联系数据:搜索结果仅返回URL和摘要,无电话/邮箱。可将其作为初始名单使用。
  • 执业领域过滤:添加专业关键词,例如“immigration law firm”、“family law attorney Dallas”。
  • 大型律所vs精品律所:大型律所可能更难触达。可通过摘要过滤识别律所规模。
  • 重复律所:同一律所可能出现在多个搜索关键词的结果中,需通过域名去重。