# Justia Lawyer Scraper (`moving_beacon-owner1/justia-lawyer-scraper`) Actor

Scrapes lawyer profiles from Justia by practice area, state, and city, capturing names, firms, locations, phone numbers, websites, practice areas, law schools, ratings, badges, and profile URLs, with optional enrichment for bios, jurisdictions, languages, awards, and verified addresses.

- **URL**: https://apify.com/moving\_beacon-owner1/justia-lawyer-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 80.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.99 / 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.

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

## Justia Lawyer Scraper

Collects lawyer profiles from the Justia legal directory. Choose a practice area and state, optionally narrow to a single city, and get one flat record per lawyer with name, firm, location, phone, website, listed practice areas, law schools, badge tier, rating and the profile link. An optional detail mode also opens each lawyer's profile page to add the biography, jurisdictions, languages, awards and a verified address.

### Input

| Field | Default | Description |
| --- | --- | --- |
| `practice_area` | `criminal-law` | Practice area to browse, e.g. `Criminal Law`, `Personal Injury`, `Family Law`, `Bankruptcy`. |
| `state` | `california` | Full US state name, e.g. `California`, `Texas`, `New York`. |
| `city` | *(empty)* | Optional city within the state, e.g. `Los Angeles`, `San Diego`. Empty covers the whole state. |
| `max_results` | `20` | Maximum lawyer records to return (1–500, about 25 per page). |
| `fetch_profile_details` | `false` | Also open each profile for biography, jurisdictions, languages, awards and a verified address (one extra request per record). |
| `proxyConfiguration` | Optional | Enable a US-based proxy for the most reliable results. |

### Output

Each result is one lawyer profile:

```json
{
    "profile_id": "1486958",
    "full_name": "Ryan Rodriguez",
    "profile_url": "https://lawyers.justia.com/lawyer/ryan-rodriguez-1486958",
    "firm_name": "Law Offices of Ryan Rodriguez",
    "city": "Newport Beach",
    "state_abbr": "CA",
    "location": "Newport Beach, CA",
    "phone": "(949) 335-5433",
    "website_url": "https://www.ryrolaw.com/",
    "practice_areas": ["Criminal Law", "DUI & DWI"],
    "law_schools": ["Loyola Law School, Los Angeles"],
    "badge_class": "platinum",
    "current_badge_level": 900,
    "badge_id": 1116299,
    "badge_metro_id": "2058",
    "badge_practice_id": "218",
    "reviews_overall": 10,
    "years_licensed": null,
    "connect_pro": false,
    "has_email": true,
    "profile_image_url": "https://justatic.com/profile-images/1486958-sl.jpeg",
    "summary": "Aggressive criminal defense across Orange County.",
    "listing_page_number": 1,
    "listing_page_url": "https://www.justia.com/lawyers/criminal-law/california",
    "searched_practice_area": "criminal-law",
    "searched_state": "california",
    "searched_city": null,
    "raw": { ... }
}
```

With `fetch_profile_details` enabled, records additionally carry `bio`, `jurisdictions`, `languages`, `professional_associations`, `awards` and street-level address fields.

### Notes

- Runs with empty input (defaults to criminal-law lawyers in California).
- Enable a US-based proxy for the most reliable results.
- Intended for research and lead-generation use; please respect Justia's terms of service.

# Actor input Schema

## `practice_area` (type: `string`):

Practice area to browse, e.g. 'Criminal Law', 'Personal Injury', 'Family Law', 'Bankruptcy', 'Estate Planning'. Plain names are converted to the directory's format automatically.

## `state` (type: `string`):

Full US state name, e.g. 'California', 'Texas', 'New York'.

## `city` (type: `string`):

Optional city within the state, e.g. 'Los Angeles', 'San Diego', 'Houston'. Leave empty to cover the whole state.

## `max_results` (type: `integer`):

Maximum number of lawyer records to return. Listing pages carry about 25 profiles each.

## `fetch_profile_details` (type: `boolean`):

Also open each lawyer's profile page to add the biography, jurisdictions, languages, awards and a verified address. One extra page request per record — turn off for faster, listing-only runs.

## `proxyConfiguration` (type: `object`):

Proxy settings for the run. Enable a US-based proxy for the most reliable results, especially for sites that limit non-US or datacenter traffic. Optional — leave off to run directly.

## Actor input object example

```json
{
  "practice_area": "criminal-law",
  "state": "california",
  "city": "los-angeles",
  "max_results": 20,
  "fetch_profile_details": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "practice_area": "criminal-law",
    "state": "california",
    "city": "los-angeles",
    "max_results": 20,
    "fetch_profile_details": false,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/justia-lawyer-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 = {
    "practice_area": "criminal-law",
    "state": "california",
    "city": "los-angeles",
    "max_results": 20,
    "fetch_profile_details": False,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/justia-lawyer-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 '{
  "practice_area": "criminal-law",
  "state": "california",
  "city": "los-angeles",
  "max_results": 20,
  "fetch_profile_details": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call moving_beacon-owner1/justia-lawyer-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/justia-lawyer-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/Q3XT5ebETKebgyOJY/builds/XNXZd0usWlsnydrud/openapi.json
