# Profile lookup

Get a person's professional profile using their LinkedIn username, profile URL,
or Envo ID. Use separate endpoints for contact details, company interests, and
recent activity.

## Get a profile

Replace `YOUR_API_KEY` with your [API key](https://docs.envoapi.com/guides/authentication.md), then run:

```bash
curl --get 'https://api.envoapi.com/v1/profiles/details/by-username' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data-urlencode 'username=kentcdodds'
```

The username is the part after `/in/` in a LinkedIn profile URL. For example,
`https://www.linkedin.com/in/kentcdodds/` has the username `kentcdodds`.

Choose the endpoint that matches what you have. All three return the same
response format.

| Input                                                                              | GET endpoint                       | Required parameter                            |
| ---------------------------------------------------------------------------------- | ---------------------------------- | --------------------------------------------- |
| [Username](https://docs.envoapi.com/api/operations/getprofiledetailsbyusername.md) | `/v1/profiles/details/by-username` | `username=kentcdodds`                         |
| [Profile URL](https://docs.envoapi.com/api/operations/getprofiledetailsbyurl.md)   | `/v1/profiles/details/by-url`      | `url=https://www.linkedin.com/in/kentcdodds/` |
| [Envo ID](https://docs.envoapi.com/api/operations/getprofiledetailsbyid.md)        | `/v1/profiles/details/by-id`       | `publicId` from an API response               |

Send one input per request. Use `--data-urlencode` for query values, including
URLs and usernames with non-English characters.

## Read the response

Profile details include a name, headline, location, work experience, education,
and a skills preview. Here is part of a captured response; other fields are
omitted:

```json
{
  "data": {
    "publicId": "profile_sTOcVMQEyEidfhjzz8cayHJDdupxWm2pZNhA1Ml",
    "username": "kentcdodds",
    "fullName": "Kent C. Dodds",
    "headline": "Software Engineer and Educator"
  },
  "meta": {
    "skills": { "hasMore": true }
  }
}
```

* `data` contains the profile. Save `publicId` to look it up by Envo ID later.
* `meta.creditCost` is the number of credits charged for this request.
* `null` means data is missing or incomplete. An empty list is `[]`.
* `meta.sections`, when present, shows whether each section is complete, empty,
  incomplete, or unavailable.
* `data.skills` is a list of names. `meta.skills.hasMore` is `true` when more
  skills are available, `false` when complete, or `null` when unknown.

Contact details and company interests are not included. See the
[full profile response example](https://docs.envoapi.com/api/operations/getprofiledetailsbyusername.md)
for all fields.

## Get one profile section

Use these endpoints when you need one section. Each link includes request and
response examples.

| Section                                                                                                    | GET endpoint                                    | Response field             |
| ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | -------------------------- |
| [Contact details](https://docs.envoapi.com/api/operations/getprofilecontactbyusername.md)                  | `/v1/profiles/contact/by-username`              | `data`                     |
| [Work experience](https://docs.envoapi.com/api/operations/getprofilefullexperiencebyusername.md)           | `/v1/profiles/experience/by-username`           | `data.positions`           |
| [Education](https://docs.envoapi.com/api/operations/getprofileeducationbyusername.md)                      | `/v1/profiles/education/by-username`            | `data.education`           |
| [Skills](https://docs.envoapi.com/api/operations/getprofileskillsbyusername.md)                            | `/v1/profiles/skills/by-username`               | `data.skills`              |
| [Certifications](https://docs.envoapi.com/api/operations/getprofilecertificationsbyusername.md)            | `/v1/profiles/certifications/by-username`       | `data.certifications`      |
| [Courses](https://docs.envoapi.com/api/operations/getprofilecoursesbyusername.md)                          | `/v1/profiles/courses/by-username`              | `data.courses`             |
| [Company interests](https://docs.envoapi.com/api/operations/getprofilecompanyinterestsbyusername.md)       | `/v1/profiles/company-interests/by-username`    | `data.companyInterests`    |
| [Volunteer experience](https://docs.envoapi.com/api/operations/getprofilevolunteerexperiencebyusername.md) | `/v1/profiles/volunteer-experience/by-username` | `data.volunteerExperience` |

Send `username` with each request. To use a profile URL, change `/by-username`
to `/by-url` and send `url` instead. Company interests also supports
[`/by-id`](https://docs.envoapi.com/api/operations/getprofilecompanyinterestsbyid.md) with `publicId`.

Work experience is in `data.experience` in profile details, but
`data.positions` in the separate experience response. For contact details,
use the contact endpoint; `includeContact` is not supported.

### Page through skills and company interests

These two sections return one page per request. Start with `start=0`:

```bash
curl --get 'https://api.envoapi.com/v1/profiles/skills/by-username' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data-urlencode 'username=cassidoo' \
  --data-urlencode 'start=0'
```

This captured `meta.paging` example shows that the next page starts at `10`:

```json
{
  "start": 0,
  "count": 10,
  "returned": 10,
  "hasMore": true,
  "nextStart": 10
}
```

Set `start` to `meta.paging.nextStart` for the next request. Stop when
`hasMore` is `false`. The API sets the page size to 10; do not send `count`.
Each successful page uses credits.

## Get activity and similar profiles

These endpoints accept a LinkedIn `username`:

| Data                                                                                 | GET endpoint             | Response field   |
| ------------------------------------------------------------------------------------ | ------------------------ | ---------------- |
| [Posts](https://docs.envoapi.com/api/operations/getprofileposts.md)                  | `/v1/profiles/posts`     | `data.posts`     |
| [Comments](https://docs.envoapi.com/api/operations/getprofilecomments.md)            | `/v1/profiles/comments`  | `data.comments`  |
| [Reactions to posts](https://docs.envoapi.com/api/operations/getprofilereactions.md) | `/v1/profiles/reactions` | `data.reactions` |
| [Similar profiles](https://docs.envoapi.com/api/operations/getsimilarprofiles.md)    | `/v1/profiles/similar`   | `data.profiles`  |

For example, get recent posts:

```bash
curl --get 'https://api.envoapi.com/v1/profiles/posts' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data-urlencode 'username=satyanadella'
```

Posts, comments, and reactions use cursor pagination:

1. Leave out `cursor` on the first request.
2. While `meta.paging.hasMore` is `true`, copy `meta.paging.nextCursor` into
   the next request's `cursor` parameter.
3. Keep the same endpoint, account, and username. Copy the cursor unchanged.

Continue even if a page is short or empty. Reactions to comments are excluded,
so a reactions page may be empty while more results are available. Each
successful page uses credits, including empty pages.

Cursors expire within 15 minutes. If you get `400 cursor_expired`, start again
without a cursor. See [Pagination](https://docs.envoapi.com/guides/pagination.md) and [Errors](https://docs.envoapi.com/guides/errors.md)
for more help.

[Documentation index](https://docs.envoapi.com/llms.txt) · [All endpoints](https://docs.envoapi.com/api/index.md)
