API reference · LinkedIn
linkedin/search-leads
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/api/linkedin/search-leadsModel ID
linkedin/search-leads01
Input Schema
29 parameters · 0 required · 29 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | Optional | Which page of up to 25 leads to return, starting at 1 (1-100, default 1). Also pages through a salesNavUrl search. Each page is billed as one request. · Min: 1 · Max: 100 · Default: 1 |
query | string | Optional | Search keywords for LinkedIn leads: a role, name, or keywords (e.g. 'Marketing Manager'). Provide this or salesNavUrl. |
schools | string[] | Optional | Filter to people who attended any of these schools, by name. Commas are not allowed in a value. Up to 50 values. |
jobTitle | string | Optional | Optional current job title filter (e.g. 'Software Engineer'). Commas are not allowed in a value. |
location | string | Optional | Optional location filter (e.g. 'San Francisco'). Commas are not allowed in a value. |
lastNames | string[] | Optional | Filter to people whose last name matches any of these. Commas are not allowed in a value. Up to 70 values. |
firstNames | string[] | Optional | Filter to people whose first name matches any of these. Commas are not allowed in a value. Up to 70 values. |
functionIds | string[] | Optional | Filter by job function. Codes: 1=Accounting, 2=Administrative, 3=Arts and Design, 4=Business Development, 5=Community and Social Services, 6=Consulting, 7=Education, 8=Engineering, 9=Entrepreneurship, 10=Finance, 11=Healthcare Services, 12=Human Resources, 13=Information Technology, 14=Legal, 15=Marketing, 16=Media and Communication, 17=Military and Protective Services, 18=Operations, 19=Product Management, 20=Program and Project Management, 21=Purchasing, 22=Quality Assurance, 23=Real Estate, 24=Research, 25=Sales, 26=Customer Success and Support. |
salesNavUrl | string | Optional | Alternatively, a LinkedIn Sales Navigator lead-search URL you built in Sales Navigator (e.g. https://www.linkedin.com/sales/search/people?query=(keywords%3Aengineer)). When set it overrides query and every other filter on this request; only page still applies. |
pastCompanies | string[] | Optional | Filter to people who previously worked at any of these companies, by name. Commas are not allowed in a value. Up to 50 values. |
pastJobTitles | string[] | Optional | Filter by a past job title the person held (e.g. ['Product Manager']). Commas are not allowed in a value. Up to 70 values. |
excludeSchools | string[] | Optional | Exclude people who attended any of these schools, by name. Commas are not allowed in a value. Up to 50 values. |
companyHeadcount | string[] | Optional | Filter by current company size (employee count). Codes: A=Self-Employed, B=1-10, C=11-50, D=51-200, E=201-500, F=501-1,000, G=1,001-5,000, H=5,001-10,000, I=10,001+. |
currentCompanies | string[] | Optional | Filter to people who currently work at any of these companies, by name (e.g. ['Google','Meta']). Multiple names widen the match (OR). Commas are not allowed in a value. Up to 50 values. |
excludeLocations | string[] | Optional | Exclude people in any of these locations, by place name. Commas are not allowed in a value. Up to 70 values. |
profileLanguages | string[] | Optional | Filter by the profile's primary language. |
seniorityLevelIds | string[] | Optional | Filter by seniority level. Codes: 100=In Training, 110=Entry Level, 120=Senior, 130=Strategic, 200=Entry Level Manager, 210=Experienced Manager, 220=Director, 300=Vice President, 310=CXO, 320=Owner/Partner. |
excludeFunctionIds | string[] | Optional | Exclude these job functions (same codes as functionIds). Up to 30 values. |
recentlyChangedJobs | boolean | Optional | When true, only return people who recently changed jobs (a strong sales/recruiting signal). |
excludePastCompanies | string[] | Optional | Exclude people who previously worked at any of these companies, by name. Commas are not allowed in a value. Up to 50 values. |
excludePastJobTitles | string[] | Optional | Exclude people who held any of these past job titles. Commas are not allowed in a value. Up to 70 values. |
yearsOfExperienceIds | string[] | Optional | Filter by total years of experience. Codes: 1=Less than 1 year, 2=1 to 2 years, 3=3 to 5 years, 4=6 to 10 years, 5=More than 10 years. |
excludeCurrentCompanies | string[] | Optional | Exclude people who currently work at any of these companies, by name. Commas are not allowed in a value. Up to 50 values. |
excludeCurrentJobTitles | string[] | Optional | Exclude people whose current job title matches any of these. Commas are not allowed in a value. Up to 70 values. |
excludeSeniorityLevelIds | string[] | Optional | Exclude these seniority levels (same codes as seniorityLevelIds). Up to 20 values. |
recentlyPostedOnLinkedIn | boolean | Optional | When true, only return people who recently posted on LinkedIn (an activity signal). |
yearsAtCurrentCompanyIds | string[] | Optional | Filter by tenure at the current company. Codes: 1=Less than 1 year, 2=1 to 2 years, 3=3 to 5 years, 4=6 to 10 years, 5=More than 10 years. |
companyHeadquarterLocations | string[] | Optional | Filter by the location of the person's current company headquarters, by place name (e.g. ['United States']). Commas are not allowed in a value. Up to 70 values. |
excludeCompanyHeadquarterLocations | string[] | Optional | Exclude people whose current company is headquartered in any of these locations. Commas are not allowed in a value. Up to 70 values. |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
03
Code Examples
Ready-to-run snippets
const apiKey = process.env.SANDBASE_API_KEY;
const response = await fetch("https://api.sandbase.ai/v1/api/linkedin/search-leads", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"page": 1,
"query": "engineer",
"currentCompanies": [
"Google"
]
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());