# Martindale — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search for attorneys and law firms on Martindale-Hubbell by location, practice area, and ratings, then access detailed profiles including contact information, reviews, and verified credentials. Build comprehensive attorney databases or connect with qualified legal professionals using real-time directory data.

**Category:** Business Directories | **Website:** [martindale.com/](https://martindale.com/) | **Docs:** [parse.bot/marketplace/d9fa17d9-2b60-4e6e-b57e-a7c29f217781/martindale-com-api](https://parse.bot/marketplace/d9fa17d9-2b60-4e6e-b57e-a7c29f217781/martindale-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-martindale-com-api-d9fa17d9/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_attorney_profile

Retrieve a full attorney profile by URL. Returns flattened contact details (telephone numbers, formatted address), practice areas, peer-review rating, and page sections (biography, credentials, payment info). The atty_id in the response is the numeric identifier needed for get_attorney_reviews.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `profile_url` | string | Yes | Full URL of the attorney profile (e.g. from search_attorneys results[*].profile_url) or a path slug starting with /attorney/. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-martindale-com-api-d9fa17d9/get_attorney_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profile_url":"<string>"}'
```

### get_attorney_reviews

Retrieve Avvo peer endorsement reviews for an attorney by numeric ID. Each review includes reviewer metadata (name, practice area, relationship) and the endorsement text. The atty_id is found in get_attorney_profile results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `atty_id` | string | Yes | Numeric ID of the attorney, found in the profile URL or get_attorney_profile results (e.g. '1589667'). |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-martindale-com-api-d9fa17d9/get_attorney_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"atty_id":"<string>","page":"<integer>"}'
```

### get_law_firm_attorneys

Retrieve the paginated list of attorneys associated with a law firm. Returns the same attorney entries as the firm profile page, paginated.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for the attorney listing. |
| `profile_url` | string | Yes | Full URL of the law firm profile (e.g. from search_attorneys results[*].firm_url) or a path slug starting with /organization/. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-martindale-com-api-d9fa17d9/get_law_firm_attorneys \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","profile_url":"<string>"}'
```

### get_law_firm_profile

Retrieve a law firm profile including the about section and a list of associated attorneys. Each attorney entry carries a profile_url for drill-down via get_attorney_profile.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `profile_url` | string | Yes | Full URL of the law firm profile (e.g. from search_attorneys results[*].firm_url) or a path slug starting with /organization/. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-martindale-com-api-d9fa17d9/get_law_firm_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profile_url":"<string>"}'
```

### get_search_filters

Retrieve available search filters (practice areas, locations, features, peer reviews, languages, law schools) for a given query and location. Useful for building refined searches. Returns filter groups with selectable items.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | Yes | Location such as city and state or ZIP code (e.g. 'New York, NY'). |
| `query` | string | Yes | Search keyword (e.g. 'personal injury'). |
| `search_type` | string | Yes | Type of search. Accepted values: 'attorneys', 'law-firms'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-martindale-com-api-d9fa17d9/get_search_filters \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","query":"<string>","search_type":"<string>"}'
```

### search_attorneys

Full-text search over the Martindale-Hubbell attorney directory. Returns paginated attorney cards with name, firm, phone, location, and peer-review rating. Results are ordered by best match by default. Each card carries a profile_url suitable for get_attorney_profile and a firm_url suitable for get_law_firm_profile.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | Yes | Location as city and state or ZIP code (e.g. 'New York, NY', 'Los Angeles, CA'). |
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword matching practice area or attorney name (e.g. 'personal injury', 'criminal defense'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-martindale-com-api-d9fa17d9/search_attorneys \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","page":"<integer>","query":"<string>"}'
```
