Skip to main content
GET
/
api
/
v1
/
entities
/
prospects
/
company
/
{id}
/
people
/
search
curl -X GET "https://api.lance.app/api/v1/entities/prospects/company/550e8400-e29b-41d4-a716-446655440000/people/search" \
  -H "Authorization: Bearer <token>"
{
  "content": [
    {
      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:30:00.000Z",
      "firstName": "Jane",
      "lastName": "Smith",
      "jobTitle": "VP of Engineering",
      "city": "San Francisco",
      "postalCode": "94105",
      "country": "United States",
      "linkedinUrl": "https://www.linkedin.com/in/janesmith",
      "phones": ["+1-555-987-6543"],
      "emails": ["jane.smith@acmetech.com"],
      "companyId": "550e8400-e29b-41d4-a716-446655440000",
      "seniority": "VP",
      "industry": "Software Development",
      "birthDate": null,
      "departments": ["Engineering"],
      "subDepartments": ["Platform"],
      "functions": ["Engineering Management"],
      "skills": ["Leadership", "Software Architecture", "Team Building"],
      "languages": [
        { "language": "English", "level": "Native" },
        { "language": "Spanish", "level": "Professional" }
      ],
      "educations": [
        {
          "institution": {
            "id": null,
            "name": "Stanford University",
            "logoUrl": "https://media.licdn.com/school/stanford.png",
            "linkedinUrl": "https://www.linkedin.com/school/stanford-university"
          },
          "degreeName": "Master of Science",
          "fieldOfStudy": "Computer Science",
          "grade": null,
          "dates": { "start": "2008", "end": "2010" }
        }
      ],
      "workExperiences": [
        {
          "company": {
            "id": null,
            "name": "Acme Technologies",
            "logoUrl": "https://media.licdn.com/company/acme.png",
            "linkedinUrl": "https://www.linkedin.com/company/acme-technologies",
            "employees": { "start": "201", "end": "500" }
          },
          "dates": { "start": "2020-01", "end": null },
          "profilePositions": [
            {
              "company": "Acme Technologies",
              "description": "Leading the engineering organization...",
              "title": "VP of Engineering",
              "employmentType": "Full-time",
              "location": "San Francisco, CA",
              "dates": { "start": "2020-01", "end": null }
            }
          ]
        }
      ],
      "certificates": [],
      "linkedinProfile": {
        "headline": "VP of Engineering at Acme Technologies | Building the future of enterprise software",
        "summary": "Passionate engineering leader with 15+ years of experience...",
        "pictureUrl": "https://media.licdn.com/profile/janesmith.jpg"
      },
      "baseProviderId": "ark_person_789012",
      "bullhornId": null,
      "crmId": null,
      "leadOwnerId": null,
      "consentStatus": "UNKNOWN",
      "consentSource": null,
      "consentUpdatedAt": null,
      "deletedAt": null
    }
  ],
  "totalElements": 156,
  "totalPages": 7,
  "page": 0,
  "size": 25
}
Search for people (contacts/employees) at a specific company using the Lance database. Results are automatically mapped and upserted to the database for future reference.

Authentication

This endpoint requires authentication. The user must be logged in.
The search prioritizes company matching in this order: LinkedIn URL, domain, then company name. Companies must have at least one of these identifiers to be searchable.

Request

Path Parameters

id
string
required
The unique identifier (UUID) of the company to search people for.

Query Parameters

page
integer
default:0
Page number for pagination (0-indexed). Values less than 0 are normalized to 0.
size
integer
default:25
Number of results per page. Must be between 1 and 100. Values outside this range are clamped to the nearest valid value.

Response

content
Person[]
Array of person objects found at the company.
totalElements
integer
Total number of people matching the search criteria across all pages.
totalPages
integer
Total number of pages available based on size parameter.
page
integer
Current page number (0-indexed).
size
integer
Number of results per page.

Examples

curl -X GET "https://api.lance.app/api/v1/entities/prospects/company/550e8400-e29b-41d4-a716-446655440000/people/search" \
  -H "Authorization: Bearer <token>"
{
  "content": [
    {
      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:30:00.000Z",
      "firstName": "Jane",
      "lastName": "Smith",
      "jobTitle": "VP of Engineering",
      "city": "San Francisco",
      "postalCode": "94105",
      "country": "United States",
      "linkedinUrl": "https://www.linkedin.com/in/janesmith",
      "phones": ["+1-555-987-6543"],
      "emails": ["jane.smith@acmetech.com"],
      "companyId": "550e8400-e29b-41d4-a716-446655440000",
      "seniority": "VP",
      "industry": "Software Development",
      "birthDate": null,
      "departments": ["Engineering"],
      "subDepartments": ["Platform"],
      "functions": ["Engineering Management"],
      "skills": ["Leadership", "Software Architecture", "Team Building"],
      "languages": [
        { "language": "English", "level": "Native" },
        { "language": "Spanish", "level": "Professional" }
      ],
      "educations": [
        {
          "institution": {
            "id": null,
            "name": "Stanford University",
            "logoUrl": "https://media.licdn.com/school/stanford.png",
            "linkedinUrl": "https://www.linkedin.com/school/stanford-university"
          },
          "degreeName": "Master of Science",
          "fieldOfStudy": "Computer Science",
          "grade": null,
          "dates": { "start": "2008", "end": "2010" }
        }
      ],
      "workExperiences": [
        {
          "company": {
            "id": null,
            "name": "Acme Technologies",
            "logoUrl": "https://media.licdn.com/company/acme.png",
            "linkedinUrl": "https://www.linkedin.com/company/acme-technologies",
            "employees": { "start": "201", "end": "500" }
          },
          "dates": { "start": "2020-01", "end": null },
          "profilePositions": [
            {
              "company": "Acme Technologies",
              "description": "Leading the engineering organization...",
              "title": "VP of Engineering",
              "employmentType": "Full-time",
              "location": "San Francisco, CA",
              "dates": { "start": "2020-01", "end": null }
            }
          ]
        }
      ],
      "certificates": [],
      "linkedinProfile": {
        "headline": "VP of Engineering at Acme Technologies | Building the future of enterprise software",
        "summary": "Passionate engineering leader with 15+ years of experience...",
        "pictureUrl": "https://media.licdn.com/profile/janesmith.jpg"
      },
      "baseProviderId": "ark_person_789012",
      "bullhornId": null,
      "crmId": null,
      "leadOwnerId": null,
      "consentStatus": "UNKNOWN",
      "consentSource": null,
      "consentUpdatedAt": null,
      "deletedAt": null
    }
  ],
  "totalElements": 156,
  "totalPages": 7,
  "page": 0,
  "size": 25
}

Error Responses

404 Not Found
Returned when the specified company does not exist in the database.
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Company 550e8400-e29b-41d4-a716-446655440000 not found"
  }
}
400 Bad Request
Returned when the company exists but lacks sufficient data for searching (missing LinkedIn URL, domain, and company name).
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Company cannot be searched in our database: missing LinkedIn URL, domain, and name"
  }
}

Search Strategy

The endpoint uses a prioritized search strategy to find people at a company:
  1. LinkedIn URL (most reliable): If the company has a LinkedIn company page URL, it is used as the primary filter.
  2. Domain (good fallback): If no LinkedIn URL is available, the company’s domain is used to match people.
  3. Company Name (last resort): If neither LinkedIn URL nor domain is available, the company name is used. This may have more false positives as company names are not unique.
Results are automatically upserted to the database. Existing person records are updated with new data, and new persons are created with fresh UUIDs.

Performance Notes

This endpoint is optimized for performance:
  • Batch fetches existing persons in a single database query
  • Uses synchronous mapping instead of N+1 database lookups
  • Bulk upserts all persons in one operation
For large result sets, use pagination to avoid memory issues and improve response times.