# Resolve profile URL

**`POST https://myagentmail.com/linkedin/profiles/lookup`**

Group: LinkedIn — Outreach
Operation ID: `linkedinLookupProfile`

Resolve a LinkedIn profile URL to its `profileId`, name, headline, and
location. Use the returned `profileId` with `/connections` for the most
reliable connection-request results.


## Request body

Content-Type: `application/json`

```json
{
  "sessionId": "string",
  "profileUrl": "https://www.linkedin.com/in/john-doe"
}
```

## Responses

### 200 — Profile data.

### 404 — Session not found.

### 429 — Daily quota exceeded for this session.

## Code samples

### TypeScript

```typescript
import { MyAgentMail } from "myagentmail";

const client = new MyAgentMail({ apiKey: process.env.MYAGENTMAIL_API_KEY! });

// POST /linkedin/profiles/lookup
const result = await client.request("post", "/linkedin/profiles/lookup", { body: {
  "sessionId": "string",
  "profileUrl": "https://www.linkedin.com/in/john-doe"
} });
```

### curl

```bash
curl -X POST 'https://myagentmail.com/linkedin/profiles/lookup' \
  -H 'X-API-Key: $MYAGENTMAIL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "sessionId": "string",
  "profileUrl": "https://www.linkedin.com/in/john-doe"
}'
```

### Python

```python
import os, requests

r = requests.post(
    "https://myagentmail.com/linkedin/profiles/lookup",
    headers={"X-API-Key": os.environ["MYAGENTMAIL_API_KEY"]},
    json={
        "sessionId": "string",
        "profileUrl": "https://www.linkedin.com/in/john-doe"
    },
)
r.raise_for_status()
print(r.json())
```
