Search Deals
Search deals by term and field. Supports pagination and common filters.
GET
/v2/pipeline/search
Query Parameters
search_term string
Term to search for (e.g., 'AB-Company', 'Negotiation').
search_by string
What to search by (e.g., 'company', 'stage', 'owner', 'email').
query_amount number
Max results per page (per_page).
page number
Zero-based page index (default 0).
cURl example
curl -X GET 'https://lunarsend.com/api/v2/pipeline/search?search_term=Logistics&search_by=company&query_amount=5&page=0' \
-H 'x-api-key: $LUNARSEND_API_KEY' \
-H 'Accept: application/json'Response
{
data: [
{
deal_id: "7b1b0e42-1f2a-4e1e-8e5d-1f6a7b0c9d21",
company: "A-B Logistics",
stage: "Negotiation",
deal_size: 15000,
owner: "John",
primary_contact: "150c081d-5d5f-401d-abd1-727c35222054",
contact_email: "ops@ABLogistics.com",
user_id: "77f463d7-4107-1957-8b71-ab03acc319a2",
open_date: "2025-10-01T10:05:00.000Z",
close_date: null,
created_at: "2025-10-01T10:05:00.000Z",
notes: "Pricing review scheduled.",
total_count: 46,
},
{
deal_id: "1a2b3c4d-5e6f-4780-9a0b-1c2d3e4f5a6b",
company: "Acme Logistics",
stage: "Negotiation",
deal_size: 22000,
owner: "John",
primary_contact: null,
contact_email: "ops@AcmeLogistics.com",
user_id: "77f463d7-4107-1957-8b71-ab03acc319a2",
open_date: "2025-09-28T09:20:00.000Z",
close_date: null,
created_at: "2025-09-28T09:20:00.000Z",
notes: "Include success plan.",
total_count: 46,
},
],
total_count: 46,
page: 0,
per_page: 5,
}Response Fields
| Field | Type | Status | Format | Notes |
|---|---|---|---|---|
| total_count | int | read-only optional | - | Total matches for the query (mirrored top-level). |
| page | int | read-only optional | - | Current page, indexed to 0 |
| per_page | int | read-only optional | - | Amount of contacts per page |
| data | object | required | - | - |
| data.deal_id | uuid | read-only optional | uuid | Deal ID. |
| data.company | string | required | - | - |
| data.stage | enum QualificationProposalNegotiationInterestedVerbalDiscovery | required | - | Pipeline stage. |
| data.deal_size | number | optional nullable | - | - |
| data.owner | string | required | - | - |
| data.primary_contact | uuid | optional nullable | uuid | - |
| data.contact_email | string | optional nullable | - | |
| data.user_id | uuid | required | uuid | - |
| data.open_date | ISO 8601 datetime | read-only optional nullable | date-time | When the deal was opened (if known). |
| data.close_date | ISO 8601 datetime | read-only optional nullable | date-time | When the deal was closed (if any). |
| data.created_at | ISO 8601 datetime | read-only optional nullable | date-time | Creation timestamp. |
| data.notes | string | optional nullable | - | - |
| data.total_count | number | read-only optional | - | Total matches for the query (mirrored top-level). |