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
FieldTypeStatusFormatNotes
total_countint
read-only optional
-Total matches for the query (mirrored top-level).
pageint
read-only optional
-Current page, indexed to 0
per_pageint
read-only optional
-Amount of contacts per page
dataobject
required
--
data.deal_iduuid
read-only optional
uuidDeal ID.
data.companystring
required
--
data.stageenum
QualificationProposalNegotiationInterestedVerbalDiscovery
required
-Pipeline stage.
data.deal_sizenumber
optional nullable
--
data.ownerstring
required
--
data.primary_contactuuid
optional nullable
uuid-
data.contact_emailstring
optional nullable
email-
data.user_iduuid
required
uuid-
data.open_dateISO 8601 datetime
read-only optional nullable
date-timeWhen the deal was opened (if known).
data.close_dateISO 8601 datetime
read-only optional nullable
date-timeWhen the deal was closed (if any).
data.created_atISO 8601 datetime
read-only optional nullable
date-timeCreation timestamp.
data.notesstring
optional nullable
--
data.total_countnumber
read-only optional
-Total matches for the query (mirrored top-level).