Skip to main content
POST
/
api
/
v1
/
entities
/
prospects
/
person
Search Person Prospects
curl --request POST \
  --url https://api.example.com/api/v1/entities/prospects/person \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "page": 123,
  "size": 123,
  "contact": {
    "contact.fullName": {
      "all": {
        "include": {
          "mode": "<string>",
          "content": [
            "<string>"
          ]
        },
        "exclude": {}
      },
      "any": {}
    },
    "contact.socialMediaLink": {
      "all": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "any": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      }
    },
    "contact.company": {
      "current": {
        "all": {
          "include": [
            "<string>"
          ],
          "exclude": [
            "<string>"
          ]
        },
        "any": {
          "include": [
            "<string>"
          ],
          "exclude": [
            "<string>"
          ]
        }
      },
      "previous": {
        "all": {
          "include": [
            "<string>"
          ],
          "exclude": [
            "<string>"
          ]
        },
        "any": {
          "include": [
            "<string>"
          ],
          "exclude": [
            "<string>"
          ]
        }
      }
    },
    "contact.seniority": {
      "all": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "any": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      }
    },
    "contact.location": {
      "all": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "any": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      }
    },
    "contact.departmentAndFunction": {
      "all": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "any": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      }
    },
    "contact.skill": {
      "all": {
        "include": {
          "mode": "<string>",
          "content": [
            "<string>"
          ]
        },
        "exclude": {}
      },
      "any": {}
    },
    "contact.certification": {
      "all": {
        "include": {
          "mode": "<string>",
          "content": [
            "<string>"
          ]
        },
        "exclude": {}
      },
      "any": {}
    },
    "contact.keyword": {
      "all": {
        "include": {
          "sources": [
            {}
          ],
          "content": [
            "<string>"
          ]
        },
        "exclude": {}
      },
      "any": {}
    },
    "contact.socialMedia": {
      "all": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "any": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      }
    },
    "contact.language": {
      "all": {
        "include": {
          "mode": "<string>",
          "content": [
            "<string>"
          ]
        },
        "exclude": {}
      },
      "any": {},
      "range": {}
    },
    "contact.education": {
      "school": {
        "all": {
          "include": [
            "<string>"
          ],
          "exclude": [
            "<string>"
          ]
        },
        "any": {}
      },
      "degree": {},
      "fieldOfStudy": {},
      "date": {}
    },
    "contact.profileBadge": {
      "all": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "any": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      }
    },
    "contact.experience": {
      "current": {
        "title": {
          "all": {
            "include": {
              "mode": "<string>",
              "content": [
                "<string>"
              ]
            },
            "exclude": {}
          },
          "any": {}
        },
        "duration": {
          "currentCompany": {
            "min": {
              "year": 123,
              "month": 123
            },
            "max": {
              "year": 123,
              "month": 123
            }
          },
          "currentJob": {},
          "total": {}
        }
      },
      "previous": {
        "title": {}
      }
    }
  },
  "account": {
    "account.nameOrDomain": {},
    "account.domain": {},
    "account.socialMediaLink": {},
    "account.phoneNumber": {},
    "account.industry": {
      "all": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "any": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      }
    },
    "account.location": {},
    "account.productAndServices": {},
    "account.socialMedia": {
      "all": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "any": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      }
    },
    "account.type": {
      "all": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "any": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      }
    },
    "account.foundedYear": {},
    "account.employeeSize": {
      "type": "<string>",
      "range": [
        {}
      ]
    },
    "account.revenue": {},
    "account.language": {
      "all": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "any": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "range": {}
    },
    "account.geoLocation": {
      "position": {},
      "radius": 123,
      "unit": "<string>"
    },
    "account.keyword": {
      "all": {
        "include": {
          "sources": [
            {}
          ],
          "content": [
            "<string>"
          ]
        },
        "exclude": {}
      },
      "any": {}
    },
    "account.funding": {
      "type": [
        {}
      ],
      "totalAmount": {},
      "lastAmount": {},
      "duration": {}
    },
    "account.metric": {
      "employee": [
        {}
      ],
      "growth": [
        {}
      ]
    }
  }
}
'
{
  "totalElements": 1250,
  "totalPages": 125,
  "number": 0,
  "size": 10,
  "first": true,
  "last": false,
  "numberOfElements": 10,
  "empty": false,
  "content": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:30:00.000Z",
      "firstName": "Sarah",
      "lastName": "Johnson",
      "jobTitle": "Chief Technology Officer",
      "city": "Austin",
      "postalCode": null,
      "country": "United States",
      "linkedinUrl": "https://www.linkedin.com/in/sarahjohnson",
      "phones": [],
      "emails": [],
      "companyId": "660e8400-e29b-41d4-a716-446655440001",
      "seniority": "c_suite",
      "industry": "Software",
      "departments": ["Engineering", "Technology"],
      "subDepartments": [],
      "functions": ["technology_operations", "engineering_technical"],
      "skills": ["Cloud Architecture", "Team Leadership", "Python", "AWS"],
      "languages": [{ "language": "English", "level": "Native" }],
      "educations": [
        {
          "institution": {
            "id": null,
            "name": "MIT",
            "logoUrl": null,
            "linkedinUrl": "https://www.linkedin.com/school/mit"
          },
          "degreeName": "MS",
          "fieldOfStudy": "Computer Science",
          "grade": null,
          "dates": { "start": "2008", "end": "2010" }
        }
      ],
      "workExperiences": [
        {
          "company": {
            "id": null,
            "name": "TechStartup Inc",
            "logoUrl": "https://logo.example.com/techstartup.png",
            "linkedinUrl": "https://www.linkedin.com/company/techstartup",
            "employees": { "start": "100", "end": "250" }
          },
          "dates": { "start": "2021-03", "end": null },
          "profilePositions": [
            {
              "company": "TechStartup Inc",
              "description": "Leading technology strategy and engineering teams",
              "title": "Chief Technology Officer",
              "employmentType": "Full-time",
              "location": "Austin, TX",
              "dates": { "start": "2021-03", "end": null }
            }
          ]
        }
      ],
      "certificates": [],
      "linkedinProfile": {
        "headline": "CTO at TechStartup Inc | Building Scalable Solutions",
        "summary": "Technology leader with 15+ years of experience...",
        "pictureUrl": "https://media.licdn.com/dms/image/..."
      },
      "baseProviderId": "baseProvider_person_abc123",
      "bullhornId": null,
      "crmId": null,
      "leadOwnerId": null,
      "consentStatus": "UNKNOWN",
      "consentSource": null,
      "consentUpdatedAt": null,
      "deletedAt": null,
      "birthDate": null,
      "company": {
        "id": "660e8400-e29b-41d4-a716-446655440001",
        "createdAt": "2024-01-15T10:30:00.000Z",
        "updatedAt": "2024-01-15T10:30:00.000Z",
        "name": "TechStartup Inc",
        "description": "Innovative software company focused on enterprise solutions",
        "summary": "Enterprise SaaS provider",
        "headcount": "100-250",
        "industry": "Software",
        "phones": [],
        "linkedinUrl": "https://www.linkedin.com/company/techstartup",
        "websiteUrl": "https://www.techstartup.com",
        "domain": "techstartup.com",
        "city": "Austin",
        "postalCode": "78701",
        "country": "United States",
        "logoUrl": "https://logo.example.com/techstartup.png",
        "legalName": "TechStartup Inc.",
        "foundedYear": 2018,
        "revenue": "$10M-$50M",
        "baseProviderId": "baseProvider_company_xyz789",
        "bullhornId": null,
        "crmId": null,
        "location": null
      }
    }
  ]
}
Searches for person prospects using data providers with extensive filtering capabilities. Results are automatically mapped to domain objects and persisted to the global database (companies and persons are upserted), returning enriched lead objects with associated company data.

Authentication

This endpoint requires authentication. The user must be signed in to access prospect search functionality.
This endpoint performs a search against the Lance database of 400+ million professional profiles. Results are automatically saved to Lance’s database, deduplicating and merging with existing records.

Request

The request body allows filtering by both account (company) criteria and contact (person) criteria. All filters are optional and can be combined.

Pagination

page
integer
default:"0"
Page number for pagination (0-indexed)
size
integer
default:"10"
Number of results per page. Must be between 0 and 100.

Contact Filters

contact
object
Filters for the individual/person being searched

Account Filters

account
object
Filters for the company/account associated with the person

Response

Returns a paginated response containing leads (persons with associated company data).
content
Lead[]
Array of lead objects matching the search criteria
totalElements
integer
Total number of matching results across all pages. Can be null.
totalPages
integer
Total number of pages available. Can be null.
number
integer
Current page number (0-indexed). Can be null.
size
integer
Number of results per page. Can be null.
first
boolean
Whether this is the first page. Can be null.
last
boolean
Whether this is the last page. Can be null.
numberOfElements
integer
Number of elements on the current page. Can be null.
empty
boolean
Whether the result set is empty. Can be null.

Response Examples

{
  "totalElements": 1250,
  "totalPages": 125,
  "number": 0,
  "size": 10,
  "first": true,
  "last": false,
  "numberOfElements": 10,
  "empty": false,
  "content": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:30:00.000Z",
      "firstName": "Sarah",
      "lastName": "Johnson",
      "jobTitle": "Chief Technology Officer",
      "city": "Austin",
      "postalCode": null,
      "country": "United States",
      "linkedinUrl": "https://www.linkedin.com/in/sarahjohnson",
      "phones": [],
      "emails": [],
      "companyId": "660e8400-e29b-41d4-a716-446655440001",
      "seniority": "c_suite",
      "industry": "Software",
      "departments": ["Engineering", "Technology"],
      "subDepartments": [],
      "functions": ["technology_operations", "engineering_technical"],
      "skills": ["Cloud Architecture", "Team Leadership", "Python", "AWS"],
      "languages": [{ "language": "English", "level": "Native" }],
      "educations": [
        {
          "institution": {
            "id": null,
            "name": "MIT",
            "logoUrl": null,
            "linkedinUrl": "https://www.linkedin.com/school/mit"
          },
          "degreeName": "MS",
          "fieldOfStudy": "Computer Science",
          "grade": null,
          "dates": { "start": "2008", "end": "2010" }
        }
      ],
      "workExperiences": [
        {
          "company": {
            "id": null,
            "name": "TechStartup Inc",
            "logoUrl": "https://logo.example.com/techstartup.png",
            "linkedinUrl": "https://www.linkedin.com/company/techstartup",
            "employees": { "start": "100", "end": "250" }
          },
          "dates": { "start": "2021-03", "end": null },
          "profilePositions": [
            {
              "company": "TechStartup Inc",
              "description": "Leading technology strategy and engineering teams",
              "title": "Chief Technology Officer",
              "employmentType": "Full-time",
              "location": "Austin, TX",
              "dates": { "start": "2021-03", "end": null }
            }
          ]
        }
      ],
      "certificates": [],
      "linkedinProfile": {
        "headline": "CTO at TechStartup Inc | Building Scalable Solutions",
        "summary": "Technology leader with 15+ years of experience...",
        "pictureUrl": "https://media.licdn.com/dms/image/..."
      },
      "baseProviderId": "baseProvider_person_abc123",
      "bullhornId": null,
      "crmId": null,
      "leadOwnerId": null,
      "consentStatus": "UNKNOWN",
      "consentSource": null,
      "consentUpdatedAt": null,
      "deletedAt": null,
      "birthDate": null,
      "company": {
        "id": "660e8400-e29b-41d4-a716-446655440001",
        "createdAt": "2024-01-15T10:30:00.000Z",
        "updatedAt": "2024-01-15T10:30:00.000Z",
        "name": "TechStartup Inc",
        "description": "Innovative software company focused on enterprise solutions",
        "summary": "Enterprise SaaS provider",
        "headcount": "100-250",
        "industry": "Software",
        "phones": [],
        "linkedinUrl": "https://www.linkedin.com/company/techstartup",
        "websiteUrl": "https://www.techstartup.com",
        "domain": "techstartup.com",
        "city": "Austin",
        "postalCode": "78701",
        "country": "United States",
        "logoUrl": "https://logo.example.com/techstartup.png",
        "legalName": "TechStartup Inc.",
        "foundedYear": 2018,
        "revenue": "$10M-$50M",
        "baseProviderId": "baseProvider_company_xyz789",
        "bullhornId": null,
        "crmId": null,
        "location": null
      }
    }
  ]
}

Request Examples

Basic Search - CTOs in Software Industry

{
  "contact": {
    "seniority": {
      "any": {
        "include": ["c_suite"]
      }
    },
    "experience": {
      "current": {
        "title": {
          "any": {
            "include": {
              "mode": "SMART",
              "content": ["CTO", "Chief Technology Officer"]
            }
          }
        }
      }
    }
  },
  "account": {
    "industry": {
      "any": {
        "include": ["software development", "software"]
      }
    }
  },
  "page": 0,
  "size": 25
}

Search by Company Size and Location

{
  "contact": {
    "departmentAndFunction": {
      "any": {
        "include": ["sales", "business_development"]
      }
    },
    "location": {
      "any": {
        "include": ["San Francisco", "New York", "Boston"]
      }
    }
  },
  "account": {
    "employeeSize": {
      "type": "RANGE",
      "range": [{ "start": 50, "end": 500 }]
    }
  },
  "page": 0,
  "size": 50
}

Search by Skills and Funding Stage

{
  "contact": {
    "skill": {
      "any": {
        "include": {
          "mode": "SMART",
          "content": ["Machine Learning", "AI", "Python"]
        }
      }
    }
  },
  "account": {
    "funding": {
      "type": ["SERIES_A", "SERIES_B", "SERIES_C"]
    }
  },
  "page": 0,
  "size": 20
}

Search by Keywords Across Profile Sources

{
  "contact": {
    "keyword": {
      "any": {
        "include": {
          "sources": [
            { "mode": "SMART", "source": "HEADLINE" },
            { "mode": "SMART", "source": "SUMMARY" },
            { "mode": "SMART", "source": "SKILL" }
          ],
          "content": ["data engineering", "ETL", "data pipeline"]
        }
      }
    }
  },
  "page": 0,
  "size": 25
}

Search by Experience Duration

{
  "contact": {
    "seniority": {
      "any": {
        "include": ["manager", "director"]
      }
    },
    "experience": {
      "current": {
        "duration": {
          "currentCompany": {
            "min": { "year": 2, "month": 0 },
            "max": { "year": 5, "month": 0 }
          },
          "total": {
            "min": { "year": 8, "month": 0 }
          }
        }
      }
    }
  },
  "page": 0,
  "size": 20
}

Search People Open to Work

{
  "contact": {
    "profileBadge": {
      "any": {
        "include": ["OPEN_TO_WORK"]
      }
    },
    "departmentAndFunction": {
      "any": {
        "include": ["software_development", "data_science"]
      }
    }
  },
  "page": 0,
  "size": 25
}

How It Works

  1. Authentication: The endpoint authenticates the user via Clerk
  2. Validation: Request body is validated against the PeopleSearch_Body schema
  3. Search: Queries the Lance database with the provided filters
  4. Mapping: Maps external provider response data to Lance domain objects (Person and Company)
  5. Persistence: Companies and persons are upserted to the global database using merge logic to preserve existing data
  6. Response: Returns the enriched leads with associated company data
Results are automatically deduplicated during the upsert process. If a person or company already exists in the database (matched by external IDs or other identifiers), the records are merged rather than duplicated.

Notes

  • Search results are persisted to the database, making subsequent searches faster for the same prospects
  • The external provider integration uses rate limiting (5 requests per second) to avoid overwhelming the external service
  • Company data is extracted from the person’s current position or position groups if available
  • The companyId field in the response links each person to their saved company record
  • External provider IDs (baseProviderId) are preserved to enable future enrichment and deduplication