Search Contacts

Search contacts by term and field. Supports pagination and returns tags linked to contacts.
GET
/v2/contacts/search
Query Parameters
search_term string

Term to search for (e.g., 'New Customer').

search_by string

What to search by (e.g., 'tag').

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/contacts/search?search_term=Brightwave Solutions&search_by=company&query_amount=5' \
  -H 'x-api-key: $LUNARSEND_API_KEY' \
  -H 'Accept: application/json'
Response
{
        data: [
            {
                contact_id: "1c92f8a3-73f4-4c2b-bc8b-248f0bb7a213",
                first_name: "Elena",
                phone: "415-283-9921",
                last_name: "Moreno",
                email: "elena.moreno@outlook.com",
                company: "Brightwave Solutions",
                owner: "Joshua",
                last_activity: "2025-09-25T14:12:03.000+00:00",
                user_id: "f446e4f9-5110-4a75-92bd-73a4a0c54196",
                tags: [
                    {
                        id: "a41a203d-431c-4201-b1f2-d049cd458c99",
                        name: "Lead",
                        color: "#28a745",
                    },
                ],
                total_count: 46,
            },
            {
                contact_id: "c7b89312-d45c-49f1-9a0d-97db74ac13bb",
                first_name: "Marcus",
                phone: "602-889-4410",
                last_name: "Hunt",
                email: "marcus.hunt@example.com",
                company: "Brightwave Solutions",
                owner: "Josh",
                last_activity: "2025-09-30T09:47:22.000+00:00",
                user_id: "66f463d7-3107-4957-8b71-ab03acc319e2",
                tags: [],
                total_count: 46,
            },
            {
                contact_id: "bb23d19e-9e12-43e7-a691-9ac7c5a10d11",
                first_name: "Priya",
                phone: "917-620-3328",
                last_name: "Sharma",
                email: "priya.sharma@gmail.com",
                company: "Brightwave Solutions",
                owner: "Joshua",
                last_activity: null,
                user_id: "f446e4f9-5110-4a75-92bd-73a4a0c54196",
                tags: [],
                total_count: 46,
            },
            {
                contact_id: "e37af2c1-5f3c-49c5-93d0-31877222bd2e",
                first_name: "David",
                phone: "708-555-7623",
                last_name: "Nguyen",
                email: "david.nguyen@companymail.com",
                company: "Brightwave Solutions",
                owner: "Josh",
                last_activity: "2025-09-29T21:03:47.000+00:00",
                user_id: "66f463d7-3107-4957-8b71-ab03acc319e2",
                tags: [
                    {
                        id: "9d62ec2f-81ab-4fa4-81b1-7f2b9f2e91a7",
                        name: "VIP",
                        color: "#fd7e14",
                    },
                ],
            },
        ],
        total_count: 46,
        page: 0,
        per_page: 5,
    }
Response Fields
FieldTypeStatusFormatNotes
total_countint
read-only optional
-total amount of contacts the fill the search terms, matched in object and top level
pageint
read-only optional
-Current page, indexed to 0
per_pageint
read-only optional
-Amount of contacts per page
dataobject
required
--
data.contact_iduuid
read-only optional
uuidContact ID.
data.first_namestring
required
--
data.phonestring
required
phone-
data.last_namestring
required
--
data.emailstring
required
email-
data.companystring
required
--
data.ownerstring
required
--
data.last_activityISO 8601 datetime
read-only optional nullable
date-timeMost recent activity timestamp (if any).
data.user_iduuid
required
uuid-
data.tagsarray<Tag>
required
-Array of tag objects: { id: uuid, name: string, color: string }
data.total_countnumber
read-only optional
-total amount of contacts the fill the search terms, matched in object and top level