> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.scaleabm.org/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.scaleabm.org/_mcp/server.

# Lead Discovery

> Find decision-makers at target companies, qualify them, and prepare for outreach

# Lead Discovery & Qualification

This guide walks through finding decision-makers at a target company, enriching their profiles, checking messaging eligibility, and gathering conversation starters from their recent posts.

## Step 1: Search for People at the Target Company

Use keywords to find people with specific titles at a company:

```bash
curl -s "$BASE/api/search/people?keywords=CTO&company=Acme%20Corp&count=10" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER"
```

The `company` parameter auto-resolves to a LinkedIn company ID. Combine with `network=S` to filter for 2nd-degree connections (warmer leads):

```bash
curl -s "$BASE/api/search/people?keywords=VP+Engineering&company=Stripe&network=S&count=20" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER"
```

> **Tip**
>
> If search returns 0 results, try broader keywords or remove the company filter. Some companies have unusual LinkedIn names -- use `GET /api/search/companies?keywords=Acme` to find the exact name first.

## Step 2: Enrich Profiles in Batch

Fetch full profiles for your top candidates in a single request:

```bash
curl -s -X POST "$BASE/api/profiles/read" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  -H "Content-Type: application/json" \
  -d '{
    "profiles": [
      {"vanityName": "john-doe-123"},
      {"vanityName": "jane-smith-456"},
      {"vanityName": "alex-johnson-789"}
    ]
  }'
```

This returns full name, headline, location, current positions, education, and entity URN for each profile. Up to 25 profiles per request.

## Step 3: Check Relationship & Messaging Eligibility

Find out which candidates you can message directly:

```bash
curl -s -X POST "$BASE/api/relationships/read" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  -H "Content-Type: application/json" \
  -d '{
    "profiles": [
      {"vanityName": "john-doe-123"},
      {"vanityName": "jane-smith-456"}
    ]
  }'
```

Key fields in the response:

| Field                         | Meaning                                            |
| ----------------------------- | -------------------------------------------------- |
| `connected: true`             | 1st-degree -- you can message directly             |
| `openProfile: true`           | Open Profile -- you can message without connecting |
| `canConnect: true`            | You can send a connection request                  |
| `pendingInvitationSent: true` | You already sent a request -- do not send again    |

## Step 4: Get Recent Posts for Conversation Starters

Check what your top candidates are posting about -- this gives you personalized conversation openers:

```bash
curl -s "$BASE/api/posts?profileUrl=https://www.linkedin.com/in/john-doe-123/&limit=5" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER"
```

Look for:

* Posts with high engagement (`likeCount`, `commentCount`) -- these are topics they care about
* Recent posts (within the last week) for timely references
* Shared content that reveals interests or challenges

## Step 5: Get Contact Info (1st-Degree Only)

If the candidate is a 1st-degree connection, get their email and other contact details:

```bash
curl -s "$BASE/api/profile/john-doe-123/contact" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER"
```

## Complete Agent Script

Here is the full flow as a sequential script:

```bash
export BASE=https://li.scaleabm.org
export KEY=voy_YOUR_API_KEY
export USER=your-username

# 1. Search
RESULTS=$(curl -s "$BASE/api/search/people?keywords=VP+Engineering&company=Notion&network=S&count=10" \
  -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER")
echo "$RESULTS" | jq '.data.results[] | {name: .fullName, title: .headline, vanity: .vanityName}'

# 2. Enrich top 3
PROFILES=$(curl -s -X POST "$BASE/api/profiles/read" \
  -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER" \
  -H "Content-Type: application/json" \
  -d '{"profiles":[{"vanityName":"candidate-1"},{"vanityName":"candidate-2"},{"vanityName":"candidate-3"}]}')

# 3. Check relationships
RELS=$(curl -s -X POST "$BASE/api/relationships/read" \
  -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER" \
  -H "Content-Type: application/json" \
  -d '{"profiles":[{"vanityName":"candidate-1"},{"vanityName":"candidate-2"},{"vanityName":"candidate-3"}]}')

# 4. Get posts for the best candidate
POSTS=$(curl -s "$BASE/api/posts?profileUrl=https://www.linkedin.com/in/candidate-1/&limit=5" \
  -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER")
echo "$POSTS" | jq '.posts[] | {text: .postContent[:100], likes: .likeCount}'
```

## SalesNav Alternative

For richer data and advanced filters, use SalesNav search:

```bash
curl -s -X POST "$BASE/api/salesnav/search" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  -H "Content-Type: application/json" \
  -d '{"keywords": "VP Engineering fintech London", "maxResults": 25}'
```

SalesNav returns additional data like lead activity timeline and company insights. See [SalesNav](/guides/core-concepts/sales-nav) for the full API.

## Error Handling

| Scenario                 | Resolution                                |
| ------------------------ | ----------------------------------------- |
| Search returns 0 results | Broaden keywords or remove company filter |
| Profile returns 422      | Profile may be restricted (LinkedIn 403)  |
| Relationship check fails | Profile may be blocked or deactivated     |
| Posts endpoint times out | Reduce `limit` or try again               |

## Related

* [Profiles](/guides/core-concepts/profiles) -- Full profile endpoint reference
* [Search](/guides/core-concepts/search) -- Search parameters and pagination
* [Warm Outreach Guide](/guides/workflow-guides/warm-outreach) -- Next step: connect and message