Skip to main content

Search leads

Search for people who match one or more Lead Finder criteria. This endpoint returns a compact result set intended for discovery, filtering, and selecting leads for further enrichment.

Use the returned lead uid and other lead details when queueing a lead for enrichment with the queue lead enrichments endpoint.

Request​

Each request must include a non-empty search_criteria array. Every entry contains a criterion name, a value, and an operator. Build these entries from the current search criteria catalog:

  • name: use a criterion name exactly as returned in freetext or enumerated.
  • value: for freetext criteria, send your own text. For enumerated criteria, send a value returned by search criteria values. The value must match exactly, including letter case.
  • operator: use only an operator listed in the criterion's operators. INCLUDE narrows the search to matching values, and EXCLUDE removes matching values from the result set.
  • Multiple values: to match several values for the same criterion, add one search_criteria entry per value with the same name. The number of distinct values for one criterion and operator pair cannot exceed the criterion's max_values. Identical values are counted once. null means there is no limit.

For example, a criterion with "operators": ["INCLUDE"] and "max_values": 1 accepts only one value, sent with INCLUDE. A criterion with "operators": ["INCLUDE", "EXCLUDE"] and "max_values": 200 accepts up to 200 distinct values to include and up to 200 distinct values to exclude.

A request that does not follow these rules is rejected with 400 Bad Request before any credits are used. Criteria and allowed values can change over time, so do not hardcode the example values from this page.

Credit usage

This request can use account credits. Searching for leads and viewing returned lead data costs 1 credit per lead.

Endpoint​

POST https://api.woodpecker.co/rest/v2/lead_finder/leads

Headers​

x-api-key: {YOUR_API_KEY}
Content-Type: application/json

For details on how to authenticate your requests, please see the authentication guide.

Body​

{
"search_criteria": [
{
"name": "INDUSTRY",
"value": "banking",
"operator": "INCLUDE"
},
{
"name": "CURRENT_JOB_TITLE",
"value": "ceo",
"operator": "INCLUDE"
},
{
"name": "LOCATION",
"value": "poland",
"operator": "EXCLUDE"
}
],
"size": 2,
"next_page": null
}

Body schema​

FieldTypeRequiredDescription
search_criteriaarray[object]YesNon-empty list of filters to apply
  └─ namestringYesCriterion name from the search criteria catalog. Case-sensitive.
  └─ valuestringYesCriterion value. For freetext criteria, any text. For enumerated criteria, a value returned by search criteria values, matched exactly (case-sensitive).
  └─ operatorstringYesFilter behavior: INCLUDE keeps matches, EXCLUDE removes matches. Must be one of the criterion's operators
sizeintegerNoNumber of leads to return. Default: 1. Maximum: 50 for PREMIUM accounts and 25 for TRIAL accounts
next_pagestring/nullNoPagination token returned by a previous search response. Available only for PREMIUM accounts

Request samples​

Search for leads with inclusion and exclusion filters​

curl --request POST \
--url "https://api.woodpecker.co/rest/v2/lead_finder/leads" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"search_criteria": [
{
"name": "INDUSTRY",
"value": "banking",
"operator": "INCLUDE"
},
{
"name": "LOCATION",
"value": "poland",
"operator": "EXCLUDE"
},
{
"name": "CURRENT_JOB_TITLE",
"value": "ceo",
"operator": "INCLUDE"
}
],
"size": 2,
"next_page": null
}'

Response​

Response examples​

Preview of the leads matching the search criteria

{
"size": 2,
"leads": [
{
"uid": "https://www.linkedin.com/in/erlich-bachman-404xyz",
"full_name": "Erlich Bachman",
"first_name": "Erlich",
"last_name": "Bachman",
"gender": null,
"linkedin_url": "https://www.linkedin.com/in/erlich-bachman-404xyz",
"company_name": "Bachmanity",
"company_website": "bachmanity.com",
"industry": "Software Development",
"job_title": "CEO",
"job_title_role": null,
"job_title_levels": [],
"location_name": "Palo Alto, California, United States",
"city": null,
"state": null,
"country": null
},
{
"uid": "https://www.linkedin.com/in/jared-dunn-7c21ab",
"full_name": "Jared Dunn",
"first_name": "Jared",
"last_name": "Dunn",
"gender": null,
"linkedin_url": "https://www.linkedin.com/in/jared-dunn-7c21ab",
"company_name": "Pied Piper",
"company_website": "piedpiper.com",
"industry": "Software Development",
"job_title": "Chief Operating Officer",
"job_title_role": null,
"job_title_levels": [],
"location_name": "Palo Alto, California, United States",
"city": null,
"state": null,
"country": null
}
],
"total_found": 28639,
"next_page": "9c1f7a2e4b6d8035"
}

Profile fields depend on data availability. When a scalar profile value is not available, it is returned as null. When an array profile value is not available, it is returned as an empty array.

When no leads match the search criteria, the response is still 200 OK with an empty leads array:

{
"size": 25,
"leads": [],
"total_found": 0,
"next_page": null
}

Body schema​

FieldTypeDescription
sizeintegerNumber of leads requested in this page
leadsarray[object]Lead search result items
  └─ uidstringLead identifier
  └─ full_namestring/nullFull name of the lead
  └─ first_namestring/nullFirst name
  └─ last_namestring/nullLast name
  └─ genderstring/nullGender
  └─ linkedin_urlstring/nullLinkedIn profile URL
  └─ company_namestring/nullCurrent company name
  └─ company_websitestring/nullCurrent company website
  └─ industrystring/nullCurrent industry. The spelling can differ from the INDUSTRY values accepted in search requests
  └─ job_titlestring/nullCurrent job title
  └─ job_title_rolestring/nullJob title role when available
  └─ job_title_levelsarray[string]Job seniority levels. Empty when not available
  └─ location_namestring/nullFull human-readable location
  └─ citystring/nullCity
  └─ statestring/nullState or region
  └─ countrystring/nullCountry
total_foundintegerTotal number of matches available for the current search
next_pagestring/nullPagination token. Use it to request the next page of results. null when there are no more results

Pagination​

This endpoint uses cursor-based pagination. The response includes a next_page token when another page is available. Store the token and resend it exactly as returned in the next request body. An invalid or expired token returns 400 Bad Request.

Fetching additional pages is available only for PREMIUM accounts. TRIAL accounts can retrieve only the first page of results. Requests for additional pages from TRIAL accounts return 400 Bad Request.

Request first page:

curl --request POST \
--url "https://api.woodpecker.co/rest/v2/lead_finder/leads" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"search_criteria": [
{
"name": "INDUSTRY",
"value": "banking",
"operator": "INCLUDE"
}
],
"size": 2
}'

Example response excerpt:

{
"size": 2,
"leads": [
{
"uid": "https://www.linkedin.com/in/erlich-bachman-404xyz",
"full_name": "Erlich Bachman"
}
],
"total_found": 28639,
"next_page": "9c1f7a2e4b6d8035"
}

Request the next page:

curl --request POST \
--url "https://api.woodpecker.co/rest/v2/lead_finder/leads" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"search_criteria": [
{
"name": "INDUSTRY",
"value": "banking",
"operator": "INCLUDE"
}
],
"size": 2,
"next_page": "9c1f7a2e4b6d8035"
}'