I have an event with a price set which allows multiple registrations on one email. It accurately counts the number of people registered against the maximum allowed. How do I get the number of "actual participants" from the API? This snippet only counts the number of registration records:

{crmAPI var="ParticipantS" entity="Participant" method="getCount" sequential="1" event_id=$event.id } Count = {$ParticipantS.count}

3 Answers 3


You can total up the participants by looking up the line items.



Probably you should check each individual Participant record for the actual number of participants and count them manually. With manually I mean you can count them with smarty code.


I would also check out and install the excellent Summary Fields extension from Jamie McClelland (see https://civicrm.org/extensions/summary-fields ) which among many other summaries shows counts for Events attended per contact and also see Events -> Dashboard -> Event Summary (which might be in core, or might be enabled after installing the Summary Fields extension - not sure which ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.