# India Lawyer Directory Scraper (LawRato) (`fanndev/lawrato-lawyer-directory-scraper`) Actor

Extract lawyer and advocate profiles from LawRato -- India's largest consumer legal directory. Browse by city or practice area, or pull full profiles with rating, years of experience, bar council enrolment, practice areas, specializations, courts and languages. No account or API key needed.

- **URL**: https://apify.com/fanndev/lawrato-lawyer-directory-scraper.md
- **Developed by:** [Faisal Ahdan naufal](https://apify.com/fanndev) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 83.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## India Lawyer Directory Scraper (LawRato)

Extract lawyer and advocate profiles from **LawRato** — India's largest consumer legal directory. Browse by city or practice area, or pull complete profiles. No account, login, or API key needed.

### Why use this actor

- **Structured legal lead data for India** — name, city and neighbourhood, rating, number of user ratings, and years in practice for every listed advocate
- **Full profiles when you need depth** — bar council of enrolment and enrolment year, practice areas with their skill lists, specific services offered, courts the lawyer appears before, languages spoken, verified badge and public Q\&A activity
- **Two ways to slice the directory** — 16 cities (Delhi, Mumbai, Bangalore, Chennai, Kolkata, Pune, Hyderabad, Ahmedabad, Jaipur, Lucknow, Nagpur, Chandigarh, Faridabad, Ghaziabad, Gurgaon, Noida) or 30 practice areas (divorce, criminal, property, corporate, tax, cyber crime, immigration, GST…)
- **One-click enrichment** — list a city, then optionally fetch every lawyer's full profile in the same run
- **Honest about counts** — upstream publishes rating counts in rounded buckets ("100+"), and the output flags that explicitly instead of pretending it's exact
- Stable JSON output for CRMs, lead pipelines or spreadsheets, with automatic retries — no scrapers or browsers to babysit

### How it works

Pick a `mode`:

1. **`directory`** — list lawyers across all of India, or narrowed to one `city` or one `practiceArea`. Pages are followed automatically up to your `maxItems`. Turn on `enrichProfiles` to also fetch each lawyer's full profile.
2. **`profile`** — full detail for specific lawyer pages, by address or bare slug.
3. **`reference`** — the live list of cities and practice areas you can pass to `directory`.

### Input

**Every lawyer in Delhi:**

```json
{
  "mode": "directory",
  "city": "delhi",
  "maxItems": 100,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

**Divorce lawyers nationwide, with full profiles:**

```json
{
  "mode": "directory",
  "practiceArea": "divorce",
  "enrichProfiles": true,
  "maxItems": 60,
  "maxConcurrency": 4
}
```

**One profile:**

```json
{
  "mode": "profile",
  "profileUrl": "https://lawrato.com/advocate-sunil-kumar-bakshi"
}
```

| Field | Type | Description |
|---|---|---|
| `mode` | string | `directory`, `profile`, or `reference`. |
| `city` | string | `directory`: one of the 16 cities, or blank for all India. |
| `practiceArea` | string | `directory`: one of the 30 practice areas. If both `city` and `practiceArea` are set, the city wins (they are separate listings upstream). |
| `enrichProfiles` | boolean | `directory`: also fetch each listed lawyer's full profile. |
| `profileUrl` / `profileUrls` | string / array | `profile`: profile address or bare slug. |
| `maxItems` | integer | `directory`: max lawyers to list (20 per page, followed automatically). |
| `maxConcurrency` | integer | How many profiles to fetch in parallel (default 4). |
| `proxyConfiguration` | object | Apify Proxy settings; Residential on by default. |

### Output

**`directory` mode** — real output:

```json
{
  "_input": "area:divorce",
  "_source": "S1-html",
  "_scrapedAt": "2026-09-08T06:34:22Z",
  "recordType": "LAWYER_CARD",
  "name": "Advocate Madhuri Bakshi",
  "profileUrl": "https://lawrato.com/advocate-madhuri-bakshi",
  "slug": "advocate-madhuri-bakshi",
  "rating": 4.8,
  "ratingCount": 25,
  "ratingCountIsMinimum": true,
  "experienceYears": 11,
  "locality": "Sector 16, Faridabad",
  "imageUrl": "https://lawrato.com/expert_images/thumb/advocate-madhuri-bakshi.jpg",
  "cardText": "Advocate Madhuri Bakshi 4.8 | 25+ user ratings Sector 16, Faridabad 11 years Experience Divorce + 3 more …",
  "_listingScope": "area:divorce"
}
```

**`profile` mode** — real output, arrays truncated:

```json
{
  "recordType": "LAWYER_PROFILE",
  "name": "Advocate Sunil Kumar Bakshi",
  "profileUrl": "https://lawrato.com/advocate-sunil-kumar-bakshi",
  "isVerified": true,
  "rating": 4.9,
  "ratingCount": 100,
  "city": "Faridabad",
  "experienceYears": 39,
  "languages": ["English", "Hindi", "Punjabi"],
  "practiceAreas": [
    "Family Law",
    "Divorce, Family, Wills / Trusts, Child Custody, Domestic Violence, Succession Certificate, Court Marriage, Dowry Case",
    "… 14 more"
  ],
  "specializations": [
    "File for Divorce",
    "Reply / Send Legal Notice for Divorce",
    "Contest / Appeal in Divorce Case",
    "… more"
  ],
  "courts": ["Delhi High Court", "District Court, Faridabad", "… 4 more"],
  "barCouncil": "Bar Council of Punjab and Haryana",
  "enrolledYear": 1987,
  "answeredQuestions": 25
}
```

| Field | Type | Description |
|---|---|---|
| `recordType` | string | `LAWYER_CARD`, `LAWYER_PROFILE`, `CITY`, or `PRACTICE_AREA`. |
| `name` | string | Lawyer's name as published. |
| `profileUrl` | string | Public profile address. |
| `rating` | number | Average user rating out of 5. |
| `ratingCount` | integer | Number of user ratings — a floor when `ratingCountIsMinimum` is true. |
| `experienceYears` | integer | Years in practice. |
| `locality` / `city` | string | Neighbourhood + city (listing) / city (profile). |
| `isVerified` | boolean | Whether the directory marks the lawyer verified. |
| `languages` | array | Languages spoken. |
| `practiceAreas` | array | Practice area groups with their skill lists. |
| `specializations` | array | Specific services offered. |
| `courts` | array | Courts the lawyer appears before. |
| `barCouncil` / `enrolledYear` | string / integer | Bar council of enrolment and year. |
| `answeredQuestions` | integer | Public Q\&A answers. |
| `_error` / `_errorDetail` | string | Present only when a page could not be fetched. |

### Notes & limits

- **Listing pages hold 20 lawyers.** `maxItems` decides how many pages are walked; the run stops early when a page comes back short.
- **City and practice area cannot be combined** — the source has no combined listing. Run one axis, or run twice.
- **Rating counts are buckets.** "100+ user ratings" is published instead of an exact figure, so `ratingCount` is a minimum whenever `ratingCountIsMinimum` is true.
- **Phone numbers are not published on the public pages** — the directory routes contact through its own call/chat buttons, so no phone field is emitted rather than a fabricated one.
- Contact details that do appear are business contact information for practising professionals, published by the directory itself.

# Actor input Schema

## `mode` (type: `string`):

"directory" lists lawyers (all India, or filtered to one city or one practice area). "profile" fetches the full profile for specific lawyer pages. "reference" lists the cities and practice areas available upstream.

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

"directory" mode: restrict the listing to one city. Leave blank for all India.

## `practiceArea` (type: `string`):

"directory" mode: restrict the listing to one practice area. City and practice area are separate listings upstream -- if you set both, the city wins.

## `enrichProfiles` (type: `boolean`):

"directory" mode: after listing, fetch each lawyer's full profile too (bar council, courts, languages, specializations). Costs one extra request per lawyer.

## `profileUrl` (type: `string`):

"profile" mode: a full lawrato.com profile address, or just the slug (e.g. "advocate-sunil-kumar-bakshi").

## `profileUrls` (type: `array`):

"profile" mode: several profiles to fetch in one run.

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

"directory" mode: max lawyers to list. Pages hold 20 each and are followed automatically until this cap or the end of the listing.

## `maxConcurrency` (type: `integer`):

How many profile pages to fetch in parallel ("profile" mode, and "directory" mode when full profiles are enabled).

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

Apify Proxy configuration. Residential is on by default and recommended -- listing pages are fetched in sequence, and a stable Indian or global residential exit keeps results consistent.

## Actor input object example

```json
{
  "mode": "directory",
  "city": "delhi",
  "practiceArea": "",
  "enrichProfiles": false,
  "profileUrl": "https://lawrato.com/advocate-sunil-kumar-bakshi",
  "maxItems": 100,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All lawyer / reference records produced by this run.

# 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 = {
    "mode": "directory",
    "city": "delhi",
    "profileUrl": "https://lawrato.com/advocate-sunil-kumar-bakshi",
    "maxItems": 100,
    "maxConcurrency": 4,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fanndev/lawrato-lawyer-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 = {
    "mode": "directory",
    "city": "delhi",
    "profileUrl": "https://lawrato.com/advocate-sunil-kumar-bakshi",
    "maxItems": 100,
    "maxConcurrency": 4,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("fanndev/lawrato-lawyer-directory-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 '{
  "mode": "directory",
  "city": "delhi",
  "profileUrl": "https://lawrato.com/advocate-sunil-kumar-bakshi",
  "maxItems": 100,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call fanndev/lawrato-lawyer-directory-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fanndev/lawrato-lawyer-directory-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/dZuR2jPfAbytvf9EZ/builds/3bgsmp3uuaBPc7uIu/openapi.json
