API Search and Filtering
Search LastDatabase data programmatically using the general Lead Search API or the integration-focused People Search API.
The two search interfaces serve different workflows. General Lead Search exposes multiple data inventory types. People Search is designed for B2B contact discovery where the email remains masked until a separate unlock operation is requested.
General Lead Search
GET https://lastdatabase.com/api/leads/search
Authenticate with your Bearer API key and choose the data inventory
through the type query parameter.
curl -X GET \ "https://lastdatabase.com/api/leads/search?type=email&country=USA&industry=technology&keyword=CEO&limit=10" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
Supported Data Types
| Type | Dataset | Example |
|---|---|---|
email |
B2B email and business contact data. | ?type=email |
consumer_email |
Consumer email records. | ?type=consumer_email |
phone |
Phone lead records. | ?type=phone |
mixed |
Mixed lead inventory. | ?type=mixed |
fax |
Fax lead records. | ?type=fax |
If the request does not select one of the explicitly handled non-email inventory types, the current general search implementation uses the B2B email search path.
Search Filters
The general API supports the following core filters where applicable to the selected data inventory.
| Parameter | Purpose | Example |
|---|---|---|
type |
Select the data inventory. | email |
country |
Filter by country. | USA |
city |
Filter by city. | New York |
industry |
Filter by industry. | technology |
keyword |
Search supported textual fields. | CEO |
limit |
Maximum result count for the request. | 10 |
General Search Response
Successful Lead Search responses use a common top-level envelope:
{
"status": true,
"type": "email",
"count": 10,
"data": [
...
]
}
| Field | Description |
|---|---|
status |
Whether the request completed successfully. |
type |
The data inventory used for the search. |
count |
Number of records returned in this response. |
data |
Collection of matching records. |
B2B People Search
GET /api/integrations/v1/people/search
People Search is intended for contact discovery. It accepts
keyword, country, city and
industry filters.
| Parameter | Required | Validation |
|---|---|---|
keyword |
At least one search filter required | String, max 150 characters |
country |
At least one search filter required | String, max 100 characters |
city |
At least one search filter required | String, max 100 characters |
industry |
At least one search filter required | String, max 150 characters |
limit |
No | Integer 1–50; default 25 |
The request must contain at least one non-empty search filter. Sending only a limit without a search criterion fails validation.
Example
curl -X GET \ "https://lastdatabase.com/api/integrations/v1/people/search?country=USA&industry=technology&limit=5" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
Masked Discovery
People Search intentionally does not expose a full email address.
Search results return a masked email and
email_unlocked: false.
Depending on availability, a People Search result can contain:
- LastDatabase record ID
- First name
- Last name
- Masked email
- Email unlocked status
- Job title
- Seniority
- Company name
- Company website
- LinkedIn URL
- Industry
- Country
- State
- City
- Postal code
- Employee size
- Revenue
- Technology
Illustrative response shape
{
"status": true,
"type": "email",
"count": 1,
"filters": {
"country": "USA",
"industry": "technology"
},
"data": [
{
"id": 26515564,
"first_name": "Example",
"last_name": "Contact",
"email": "e***@example.com",
"email_unlocked": false,
"job_title": "Executive",
"company_name": "Example Company",
"industry": "Technology",
"country": "USA"
}
]
}
Unlock a B2B Contact
POST /api/integrations/v1/people/unlock
After selecting a search result, send its LastDatabase record ID as
lead_id.
curl -X POST \
"https://lastdatabase.com/api/integrations/v1/people/unlock" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"lead_id": 26515564
}'
The ID is required, must be an integer and must be at least 1.
The unlock endpoint delegates to the existing LastDatabase contact unlock implementation. That shared workflow remains responsible for customer ownership, subscription consumption, suppression and applicable verification behavior.
Search Limits and Pagination
People Search accepts a maximum limit of 50 and defaults
to 25.
The current People Search API returns a bounded result set in one response. It does not currently publish page, offset or cursor pagination parameters.
General Lead Search also uses a bounded result limit. Applications should request only the number of records needed for the current operation.
API request limits are separate from lead-record consumption. Search requests count toward the API key's daily technical request allowance. Product-consuming operations are governed by the relevant customer product allowance.
Implementation Guidance
Use specific filters
Narrow searches with country, city, industry or keyword criteria rather than repeatedly issuing broad searches.
Expect nullable fields
Not every record contains every optional attribute. Treat missing company, technology, revenue, location or other optional fields as a normal data condition.
Do not infer unlocked data
A masked People Search result should remain masked in your application until the unlock endpoint successfully returns the applicable unlocked record.
Handle validation errors
Invalid parameters can return HTTP 422. Correct the request rather than immediately retrying the same invalid payload.
Handle API limits
HTTP 429 means the authenticated API key has reached its daily request limit. Avoid aggressive retry loops.
Keep API keys private
Search requests must originate from trusted server-side code when they contain your LastDatabase API key. See the API Authentication guide.